All insights

MCP security monitoring starts before the server registry

MCP governance fails if agents can reach tools outside the approved path. Effective control begins with traffic discovery, then joins tool policy, protected credentials and audit evidence.

By Cloudex Research Desk, AI Systems Practice, Cloudex Technologies

Key takeaways

  • An MCP server registry is not an enforcement boundary when clients can connect directly to unregistered servers or bypass an approved gateway.
  • Protocol headers are strong positive signals for remote MCP traffic, but their absence does not exclude legacy, local or nonconforming MCP use.
  • MCP access control must decide on the tool and requested action, not merely the destination server.
  • Keeping OAuth grants and API keys out of the agent reduces credential exposure and makes policy enforcement easier to audit.
  • A useful audit event joins agent identity, tool, arguments policy, credential reference, route, verdict and outcome without logging raw secrets.

A registry cannot govern traffic that goes around it

MCP security monitoring must answer a network question before it answers a catalogue question: which agent traffic is actually using MCP, and did it follow the approved path? A server registry records intent. It does not prove that an employee, client or autonomous process used the registered endpoint.

A remote MCP connection can resemble an ordinary HTTPS API call. MCP does not require a predictable hostname or a /mcp path, so URL matching alone produces both misses and false positives. Cloudflare distinguishes two cases: shadow MCP reaches a server the organisation has not approved, while portal bypass reaches an approved upstream server directly and skips the governed path (Cloudflare, 2026). Those are different incidents and need different responses.

This makes the minimum control loop broader than a registry:

  1. Detect remote MCP traffic on managed network paths.
  2. Compare the destination and route with approved policy.
  3. Authorise the particular tool operation before execution.
  4. Supply credentials without exposing them to the agent.
  5. Join identity, route, decision and outcome into an audit event.

A registry still matters. It provides ownership, approval state and an expected route. It becomes governance only when network and server controls can detect or reject connections around it. This extends the egress boundary discussed in our analysis of AI agent evaluation security: an allowlist is evidence only when bypass is observable.

MCP security monitoring needs layered signals

The strongest current network signal is the protocol itself. For Streamable HTTP in MCP version 2026-07-28, every POST request must carry MCP-Protocol-Version. Tool requests include client metadata, use the tools/call method and reference a named tool with an input schema; tool names should be unique within each server, but clients aggregating servers must handle collisions (Cloudflare, 2026; MCP Tools specification). These fields let an inspecting control classify traffic and distinguish listing tools from invoking one.

Detection is still conditional. Cloudflare notes that older clients may omit the version header on their first request, versions before 2025-06-18 did not define it, and local stdio connections never cross the network. Off-network traffic, TLS flows excluded from inspection and custom or nonconforming transports are also blind spots (Cloudflare, 2026).

SignalWhat it can establishImportant limit
Hostname or path contains `mcp`A cheap discovery leadMisses ordinary URLs and can match unrelated services
JSON-RPC method such as `tools/call`The request resembles an MCP operationRequires body inspection and may expose sensitive arguments to the inspection layer
`MCP-Protocol-Version` headerA strong positive protocol indicatorMissing from some legacy, initial or nonconforming requests
Managed portal or gateway markerThe request followed an approved routeTrustworthy only if the upstream rejects direct access
Client-side hookServer, tool and arguments before transmissionCoverage depends on every client implementation
Server middlewareAuthenticated caller, parsed arguments and execution resultCovers only servers that implement the middleware

The practical detector therefore combines protocol headers, JSON-RPC structure, destination history, process or device identity, and route markers. A match should create an inventory record even when policy initially runs in observation mode. Teams can then classify the server owner, transport, tools and data sensitivity before blocking it.

There is no complete network-only inventory. The official security guidance treats local MCP servers as executable software on the user's machine and identifies malicious startup commands, insecure localhost services and insufficient sandboxing as attack paths (MCP Security Best Practices). Endpoint inventory and client telemetry must cover stdio; the secure web gateway cannot.

Server approval is too coarse for action control

A server can expose both low-risk reads and high-impact writes. Cisco gives a simple example: policy may permit a GitHub fetch while denying create_file against the same resource group (Cisco, 2026). Server-level allow or deny rules cannot represent that distinction.

MCP access control should evaluate at least these fields before the handler runs:

Policy inputQuestion answered
Authenticated identityWhich human, workload or agent initiated the request?
Agent owner and business purposeWho is accountable, and what task is approved?
Server and observed routeIs the destination approved, and did traffic follow the required path?
Method and tool nameWhich exact operation is being requested?
Argument classificationWhat data sensitivity and target environment are involved?
Impact tierCan the action read, write, delete, pay or administer?
Rate and cumulative scopeIs repetition increasing the request's total impact?
Confirmation requirementMust a human approve this action before execution?

The MCP tools specification says tools are model-controlled, meaning a model can discover and invoke them automatically. It also recommends a human's ability to deny invocations and confirmation prompts for operations (MCP Tools specification). That guidance is useful, but a prompt is not a universal control. Unattended workflows need deterministic policy at the server or gateway, especially for writes.

The authorisation specification provides transport-level OAuth controls, not a complete business authorisation model. It tells clients to request least-privilege scopes and requires servers to validate that tokens were issued for the intended MCP server (MCP Authorization specification). A valid audience and scope can establish access to a server. They do not establish that delete_customer, deploy_production or a particular transfer amount is appropriate now.

That last decision belongs beside the tool handler. Middleware should resolve the authenticated principal, evaluate the tool and normalised arguments, then allow, challenge or deny before side effects occur. For AI employees handling operational tasks, this policy should be part of the workflow design rather than an instruction in the model prompt.

Credentials should terminate at the control plane

Giving an agent a long-lived API key creates two problems. The secret can leak through logs, prompts, tool arguments or a compromised runtime. It also lets the agent call the upstream service outside the policy point.

Cisco describes an Agent Gateway design in which OAuth grants, tokens and API keys remain in a vault. The gateway injects the appropriate credential server-side according to the method and path, so the agent does not receive it (Cisco, 2026). This is a product design claim, not an MCP protocol requirement, but the pattern closes an important bypass.

The MCP specification reinforces the boundary from another direction. Clients must identify the target resource during OAuth, and servers must validate that an access token was issued for them. The security guidance explicitly forbids token passthrough, where a server accepts a token intended for another resource and forwards it downstream (MCP Security Best Practices).

A sound broker should therefore:

  • store credentials in a managed vault, not the agent configuration;
  • select a credential only after the action policy allows the request;
  • bind it to the intended audience, user or workload, and minimum scope;
  • prefer short-lived tokens and record a non-secret credential reference;
  • prevent direct upstream access that would avoid the broker;
  • redact tokens, cookies and sensitive arguments from logs.

This architecture does not remove OAuth risk. The official guidance documents confused-deputy, server-side request forgery and malicious authorisation URL cases. It recommends controls including exact redirect validation, per-client consent, HTTPS, private-address blocking and controlled egress (MCP Security Best Practices). Credential injection is one layer, not a substitute for correct authorisation.

One audit event should reconstruct one decision

Agent investigations fail when evidence is split across the client, proxy, MCP server and downstream SaaS audit log. A useful MCP event needs correlation, not merely more logging. Cisco's proposed event joins agent identity, resource, policy verdict, credential reference and route (Cisco, 2026). The server should add the tool, policy version, execution result and downstream request identifier.

A practical event schema includes:

  • event and trace identifiers;
  • timestamp and protocol version;
  • human, device, workload and agent identities;
  • client name and version where available;
  • destination server, approved registry entry and observed route;
  • method, tool name and risk tier;
  • redacted or classified arguments, plus a stable hash where appropriate;
  • policy version, matched rule and allow, challenge or deny verdict;
  • non-secret credential reference and granted scope;
  • server outcome, latency and downstream correlation ID.

Raw prompts, tool arguments and results can contain source code, customer records or credentials. Logging all of them creates a second sensitive data store. Record the minimum needed to reconstruct the decision, protect the log separately, and define retention by data class.

The MCP specifications cited here do not define an audit-event schema. The field set above is therefore an implementation pattern, and teams should validate it against their own incident-reconstruction tests. Teams building custom AI integrations should test whether their events can answer concrete incident questions before treating log volume as coverage.

What to do before enforcing MCP policy

Start with a time-boxed observation period on managed devices and server egress. Inventory detected destinations, users, clients, methods and routes. Add endpoint discovery for local stdio processes. Do not interpret a quiet gateway dashboard as proof that no MCP exists.

Then run five tests against the proposed control loop:

  1. Connect an approved client directly to an approved upstream server. The origin or network should reject the bypass.
  2. Connect to an unapproved server at an ordinary HTTPS path. Detection should not depend on mcp appearing in the URL.
  3. Allow a read tool and deny a write tool on the same server. The denial must occur before the handler executes.
  4. Inspect the agent process and logs. No reusable upstream credential should be present.
  5. Reconstruct each attempt from one correlated event without exposing a token or raw sensitive payload.

Move from observation to blocking only after known clients, legacy versions and required exceptions are mapped. Keep an exception owner, reason and expiry date. Measure unknown destinations, direct-path attempts, denied high-risk tools, credential exposure findings and audit reconstruction success.

The decision is not whether to buy an MCP registry. It is whether the organisation can observe and constrain the full path from agent intent to downstream effect. Run the five tests on one real workflow first; the failed test will identify the next control to implement.

Frequently asked questions

What is MCP security monitoring?

MCP security monitoring is the detection and correlation of Model Context Protocol activity across clients, networks, gateways and servers. It should identify the user or agent, destination, route, method, tool, policy decision and outcome. Network monitoring covers remote traffic on inspected paths, while endpoint or client telemetry is needed for local stdio servers.

Why is an MCP server registry not enough?

A registry records which servers are approved, but it does not force clients to use them. An employee or agent may connect to an unapproved server, or call an approved upstream server directly and bypass its gateway. Governance therefore needs traffic detection, an enforceable approved route, origin-side rejection of direct access and tool-level authorisation.

How can a network detect shadow MCP servers?

Use layered signals: the MCP protocol-version header, JSON-RPC methods such as tools/call, destination history, client or device identity and approved-route markers. Hostnames and paths containing mcp are only discovery hints. Legacy, local stdio, off-network and nonconforming traffic require endpoint, client or server telemetry because a network gateway may not see them.

What should MCP access control authorise?

MCP access control should authorise the exact tool operation, not only the server connection. A decision should consider the authenticated principal, agent owner, route, method, tool, arguments, target environment, risk tier, rate and need for human confirmation. OAuth scopes and token audiences remain necessary, but they do not replace action-specific business policy.

Sources

  1. 1How Cloudflare detects MCP traffic and helps secure itCloudflare · 14 Aug 2026
  2. 2Extending Zero Trust Across the Agentic AI WorkflowCisco · 3 Jun 2026
  3. 3AuthorizationModel Context Protocol · 28 Jul 2026
  4. 4Security Best PracticesModel Context Protocol · 28 Jul 2026
  5. 5ToolsModel Context Protocol · 28 Jul 2026
Cloudex Research Desk
AI Systems Practice, Cloudex Technologies

The Cloudex Research Desk tracks primary sources across AI research, model releases and production tooling, and publishes analysis reviewed against those sources before it goes live. Every claim links to where it came from.

Thinking about applying this in your business?

Cloudex designs and ships AI employees, custom software, and growth systems for teams that need the theory turned into something that runs in production.

Start a conversation