Sensitive Data Handling
Permanent collection exclusions, strict DTO projections, zero-leakage error sanitization, and browser header protections against data disclosure.
Permanently excluded internal collections and fields
Taicket MCP connects to Taicket databases with a curated model set in mcp/src/db/models/taicketCore.ts and taicketDedicated.ts. Internal operations tables, private evidence vaults, and administrative secrets are neither registered as Mongoose models nor reachable from any MCP tool or resource.
| Excluded Asset | Classification | MCP Exposure Policy |
|---|---|---|
| AdminStaff | Internal platform staff roster & privilege flags | Zero exposure; model not imported in mcp/ |
| GlobalCoreBrain & CandidateProposal | Proprietary AI self-training directives and review proposals | Zero exposure; model not imported in mcp/ |
| DashboardLoginLog | User IP addresses, browser fingerprints, and email records | Zero exposure; model not imported in mcp/ |
| PrivateEvidence | Sensitive moderation proof and private case attachments | Zero exposure; model not imported in mcp/ |
| UserSupportTicket | Direct platform support conversations with Taicket staff | Zero exposure; model not imported in mcp/ |
| Anonymous report submitters | Reporter identity fields inside Server Dashboard anonymous reports | Stripped at query and DTO projection layers |
| AI Panel 4 & internal overrides | Internal whitelist panel and hardcoded internal guild IDs | Never queried, exposed, or referenced in error messages |
| PromoCode write paths | Subscription promo code minting and redemption | Strictly excluded; billing collections are read-only |
Explicit DTO projections on every tool output
MCP tools never return raw Mongoose documents (doc.toObject() or unprojected .lean() records). Every response passes through an explicit Data Transfer Object (DTO) mapper that whitelists user-facing fields, strips MongoDB internals (_id, __v), removes webhook URLs or secret tokens where present, and applies caller RBAC projections.
export function mapAutoBanRuleDto(rule: AutoBanRuleDoc): AutoBanRuleDto {
return {
ruleId: String(rule.ruleId),
name: rule.name,
enabled: Boolean(rule.enabled),
triggerType: rule.triggerType,
threshold: rule.threshold,
action: rule.action,
};
}sanitizeMcpError guarantees
All uncaught exceptions, MongoDB driver faults, Discord API error bodies, and Zod parsing failures pass through sanitizeMcpError in mcp/src/security/errors.ts before leaving the server.
- Zero infrastructure disclosure:: Stack traces, filesystem paths, MongoDB hostnames, database/collection names, environment variable names, and raw upstream response bodies are logged internally via Pino (redacted) and never returned to MCP clients.
- Stable error code taxonomy:: Unexpected internal exceptions collapse into INTERNAL_ERROR with a plain server-owner message and an opaque request correlation ID for support troubleshooting.
- No internal guild hints:: Tier rejection messages never reference internal whitelist guilds, test overrides, or internal Discord SKU logging channels.
{
"ok": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Something went wrong while completing that request. Please try again in a moment.",
"requestId": "req_01JXYZ9K2M4P7Q8R"
}
}Transport and browser privacy headers
All sensitive routes (/mcp, /oauth/*, and /account) emit strict anti-caching and framing headers at both Express (helmet) and Nginx layers: Cache-Control: no-store, no-cache, must-revalidate, private, Pragma: no-cache, Referrer-Policy: no-referrer, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, and HSTS with preload.