Building a Threat Model for MCP Deployments

Before implementing security controls, you need to understand what threats your MCP deployment faces. A threat model identifies potential attacks, their likelihood, and their impact, helping you prioritize security investments.

For MCP deployments, the primary threat actors are: (1) External attackers trying to compromise your MCP server and access backend systems, (2) Malicious insiders with legitimate access trying to escalate privileges, (3) Accidental misuse where authorized users accidentally access data they shouldn't, and (4) Third-party vendors or contractors with temporary access to MCP servers.

Threat
Severity
Mitigation
Credential Theft
Critical
Secrets management, credential rotation, MFA, monitoring
Unauthorized Data Access
Critical
RBAC, row-level security, audit logging, access reviews
Prompt Injection
High
Input validation, tool parameter constraints, monitoring
Denial of Service
High
Rate limiting, resource quotas, auto-scaling, monitoring
Man-in-the-Middle
High
TLS/HTTPS, certificate pinning, VPN/private networks
Data Leakage (Logs)
Critical
Log redaction, encryption at rest, access controls
Privilege Escalation
High
Principle of least privilege, RBAC, monitoring

Need a complete security audit for your MCP deployment? Our team conducts threat modeling, security assessments, and compliance reviews for enterprise Claude integrations.

Schedule Security Assessment →

Authentication Architecture for MCP

Authentication answers "Who are you?" in your MCP deployment. You need to authenticate that: (1) the request is coming from an authorized Claude instance or user, and (2) the credentials being used to access backend systems are valid and not compromised.

API Key Authentication

The simplest approach for machine-to-machine MCP communication is API key authentication. Each Claude instance or application gets a unique API key that identifies it. The key is passed with every request to your MCP server, which validates it and proceeds.

Best practices: (1) Generate cryptographically strong, random API keys. (2) Store them in a secrets management system like AWS Secrets Manager or HashiCorp Vault. (3) Rotate them on a schedule (90 days minimum, 30 days for critical systems). (4) Use different keys for different environments (development, staging, production). (5) Include rate limiting per API key to prevent abuse. (6) Log all API key usage and alert on unusual patterns.

OAuth 2.0 and OIDC

For user-facing applications where a human is authorizing Claude to act on their behalf, use OAuth 2.0 or OpenID Connect. The flow: user logs into your application, authenticates with an identity provider, grants Claude permission to act on their behalf, and your application receives an access token that Claude uses to access MCP tools.

The advantage of OAuth is that credentials are managed by a centralized identity provider, not scattered across systems. The disadvantage is additional complexity. Use OAuth when you have multiple applications needing to authorize Claude, or when you need fine-grained permission scoping.

Mutual TLS (mTLS)

For high-security deployments, use mutual TLS where both the client (Claude or your application) and server (MCP server) authenticate each other using certificates. This provides strong cryptographic authentication and encryption.

mTLS is more operationally complex (certificate management, renewal, distribution), but provides excellent security for internal enterprise communications. Use mTLS for MCP servers running in private networks within your organization.

Authorization & Access Control

Authorization answers "What can you do?" after authentication establishes who you are. Your MCP server must enforce that Claude (or the user Claude is acting on behalf of) only accesses resources and performs actions they're authorized for.

Role-Based Access Control (RBAC)

Define roles (Viewer, Editor, Admin) and assign permissions to each role. When Claude calls a tool, check the authenticated user's role and deny if they don't have the required permission.

For example: Tool "delete_customer" might require the "Admin" role. If Claude is authenticated as a "Viewer", the tool call is rejected. This is simple to implement and understand but becomes unwieldy with many roles or complex permission requirements.

Attribute-Based Access Control (ABAC)

Instead of static roles, ABAC makes access decisions based on attributes. For example: "A user can edit a customer record only if they're in the same department as the customer, their role is Editor or higher, and the customer's status is Active." This is more flexible than RBAC but requires a policy engine to evaluate attributes at runtime.

ABAC scales well as permission requirements grow and is excellent for multi-tenant systems. Tools like Opa/Rego, Amazon Verified Permissions, or Zanzibar-style systems make ABAC practical.

Row-Level Security

Enforce authorization at the database level, not just in your MCP server. When Claude queries for customer data, the database should only return rows the user is authorized to see. This prevents accidental data leakage if your MCP server has a bug.

Most databases support row-level security through policies (Postgres RLS, Oracle Virtual Private Database, etc.). When a user connects, the database applies their row-level policies automatically to all queries.

Comprehensive Audit Logging

Audit logs are your record of what Claude did and what data was accessed. They're essential for compliance, forensics, and detecting security breaches. A proper audit log should capture:

  • Authentication events: successful and failed login attempts, credential rotation, MFA challenges
  • Authorization decisions: especially denials and permission grants/revokes
  • Tool invocations: timestamp, user/instance, tool name, input parameters (sanitized), execution time, result
  • Data access: what data was read, when, by whom, in what context
  • Administrative actions: configuration changes, user/role updates, security policy changes
  • Errors and exceptions: full error context for debugging

Log Ingestion & Retention

Forward all MCP server logs to a centralized logging platform (CloudWatch, Splunk, Datadog, ELK) where they're immutable and retained long-term. Configure retention based on your compliance requirements: typically 1-3 years for financial/healthcare data, 90 days for general logs. Use log encryption to prevent unauthorized access.

Log Analysis & Alerting

Configure alerts for suspicious patterns: unusual tool usage, repeated authorization denials (possible privilege escalation attempt), accessing data outside normal patterns, or tools being called from unexpected sources. These alerts help you detect breaches as they happen rather than discovering them months later in a forensic audit.

Data Governance in MCP Deployments

MCP deployments move sensitive enterprise data through Claude. You need policies to govern how that data is handled: where it goes, how long it's kept, what Claude can do with it.

Data Classification

Classify your data by sensitivity: Public, Internal, Confidential, Restricted. For each classification level, define handling requirements: what systems can access it, who can access it, how long it can be retained, whether it can be logged.

For example: Restricted data (SSN, health records, financial account numbers) should never be logged, should only be accessed by specific roles, should be encrypted at rest and in transit, and should be retained only as long as necessary.

Claude's Data Handling

Understand how Claude handles data you pass to it. By default, data you send to Claude's API is processed by Claude and may be used to improve Claude (subject to your contract). For sensitive data, you have options: (1) Use Claude's Enterprise terms which provide stricter data handling guarantees. (2) Redact sensitive PII before sending to Claude. (3) Use local/private Claude deployments if available. (4) Have Claude work with data that has been anonymized or aggregated.

Data Minimization

Only expose the data Claude needs in your MCP resources and tools. If Claude is summarizing a customer record, expose the summary, not the raw database with all fields. If Claude is analyzing sales trends, expose aggregated data, not individual transactions. This reduces the amount of sensitive data flowing through Claude and reduces your privacy risk.

Compliance Framework
Free White Paper

MCP Compliance for HIPAA, SOC2, GDPR

Complete compliance framework for MCP deployments including audit controls, data handling requirements, and certification checklists for healthcare and financial services.

Download Free →

Compliance Frameworks for MCP

If your industry is regulated (healthcare, finance, government), your MCP deployment must meet compliance requirements. Here's how common frameworks apply to MCP:

HIPAA (Healthcare)

HIPAA requires encryption (at rest and in transit), audit logging, access controls, and business associate agreements. For MCP: (1) Encrypt data in transit using TLS. (2) Encrypt data at rest in databases and logs. (3) Log all access to protected health information. (4) Implement strong access controls (RBAC/ABAC) limiting who can access patient data. (5) Have business associate agreements with any cloud providers you use (AWS, Datadog, etc.).

SOC 2

SOC 2 Type II certification audits your controls around security, availability, processing integrity, confidentiality, and privacy. For MCP: (1) Document your security policies and procedures. (2) Implement strong authentication and authorization. (3) Maintain comprehensive audit logs. (4) Implement change management and least privilege. (5) Have incident response procedures. (6) Undergo annual audits by an independent auditor.

GDPR (EU Data Protection)

GDPR requires data protection by design, user consent, data subject rights, and breach notification. For MCP: (1) Only process EU personal data with explicit consent. (2) Implement data protection from the start, not as an afterthought. (3) Have processes for users to access, modify, or delete their data. (4) Notify authorities within 72 hours of breaches affecting EU residents. (5) Have data processing agreements with any data processors (including cloud providers).

Incident Response for MCP Breaches

Despite best efforts, security incidents happen. Have a plan to respond quickly and minimize damage.

Detection & Response Workflow

Step 1: Detect the breach through alerting, user report, or security audit. Step 2: Immediately isolate affected systems (disable compromised API keys, revoke access, take servers offline if necessary). Step 3: Preserve evidence (capture logs, memory dumps, disk images) before your systems auto-rotate or delete logs. Step 4: Investigate to understand the scope and extent of the breach. Step 5: Remediate (patch vulnerabilities, rotate all credentials, update access controls). Step 6: Notify affected users/customers and regulators as required by law. Step 7: Post-mortem to understand how the breach happened and prevent recurrence.

Communication & Escalation

Have clear communication chains: who gets notified first, when do you escalate to executives, when do you involve legal/compliance/PR, when do you notify customers. Time matters — decisions made in the first hour of a breach often determine the outcome.

Preparation & Drills

You can't be prepared for incident response by reading about it. Run incident response drills: simulate a breach, practice your response procedures, time how long each step takes, identify gaps. Many organizations run a "tabletop" exercise quarterly where teams discuss how they'd respond to various scenarios.

Security Operations & Monitoring

After deployment, continuous security operations keep your MCP servers secure.

Vulnerability Management

Keep your MCP server's dependencies patched. Use tools like Snyk, Dependabot, or WhiteSource to track vulnerable libraries and get alerts. Subscribe to security advisories for your language/framework. Have a process for emergency patching of critical vulnerabilities (hours, not days).

Penetration Testing

Hire external security consultants to attack your MCP deployment and find vulnerabilities before real attackers do. Penetration tests should cover: authentication bypass, authorization bypass, injection attacks, credential theft, DoS attacks, and data exfiltration.

Security Hardening

Apply defense-in-depth principles: (1) Run MCP servers with minimal privileges (principle of least privilege). (2) Disable unnecessary services and ports. (3) Use network segmentation (firewalls, security groups) to limit who can access your MCP servers. (4) Use container scanning to find vulnerabilities in base images before deploying. (5) Implement API rate limiting and request size limits to prevent DoS. (6) Use Web Application Firewalls (WAF) if your MCP server is internet-facing.

Third-Party Risk & Vendor Management

Your MCP deployment depends on third-party services (cloud providers, libraries, SaaS tools). Those dependencies introduce risk.

Vendor Assessment

Before using a vendor, assess their security: Do they have SOC 2 certification? Do they have a responsible disclosure program? Have they had public security breaches? What's their incident response process? Get this information from their security documentation, and don't hesitate to ask for third-party security assessments (SOC 2 reports).

Supply Chain Security

Your code dependencies (libraries, packages) can contain malicious code or vulnerabilities. Use dependency scanning tools to detect known vulnerabilities. Pin specific versions of dependencies rather than automatically updating to latest (so you can test updates before deploying). Have a process for updating dependencies regularly (at least quarterly).

Securing MCP is complex. Let us help. We provide security assessments, architecture reviews, and implementation support for enterprise MCP deployments.

Request Security Review →