
An MCP server lets an AI model take actions in a real system. Anyone who can influence the model can try to take those actions too, and MCP security starts from that fact. A safe enterprise deployment runs every server on the signed-in user's own permissions and exposes only narrow tools. It treats every tool description and tool result as untrusted text, makes writes and outside sends wait for a person, and logs every call. Most teams put those controls in one place, an MCP gateway that every host goes through.
In its first year, MCP built up a public record of poisoned tools, leaked customer data and a malicious package. Over the same period, successive revisions of the specification tightened its authorization rules. If you are new to the protocol, start with our explainer on what an MCP server is.
Six public incidents between April and September 2025 cover most of the ways an MCP setup fails. Each one maps to a control you can put in place before launch.
| Incident | What happened | The control that stops it |
|---|---|---|
| Tool poisoning, Invariant Labs, April 2025 | Hidden instructions in a tool's description told the model to read private files and send them out through another tool | Review and pin tool descriptions; alert when a server changes them |
| GitHub MCP prompt injection, Invariant Labs, May 2025 | A crafted issue in a public repository led an agent to copy data from private repositories into a public pull request | One repository per session, least-privilege tokens, approval before writes |
| Asana MCP server, June 2025 | A flaw in Asana's new MCP server could expose one customer's data to other organisations. About 1,000 customers were notified | Tenant isolation tests on any hosted server before you connect it |
| MCP Inspector, CVE-2025-49596, June 2025 | A developer debugging tool listening on the local machine could be reached from a malicious web page and run commands | Patch developer tools; bind local servers to localhost with authentication |
| mcp-remote, CVE-2025-6514, July 2025 | A popular proxy package let a malicious server run commands on the client machine (CVSS 9.6, fixed in 0.1.16) | Pin and scan client-side packages like any other dependency |
| postmark-mcp, September 2025 | From version 1.0.16, a copy of an email server on npm secretly sent a blind copy of every email to the attacker | Install servers only from an internal registry of reviewed versions |
Two patterns run through the list. First, the model obeyed text it should have treated as data. Second, a server ran with more access than its job needed. The OWASP Top 10 for Agentic Applications, published in December 2025, names both: agent goal hijacking and tool misuse.
The most useful policy decision is which calls an agent may make without a person approving them. Write it down per tool before the server goes live. The check below applies the rule we use on builds. Reads of public or internal data run and are logged. Anything that writes, sends outside the company or touches customer or financial data waits for a named approver. A shared key or an unreviewed package blocks the call outright.
The approval step does not have to be slow. On our builds, it is a Teams or Slack message with the proposed action and two buttons. The error rate on each tool decides when the approval can be lifted. Our enterprise AI governance page lists the ten controls that go around every agent we ship.
The March 2025 revision of the specification added an authorization framework based on OAuth 2.1. The June 2025 revision made it stricter. A protected MCP server acts as an OAuth resource server. It publishes protected resource metadata (RFC 9728) so clients can find the right authorization server. Clients must use resource indicators (RFC 8707), so each token is issued for one specific server. The July 2026 revision deprecated dynamic client registration in favour of client ID metadata documents.
For an enterprise, four rules follow from the specification and its security best practices.
NIST's National Cybersecurity Center of Excellence reached the same point in a February 2026 concept paper on software and AI agent identity. The paper notes that MCP relies on OAuth and OpenID Connect to delegate rights and to authenticate users. It also plans to apply NIST's zero trust architecture guidance (SP 800-207) to agents.
An MCP gateway is a proxy that sits between your MCP hosts and your MCP servers, so every call passes through it. The specification does not define it. Companies use it to hold the controls above in one place, so they are not rebuilt in every server. Hosts connect only to the gateway, and the gateway decides which servers and tools each user can reach. Our guide to how an enterprise AI agent runs in production shows a tool gateway with an allow-list in front of an invoice agent's writes.
| Gateway function | Why it matters |
|---|---|
| Single sign-on and token checks | Every call carries a user identity your identity provider issued |
| Allowlist of servers and tools | A new server, or a changed tool description, cannot appear without review |
| Scopes per role | Finance reaches the ERP tools, support reaches the helpdesk tools |
| Approval on writes | One approval flow for every server instead of one per build |
| Secrets management | System credentials stay in the gateway or a vault, never in the agent's context |
| Logging and rate limits | One audit log of who called which tool with what arguments, and a ceiling on runaway agents |
Both commercial and open-source gateways exist. They sit alongside the policy engines covered in our comparison of AI governance tools. For a smaller setup, an n8n instance can play the same role. Workflows behind an MCP Server Trigger become the only tools agents see. Each one has its own credentials, approval step and execution log. Our n8n Enterprise page covers the self-hosted setup this needs.
Public MCP servers are code from strangers that runs with your credentials. The postmark-mcp package worked as advertised until version 1.0.16 added the hidden blind copy. Keep an internal list of approved servers, each pinned to a reviewed version. Scan them like any other package, and review them again on every upgrade. The official MCP Registry, in preview since September 2025, lists what exists. It does not review servers for security.
The same thinking applies to people. Our post on AI safety training for enterprise teams covers what builders and business users need to know to spot these failures.
It depends on how you build and run your servers. The protocol defines OAuth 2.1 authorization and publishes security best practices. But authorization is optional in the specification, and the protocol cannot stop a model from obeying malicious text. Security comes from how servers are built and deployed: user-scoped tokens, narrow tools, approval on writes, reviewed servers and logging.
It is a proxy that sits between MCP hosts and MCP servers. It keeps sign-in, the allowlist of servers and tools, role scopes, approvals, secrets and logging in one place. The MCP specification does not define it. It is a deployment pattern companies use so each server does not have to rebuild those controls.
A protected MCP server acts as an OAuth 2.1 resource server. The client finds the authorization server from the server's protected resource metadata. The user signs in, and the client presents a token issued for that specific server. Servers must not pass tokens through to other services.
Tool poisoning is an attack that hides instructions in a tool's name, description or output so the model follows them. The hidden text might tell the model to read files and send them elsewhere. The defence is to treat descriptions and results as untrusted, review and pin tool definitions, and limit what any tool can do without approval.
Only after review. Pin a reviewed version in an internal registry, run it on least-privilege credentials, and re-review every upgrade. The postmark-mcp case showed that a package can turn malicious in a later release.
Ovidius builds MCP servers and agent workflows inside your systems, with sign-in, approvals and logs in place before anything goes live. To review an MCP setup you already run or plan a new one, book a discovery call.