---
title: "MCP security"
source: "https://www.tigera.io/learn/guides/ai-agent-security/mcp-security/"
description: "How MCP works, its main security risks, what the specification requires, why access must be set per tool and not per server, and where to enforce policy"
---

## Guides: MCP security

# MCP security: how to control which AI agents can call which tools

By [Alister Baroi](https://www.tigera.io/blog/author/alister-baroi/), Technical Evangelist at Tigera | Published: Dec 03, 2026 | Last updated: Dec 03, 2026 | 11 min read

- [AI Agent Security](https://www.tigera.io/learn/guides/ai-agent-security/)

- [eBPF for AI agent security](https://www.tigera.io/learn/guides/ai-agent-security/ebpf-ai-agent-security/)

- [Shadow AI agents](https://www.tigera.io/learn/guides/ai-agent-security/shadow-ai-agents/)

- [Agent gateway vs AI gateway vs MCP gateway](https://www.tigera.io/learn/guides/ai-agent-security/agent-gateway-vs-ai-gateway-vs-mcp-gateway/)

- [MCP security](https://www.tigera.io/learn/guides/ai-agent-security/mcp-security/)

- [Cedar policy for AI agents](https://www.tigera.io/learn/guides/ai-agent-security/cedar-policy-ai-agents/)

- [AI Agent Security Platforms for Cloud-native Deployments](https://www.tigera.io/learn/guides/ai-agent-security/ai-agent-security-platforms-for-cloud-native-deployments/)

- [AI Agent Security Platforms for Kubernetes](https://www.tigera.io/learn/guides/ai-agent-security/ai-agent-security-platforms-for-kubernetes/)

- [AI Agent Observability](https://www.tigera.io/learn/guides/ai-agent-security/ai-agent-observability/)

- [AI Agent Governance](https://www.tigera.io/learn/guides/ai-agent-security/ai-agent-governance/)

- [Agentic AI Security](https://www.tigera.io/learn/guides/ai-agent-security/agentic-ai-security/)

- [AI Gateway](https://www.tigera.io/learn/guides/ai-agent-security/ai-gateway/)

- [AI Agent Security Providers](https://www.tigera.io/learn/guides/ai-agent-security/ai-agent-security-providers/)

**MCP security is the practice of controlling which AI agents can reach which Model Context Protocol servers, which tools on those servers they can call and with what arguments, and of recording each call. The protocol standardizes how agents discover and invoke tools, but it does not decide who may invoke them. That decision has to be enforced per tool, usually at a gateway for remote servers and with runtime limits for local ones.**

## Key takeaways

- Server-level access is too coarse. An agent allowed to use a server gets all of its tools, so policy has to reach the tool, its arguments and the user the agent acts for

- In a 2025 analysis of more than 5,200 open source MCP servers, 53 percent relied on static API keys or personal access tokens and 8.5 percent used OAuth

- Tool descriptions and tool results are untrusted input. Both reach the model as text and can carry instructions

**In this article:**

- What is MCP, and what does it change for security?

- How do agents connect to MCP servers?

- What are the main MCP security risks?

- Why are tool descriptions and tool results untrusted input?

- What does the MCP specification require, and what does it leave to you?

- Why is server-level access not enough?

- Where do you enforce MCP policy?

- How do you roll out MCP security?

- Frequently asked questions

- How Lynx approaches this

- Related guides

## What is MCP, and what does it change for security?

The Model Context Protocol is an open standard for connecting AI applications to tools and data. Anthropic created it and [donated it in December 2025 to the Agentic AI Foundation](https://blog.modelcontextprotocol.io/posts/2025-12-09-mcp-joins-agentic-ai-foundation/) under the Linux Foundation.

An MCP server exposes tools, each with a name, a description and an input schema. A client [discovers them with a](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)[`tools/list`](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)[request](https://modelcontextprotocol.io/specification/2026-07-28/server/tools) and invokes one with `tools/call`:

`{`

```
`"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "export_customers", "arguments": { "region": "EU", "format": "csv" } } }`
```



**Two properties matter for security**. Tools are model-controlled, which is the specification’s term for the model choosing and invoking tools at runtime. And the tool name and arguments travel in the request body, so a control that sees only addresses and ports cannot tell this call from any other.

MCP therefore turns tool access into an authorization problem: which agent is calling, which tool with which arguments, and for which user.

## How do agents connect to MCP servers?

Agents connect over [one of two standard transports](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports), and the transport decides which controls can work.

Transport
How it works
What can govern it

stdio
The client launches the server as a subprocess and exchanges messages over standard input and output
Runtime controls on processes, files and network

Streamable HTTP
Each client message is an HTTP POST to a single MCP endpoint
OAuth-based authorization and a gateway in the path

A remote server speaks HTTP, so its traffic can be authenticated, routed through a gateway and checked per call. A local server has no network hop. The agent starts a process, talks to it over a pipe, and usually passes credentials through environment variables.

On Kubernetes both patterns are common, often in the same agent. An inventory that counts only shared HTTP servers misses the filesystem, shell or browser tools that run as child processes in the agent’s pod.

## What are the main MCP security risks?

Seven risks come up most often. MCP inherits the usual API risks and adds its own, because the consumer of a tool is a model that reads text and acts on it.

![Seven MCP security risks mapped to where they occur: at the agent, on the connection, at the MCP server, and across all three](https://www.tigera.io/app/uploads/2026/12/mcp-security-risks-map.png)Figure 1. Seven MCP security risks and where they occur. Two arise at the agent, two on the connection and two at the server. The seventh, a missing audit trail, spans all of them.

- Too many tools: a server often offers its full tool list to each caller

- Static, shared credentials: [more than half of open source MCP servers rely on long-lived API keys or personal access tokens](https://astrix.security/learn/blog/state-of-mcp-server-security-2025/)

- Tool poisoning: [instructions hidden in tool descriptions](https://invariantlabs.ai/blog/mcp-security-notification), visible to models but not users, which a server can change after approval

- Token passthrough: a server accepts a token not issued for it and forwards it downstream, which [MCP’s guidance calls an anti-pattern](https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices)

- Unvetted and shadow servers: community servers installed in minutes and reviewed by nobody

- Injection through tool results: a retrieved ticket, web page or document can carry instructions the model follows

- No audit trail: no record of which agent called which tool, with which arguments, for which user

[The OWASP MCP Top 10](https://owasp.org/www-project-mcp-top-10/), in beta at the time of writing, covers the same ground.

## Why are tool descriptions and tool results untrusted input?

Because a model cannot reliably separate data from instructions, and MCP places two kinds of third-party text in its context. Tool descriptions are loaded so the model can decide when to use a tool. Tool results return to the model after each call.

Review helps. Read descriptions before approving a server, pin the version, and treat a changed description as a change that needs approval.

Review cannot be the only defense, because injected text can arrive in a tool result at any time. The dependable backstop is authorization that does not rely on the model’s judgment. If the agent is not permitted to call `export_customers`, the call is denied and recorded however persuasive the injected instruction was.

## What does the MCP specification require, and what does it leave to you?

The specification is strict where it applies, but authorization itself is optional. Where a server implements it over HTTP, the server [acts as an OAuth 2.1 resource server](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization), must validate that each token was issued for it, and must not accept or transit other tokens. Servers must also validate tool inputs, implement access controls and rate limit invocations.

Three gaps remain for anyone running agents in production:

- Many servers skip authorization, and a server without it trusts any caller that can reach it

- Scopes are coarse and local: a scope such as `crm.read` says nothing about which agent holds it, which arguments it passes or who it acts for

- Human confirmation of every call does not scale to autonomous agents, so policy has to make the check, and decide which few calls need a person

## Why is server-level access not enough?

A server is a bundle of tools with very different consequences, and granting the server grants all of them. A CRM server might expose `search_customers`, `get_customer`, `update_customer`, `export_customers` and `delete_customer`.

![Server-level MCP access gives an agent all tools on a server; tool-level policy allows, limits or denies each tool](https://www.tigera.io/app/uploads/2026/12/mcp-server-level-vs-tool-level-access.png)Figure 2. Server-level access versus tool-level access. With a server allow-list, the support agent can call all five CRM tools. With tool-level policy, each tool is allowed, limited by a condition or denied.

Suppose a support agent reads a ticket containing an injected instruction to export the customer list. With server-level access the call succeeds, using a legitimate credential over an approved connection. With tool-level policy it is denied, and the denial can be the first signal that the agent has been manipulated.

Level
Example rule
What it still misses

Network
The agent’s pod may reach the server’s address
Everything inside the connection

Server
The support agent may use the CRM server
All tools on the server are available

Tool
The support agent may call `search_customers` and `get_customer`
Misuse of an allowed tool

Argument
`export_customers` only where region equals the agent’s own region
Who the request is for

User
`export_customers` only when acting for a user in finance
Requires delegated identity

Each level asks more of the enforcement point: tool rules need the request body read, argument rules need it parsed, and user rules need agent identity that carries the user. Argument rules are best treated as a second layer, because a caller can easily vary an argument value. The tool name and the server identity are the stronger controls. [Cedar policy for AI agents](https://www.tigera.io/learn/guides/ai-agent-security/cedar-policy-ai-agents/) shows working examples.

## Where do you enforce MCP policy?

Enforce it in three complementary places, with a gateway providing consistency.

- In the MCP server: it must validate inputs and enforce its own access controls, but you do not control the code of servers you did not write

- In the agent: a framework can restrict which tools the model is offered, but that fails with the agent if the agent is compromised

- At a gateway: one enforcement point identifies the caller, reads the tool name and arguments, asks for a policy decision and records the result

![An MCP tool call passing through a gateway: identify the caller, read the tool and arguments, decide by policy, record it](https://www.tigera.io/app/uploads/2026/12/mcp-tool-call-gateway-policy-check.png)Figure 3. An MCP tool call passing through a gateway. The gateway identifies the caller, reads the tool name and arguments, asks for a default-deny policy decision and records the result before the call reaches the server.

A gateway can apply one default-deny policy across servers, including those with no authorization of their own, and forward each call with a short-lived token for that server. Its limit is that it governs only routed calls. A local server started as a subprocess needs sandboxing and [kernel-level visibility](https://www.tigera.io/learn/guides/ai-agent-security/ebpf-ai-agent-security/).

## How do you roll out MCP security?

Start with visibility, close the widest gaps first, and keep the finest-grained rules for the tools that warrant them.

- Inventory MCP servers, including local ones launched from agent configuration, with owner and authentication method

- Keep an approved list, pin versions and review tool descriptions on each change

- Route remote servers through one enforcement point and block direct connections from agent workloads

- Give each agent its own identity and replace shared server keys with short-lived credentials

- Turn on default deny per server, then narrow to individual tools, then add argument and user conditions for high-risk tools

- Record the agent, user, tool, argument names and decision for each call, and sandbox what the gateway cannot see

## Frequently asked questions

### Is MCP secure by default?

No. Authorization is optional in the specification, and many servers ship without it or rely on static API keys. The protocol defines how tools are described and called. Deciding who may call them, and enforcing that decision, is left to the organization deploying it.

### Does MCP require OAuth?

No. Authorization is optional. When a server implements it over HTTP, the specification bases it on OAuth 2.1 and requires tokens to be issued for that specific server. Local servers using the stdio transport take credentials from their environment.

### How do you vet an MCP server before approving it?

Check who publishes it and whether the source is available, which transport it uses, which tools it exposes and what each description says. Then check which credentials it needs, whether it validates and forwards tokens, and which systems it connects to. Pin a version and re-review when the tool list changes.

### How do you secure local MCP servers?

A local server started over stdio does not cross the network, so gateways and OAuth do not apply. Control it at the workload: approve which servers may be installed, limit which executables an agent may start and which destinations those processes may reach, and watch for unexpected processes.

## How Lynx approaches this

In Lynx by Tigera, a registered MCP server is reached through the Lynx gateway, and a default-deny Cedar policy is evaluated on each request. The policy context carries the JSON-RPC method, the tool name and arguments, the resource URI, the prompt name and, when the client sends one, the session ID, so a policy can allow one tool on a server and forbid the rest, or block a single resource or prompt. Malformed request parameters or oversized tool arguments are denied, not evaluated on partial data.

By default the gateway replaces the caller’s credential with a token that expires in minutes and is addressed to that MCP server, which the server can validate against the gateway’s published keys. A server that needs the caller’s own token can opt in, and receives it only from a named identity provider with an accepted audience. The Agent Trail records the method, the tool and the argument names for each call. Argument values are not recorded. With events turned on, a call denied by policy also appears on the Events page.

A local MCP server started as a subprocess does not pass the gateway. For that case, a sandbox policy enforced with eBPF limits the executables a workload may launch, the files it may write and the destinations it may reach.

[Explore the AI agent security guides](https://www.tigera.io/learn/guides/ai-agent-security/) or [learn more about Lynx by Tigera](https://www.tigera.io/tigera-products/lynx/).

## Related guides

- [AI agent security: the complete guide (hub)](https://www.tigera.io/learn/guides/ai-agent-security/)

- [Agent gateway vs AI gateway vs MCP gateway: what is the difference?](https://www.tigera.io/learn/guides/ai-agent-security/agent-gateway-vs-ai-gateway-vs-mcp-gateway/)

- [Cedar policy for AI agents: how to write default-deny rules that scale](https://www.tigera.io/learn/guides/ai-agent-security/cedar-policy-ai-agents/)

Add Tigera as a preferred source on Google to see more of our content in your search results.

[![Add as a preferred source on Google](https://www.tigera.io/app/themes/tigera2021/dist/img/google-preferred-source-light.png)](https://www.google.com/preferences/source?q=tigera.io)

<!-- plugin=object-cache-pro client=phpredis metric#hits=6883 metric#misses=50 metric#hit-ratio=99.3 metric#bytes=3700616 metric#prefetches=419 metric#store-reads=28 metric#store-writes=9 metric#store-hits=426 metric#store-misses=39 metric#sql-queries=25 metric#ms-total=536.26 metric#ms-cache=16.51 metric#ms-cache-avg=0.4586 metric#ms-cache-ratio=3.1 -->
