Greymatter.ioGreymatter.io
Start for Free
Greymatter.ioGreymatter.io Why Greymatter.io?
Pricing Start for Free
Learn
Resources/Blog

MCP security explained

What is MCP security?

The Model Context Protocol gives an AI agent a standard way to use tools. MCP security checks each tool call before the tool acts.

By Greymatter.io10 min read

The short answer

MCP security is the set of controls on the tool calls that AI agents make with the Model Context Protocol (MCP). A control verifies who sent each tool call and decides which tools that caller can see and call. It inspects the arguments and the results, and it records each call.

What does MCP security mean?

An AI agent is software that uses a model to choose its next step and then takes that step. Many of those steps are tool calls. A tool call can read a file, query a database, send a message, or change a record.

MCP security puts a control on those tool calls. The control runs in the data path, which is the route that each call takes. It sees each MCP message, decides what happens to it, and records the result.

The term covers three things:

  • MCP server security. Each server that offers tools accepts only verified callers.
  • Tool access. Each agent sees and calls only the tools that its role allows.
  • MCP tool call inspection. A control reads the content of each call and each result.

MCP security is one part of AI runtime security, which covers model calls, tool calls, and calls between agents.

What is the Model Context Protocol?

The Model Context Protocol (MCP) is an open protocol that connects AI agents to tools and data. A tool owner runs an MCP server. An agent asks the server which tools it offers and then calls them.

MCP messages use the JSON-RPC format. Each message names a method. The tools/list method asks a server for its tools. The server answers with a name, a description, and an argument schema for each tool. The tools/call method runs one tool with a set of arguments, and the server returns a result.

The model reads the tool descriptions and the tool results. It uses that text to choose its next step. This design makes tools easy to add. It also means that text from a tool server can change what an agent does.

What can go wrong with MCP tools?

An agent with tool access can delete data, write data, or run a command. Every MCP server is one more place that can act. Six problems show why each tool call needs a check.

Injected instructions in tool results

A tool returns text from a web page, a document, or a database row. An attacker hides instructions in that text. The model reads the result and follows the attacker’s instructions. This attack is prompt injection through a tool.

Tool poisoning

An attacker hides instructions in the description of a tool. The model reads the description when it chooses a tool. The agent then follows instructions that no person approved.

Tools outside the agent's role

An agent that can reach many tools can call any of them. One injected instruction can make the agent delete a record, send a message, or move data.

Sensitive data in arguments and results

An agent can put personal or business data into a tool argument. A tool can also return data that the caller has no right to see.

No verified caller

Many agents reach a tool server with one shared key. A key proves only that the caller holds it. The tool server sees the agent, and the name of the person is lost.

No record

Each tool server logs what it chooses. After an incident, the team has no single place that shows who asked for a tool call and what the tool returned.

Each problem appears in a live tool call. A control in the data path sees that call at the moment it happens.

What does a control check on each MCP tool call?

A control for MCP traffic does four jobs on every tool call: identity, tool access, inspection, and record.

Identity: who sent the call?

The control verifies the person and the agent behind each tool call. Proof is a credential that the control can test, such as a certificate or a signed token.

Tool access: may this caller use this tool?

The control compares the tool with the role of the caller. A tool outside the role stays hidden, and a call to it is refused.

Inspection: what does the call carry?

The control reads the method, the tool name, the arguments, and the result. It reports or blocks attacks, and it finds sensitive data in both directions.

Record: what happened?

The control writes a record for each tool call. The record names the caller, the tool, and the decision.

Identity comes first, because the other three jobs depend on it. Tool access needs a verified role. An inspection finding needs a caller to name. A record with no identity names no one.

For example, a support agent receives a question from a person. The agent asks an MCP server for its tools and then calls an order lookup tool. The control verifies the person and the agent. It shows the agent only the tools for the support role, reads the tool arguments and the result, and writes a record.

What does an MCP gateway do?

An MCP gateway is a control point between AI agents and MCP servers. It decides which tools each caller can see and call, and it records each call. Some products call it an MCP router or an MCP proxy.

An MCP gateway gives agents one address for many tool servers. The agent connects to the gateway, and the gateway connects to the servers. A team then has one place to approve tool servers, grant tools to roles, and read the record.

Tool lists matter as much as tool calls. A model plans its work from the tools that it can see. When a gateway shows each role only its own tools, the model never plans around a tool that the role cannot use.

How is MCP different from A2A?

MCP connects an agent to tools. The Agent2Agent (A2A) protocol connects an agent to other agents. When one agent delegates work to another agent, that call uses A2A.

The two protocols carry different content. An MCP tool call carries a tool name, arguments, and a result. An A2A call carries instructions and the data behind them. An agent often uses both protocols to finish one task, so both kinds of call need the same four jobs. Read What is A2A security? for the controls on calls between agents.

Where does an MCP security control run?

Many teams put AI controls in one gateway at the network edge. That gateway sees the calls that cross the edge. Agents and MCP servers often run inside the network. A tool call from an agent to an MCP server inside the network never reaches the edge.

An MCP security control runs next to each agent and each MCP server. In that place, the control sees every tool call, including the calls that stay inside the network. It also knows the verified caller, because the same control checks identity.

How does MCP security relate to Zero Trust?

Zero Trust removes the trust that comes from network location. Every request must prove who sent it and must pass a policy check, every time. MCP security applies that rule to tool calls.

An MCP server gets no trust from its place in the network, and an agent gets none either. One approved tool call gives the agent no standing access to the next tool. Each call gets an identity check, a policy check, encryption, and a record.

Encryption protects the tool call between the agent and the server. An MCP tool call can carry credentials, queries, and the records that the tool returns. An attacker who records that traffic today can decrypt it later, unless the key exchange is post-quantum. Read What is post-quantum encryption? for that part of the path.

Related explainer

The same rule for models, agents, and tools

Zero Trust for AI gives no model, agent, or tool trust from its place in the network. Read What is Zero Trust for AI?

How does Greymatter secure MCP traffic?

Greymatter is a Zero Trust runtime security platform. It moves security controls into the live data path, closest to the resource. When your AI agents and MCP tool servers run on Greymatter, a Greymatter agent runs beside each one. Your agents and your tool servers stay as they are.

Teams turn on blocking in steps. Every check starts in detect mode. Greymatter records each finding and marks what it would block, and all traffic continues. Your team turns on enforcement one check at a time.

What Greymatter adds

The four jobs in Greymatter

Each job of an MCP security control maps to a part of the platform.

Identity

Identity gives each AI agent its own workload identity. Greymatter has AI agents sign in with the login you already use. The MCP Router sends the verified person to the tool server, and tool servers never receive the user’s login.

Tool access

The MCP Router in the App, API & AI Gateway puts many tool servers behind one address. It grants tools from the roles on the verified token. Tools outside an agent’s role never appear to it, and the router refuses a call to any other tool.

Inspection

With MCP inspection on, AI Guardrails reads the method, the tool, and every argument of each tool call. An injection hidden in one argument still gets caught. Guardrails and data loss prevention (DLP) also read tool results.

Record

Forensic Auditing records AI model and tool requests. Every MCP call names the verified person. MCP records add the tool, the roles, and the decision.

Greymatter enforces the lists that your team owns:

  • An allow list and a deny list of tools.
  • A list of the MCP methods that an AI agent may call.
  • A list of the remote MCP servers that traffic may reach.
  • The declared schema of the arguments for each tool.

A blocked call gets a JSON-RPC error with the rule number, so the agent gets an error it understands. Greymatter also reads streamed MCP calls. In the MCP Router, a call limit for each person and each tool stops an agent that loops.

Encryption is on by default. Each MCP tool call between workloads on Greymatter travels between two Greymatter agents over mutual TLS. Every Greymatter agent offers a post-quantum key exchange first.

Read more in the AI & Agent Control use case.

Greymatter runs on
  • Kubernetes
  • OpenShift
  • RKE2
  • k3s
  • k0s
  • Fully offline networks

What does the record of an MCP tool call show?

Every MCP call in the Greymatter record names the verified person. MCP records add the tool, the roles, and the decision. The record also shows any alerts for that request.

Records tie the actions of an AI agent to that agent and to the person it acted for. That includes work that the agent finishes after its reply. Your team can search the records by person, agent, or request.

What the record shows

Who
The verified person and the agent
Tool
The tool that the agent called
Roles
The roles on the call
Decision
What Greymatter decided
Alerts
What inspection found

MCP security is one rule: verify, inspect, and record every tool call before the tool acts. Greymatter runs those checks in the live data path, closest to the resource.

See it running on your own infrastructure.

Reading is a start. A walkthrough with our team shows what Greymatter does in your environment.

Speak with a Greymatter.io Expert Start for Free How to Buy →

Additional resources

All Resources
Blog
By Greymatter.io
Blog · Dec 2, 2026What is A2A security?
Blog
By Greymatter.io
Blog · Nov 29, 2026What is AI runtime security?
Whitepaper
Download
Whitepaper · Nov 12, 2026Guardrails and DLP: Inspect Prompts, Tool Calls, and Answers Where They Run