All writing

Review MCP servers for tool boundaries and credential risks

Published

A practical MCP server review method based on protocol boundaries, authority, schemas, credentials, and safe defaults.

Start an MCP server review with authority, not tool names.

Ask two questions:

  1. What information does this server need?
  2. What actions can this server perform?

If the answer is "all model context" or "every action in the upstream API," the server has too much authority.

This review uses version 2025-06-18 of the Model Context Protocol (MCP) specification. The architecture defines a host that manages consent and policy. Each client keeps one isolated connection to one server. A server should receive only the context that it needs, and it should not see other servers or the full conversation.

Separate context from action

MCP primitives have different risk profiles:

PrimitivePurposePrimary risk
ResourceProvides context such as files or application stateExposes too much data
PromptProvides a reusable interaction templateIntroduces unsafe instructions or resource references
ToolPerforms an external actionChanges state or sends data without proper authority
SamplingRequests model output through the clientProduces output that the user did not intend
ElicitationRequests structured information from the userCollects sensitive or unnecessary data

Do not combine these paths behind an interface that only says the agent can "do stuff." Use specific names, narrow descriptions, explicit schemas, and separate read operations from write operations.

Check every tool beyond its schema

MCP tools are model-controlled. The model can discover and call a tool from its context. A valid JSON Schema does not make the operation safe.

Check each tool as follows:

The MCP tools specification assigns related duties to both sides. Servers validate inputs, enforce access control, rate-limit calls, and sanitize outputs. Clients show tool inputs, validate results, apply timeouts, log use, and request confirmation for sensitive operations.

Keep credentials inside their trust boundary

For HTTP transports, the MCP authorization specification builds on OAuth. The client sends access tokens in the Authorization header. It must not put tokens in a query string.

The server must validate that a token was issued for that MCP server. It must not accept a token for another resource and pass that token to a downstream API. The MCP security guidance calls this token passthrough and forbids it because it breaks the trust boundary.

Use this authorization design instead:

A server that forwards any token can bypass rate limits and validation. It can also lose accountability and make incident analysis harder.

Parse and authorize every resource URI

A resource URI must identify one resource. The server must not reinterpret the same string as another file, tenant, branch, database, or internal endpoint.

For each resource:

This control matters because a resource can become context for a later tool call. Excess context can therefore lead to excess action.

Treat prompts and sampling as trust boundaries

Prompt arguments are user input, not trusted configuration. Validate prompt inputs and outputs. Prevent prompt injection and unauthorized resource access.

Sampling lets a server request model output through the client. The client should let the user inspect and edit the prompt when the risk requires it. The user should also review the generated response before the client delivers it to an external system.

Ask one direct question: Can this server cause the model to say or do something that the user did not request? If it can, add review controls, capability limits, and logs.

Do not request secrets through elicitation

Elicitation lets the server request missing structured information. The MCP specification says that servers must not use elicitation to request sensitive information.

Use elicitation for low-risk workflow choices. Use an authorization flow, local configuration, or a secret manager for credentials and other sensitive values. Show which server asks for the information, and let the user decline or cancel the request.

Publish the method, not private findings

When a review comes from private code, do not publish details that identify the system. These details include repository names, vendors, endpoint paths, payloads, screenshots, tokens, exploit strings, and issue counts. Do not imply that a third party has a vulnerability.

You can publish the review method:

  1. Draw the host, client, and server boundaries.
  2. List each tool, resource, prompt, sampling path, and elicitation path.
  3. Mark each path as read-only, write-capable, credential-bearing, or user-facing.
  4. Check schemas and server-side validation.
  5. Check token audience, scope, and downstream handling.
  6. Check URI parsing and resource authorization.
  7. Check user confirmation for sensitive actions.
  8. Check logs, timeouts, and rate limits.
  9. State what the server must never be able to do.

That final statement defines the server's authority. A safe MCP server has a focused job and a small authority surface.

Sources