MCP Security · 2026
Design for compromised dependencies

Handling Malicious or Compromised MCP Servers

A resilient agent platform assumes servers can fail operationally or become adversarial after approval. Detect trust drift, contain it quickly, and fail closed.

Trust can change after approval

A server that was safe yesterday may be unsafe today

Compromise is not limited to outages. The server can still respond successfully while changing tool metadata, steering the agent toward sensitive data, exfiltrating through permitted actions, or returning adversarial content.

Availability failure

Timeouts, overload, dependency failure, certificate problems, regional outage.

Integrity failure

Tool output or metadata changes in a way that alters agent behavior.

Confidentiality failure

Server or tool tries to collect secrets, local files, customer data, or credentials.

Authority abuse

Tool attempts actions outside the approved business purpose or expected destination set.

Before runtime

Make MCP servers managed dependencies

Approved registry

Track owner, source, package/container digest, endpoint, auth method, scopes, tool inventory, environment, and review status.

Metadata snapshots

Snapshot tool/prompt/resource definitions at approval time. Diff them continuously and require re-approval for meaningful change.

Least privilege

Keep agents away from local credential stores and sensitive files unless the task explicitly requires them.

Egress control

Restrict where the server and tool execution can connect. “Can make HTTP calls” should not mean “can reach anywhere.”

Version pinning

Use exact approved versions/digests in production and make upgrades an intentional deployment event.

Security evaluation

Test schemas, injection, path/command handling, data exposure, approval bypass, and tool-description poisoning.

At runtime

Detect, trip, isolate, recover

1

Detect

Errors, metadata drift, unusual destinations, denied actions, anomaly signals.

2

Trip circuit

Stop new requests before retries amplify damage.

3

Quarantine

Remove routing, revoke credentials, deny network access, preserve evidence.

4

Fail safely

Use a separately trusted fallback or degrade capability; never fail open.

5

Re-validate

Root cause, rebuild, re-evaluate, re-approve, then restore gradually.

Failover is not trust transfer

A backup must be independently trusted

SituationCorrect responseAvoid
Primary times outCircuit-break and retry a pre-approved equivalent with idempotency protection.Retry storm against the same failing server.
Metadata changes unexpectedlyBlock changed capability and require review/re-evaluation.Automatically trusting the new description because endpoint identity is unchanged.
Suspected exfiltrationQuarantine, revoke tokens, stop egress, preserve logs, rotate affected credentials.Continuing read-only calls “for diagnosis.”
No safe equivalent existsDegrade gracefully and tell the user/operator what is unavailable.Routing to an unknown public server.

KONTROLS treats trust as a lifecycle

Server trust should move through registered → reviewed → approved → monitored → quarantined/revoked states, with KNOBS-based testing before promotion and after every material capability change.