MCP is as safe as the servers you connect, the credentials you give them and the checks you put on each call. The Model Context Protocol itself is a message format; it does not decide whether a tool call is allowed, and its specification leaves that to the host, saying there should always be a human able to deny tool invocations. Used with vetted servers, short-lived scoped credentials and a policy check on every call, MCP can be run safely in production. Used with random servers and a personal access token, it cannot.
Is MCP secure by design?
Partly. The MCP authorization specification uses OAuth 2.1 for remote servers, requires servers to validate that tokens were issued for them, and the security best practices cover confused-deputy attacks, token passthrough, SSRF, local server compromise and scope minimisation. What the protocol cannot do is judge intent. The model chooses the tool and the arguments, and the tools specification says clients must treat tool annotations as untrusted unless they come from trusted servers. Security therefore depends on the host, the servers and whatever sits between them.
What are the main MCP security risks?
OWASP's MCP Top 10 (a 2025 list, in beta as of this update) and the OWASP Top 10 for Agentic Applications name most of them. In practice, six matter most:
| Risk | What happens | Control that helps |
|---|---|---|
| Tool poisoning and rug pulls | A tool's description carries hidden instructions, or changes after you reviewed it. Invariant Labs described this in April 2025 | Pin tool definitions by hash; hide or hold changed tools |
| Over-broad credentials | The server runs with a token that can do far more than the task needs | Short-lived, per-tool scopes; credentials held outside the agent |
| Token passthrough | A server forwards the client's token downstream, breaking audit and trust boundaries | Audience validation; the gateway uses its own upstream credential |
| Prompt injection through results | A web page, ticket or email returned by a tool steers the next call | Treat results as untrusted; gate risky tools after untrusted input |
| Data exfiltration | Private data plus untrusted content plus an outbound channel, Simon Willison's "lethal trifecta" | DLP on arguments and results; egress control; approval for external sinks |
| Untrusted and shadow servers | Developers install servers from public registries, run with their own privileges | A registry of approved servers; sandboxing; default-deny networking |
For the injection side in detail, read prompt injection in agent tool calls. For the data side, read agent egress control and DLP.
What does the MCP specification require for security?
The points most often missed, from the 2026-07-28 revision:
- No token passthrough. Servers "MUST NOT accept any tokens that were not explicitly issued for the MCP server".
- Per-client consent for proxy servers, to prevent confused-deputy attacks with static client IDs.
- SSRF protection when clients fetch OAuth metadata: block private and link-local ranges, beware DNS rebinding, and consider an egress proxy.
- Consent and sandboxing for local servers: show the exact command before running it, and launch servers with restricted file system and network access.
- Minimal scopes, with step-up for privileged operations rather than everything up front.
- A human able to deny tool calls, a should in the tools specification.
How do I secure an MCP server?
- Inventory and approve servers. Know which servers each agent may use; refuse the rest.
- Pin what you reviewed. Hash each tool's definition and act when it changes.
- Authenticate every caller with tokens issued for that server, and validate the audience.
- Hold upstream credentials outside the agent and scope them to the task.
- Check arguments, not just tool names, with a default-deny policy.
- Hold destructive or external actions for a person. See human-in-the-loop approval.
- Scan for secrets and personal data in both directions.
- Isolate the server and the agent, and restrict where they can connect.
- Record every decision in a log that cannot be quietly edited. See tamper-evident audit trails.
Many of these are hard to do inside each server, and cross-server rules ("no email after reading an untrusted page") are impossible there. That is the case for an MCP gateway.
Is MCP safe for enterprise production use?
It can be, with the same discipline you apply to any integration that holds credentials and changes data. The questions a security review should ask: which servers are allowed, and who approved them? Which credentials does each use, and for how long? What stops an agent calling a tool with dangerous arguments? Can a person hold a call? What leaves the network? Can you show afterwards what each agent did, and stop one in seconds? If the answer to most of these is "the model will behave", it is not ready.
How does MAQPNA make MCP safer?
MAQPNA's gateway sits in front of every MCP server and checks every call. What it does, as described in the docs:
- Registered servers only. Agents reach a server at
/mcp/<name>with a token scoped to it; servers default tountrusted. See MCP servers, tool pinning and A2A. - Tool pinning. Tool definitions are hashed; a drifted tool can be hidden, held for approval or flagged. See MCP servers and tool pinning.
- Credentials stay in the gateway. The agent holds a 15-minute session token; the gateway strips it and uses its own credential upstream. See agent identity and least privilege.
- Default-deny policy on server, tool, arguments, user, groups, schedules and session taint, with allow, deny or require approval. See policies and decisions.
- Taint and DLP. Calling an untrusted server taints the session, so later calls to external sinks can be denied or held; DLP redacts or blocks secrets and personal data. See DLP and taint.
- Sandboxed agents. Each session runs in its own sandbox whose only network exit is the gateway.
- Evidence. Every decision goes into a hash-chained ledger with signed checkpoints.
What it does not do: MAQPNA does not audit an MCP server's source code or guarantee a third-party server is benign. It limits and records what any server, and any agent, can do through it. For OWASP mapping, see the OWASP Top 10 for Agentic Applications, mapped.