MCP security checklist: what to verify before connecting an AI agent
Evaluate local and remote MCP servers with a practical admission checklist covering credentials, tool permissions, prompt injection, network access, and revocation.
Sources are linked in the guide. Read our editorial policy.
On this page 6 sections
Treat an MCP server as an integration with executable capabilities and access to data, not as a harmless prompt extension. Before connecting one, identify who operates it, what credentials it receives, what the agent can do through it, and how to revoke that access. Start with a narrow, read-only use case and expand only after verifying the boundary.
The MCP security guidance covers concrete risks including token passthrough, confused-deputy authorization, and server-side request forgery. OWASP’s MCP Top 10 adds a useful threat inventory, including tool poisoning, supply-chain compromise, and excessive permissions. The OWASP page describes its roadmap as beta/pilot; it is a risk reference, not a certification.
Distinguish three trust boundaries
A local standard-input/output server runs as a subprocess. Its filesystem, environment, and network access depend on the operating-system account and isolation you give it. “Local” does not mean sandboxed.
A remote server runs elsewhere and may receive prompts, query arguments, document contents, and credentials. Check its operator and retention policy before sending sensitive data.
In both cases, the model receives tool descriptions and results. A malicious instruction inside a returned document can influence later actions. Authentication proves something about an identity; it does not make all returned text trustworthy.
The MCP tools specification recommends keeping humans able to deny tool invocations. The actual confirmation experience still depends on the client implementation.
Use this admission checklist
This checklist is a practical review aid, not proof of complete security. Collect answers for the exact client and server versions you will deploy.
| Gate | Evidence to collect | Do not connect yet if… |
|---|---|---|
| Identity | Official repository or endpoint, operator, pinned package version | The publisher or executable cannot be established |
| Runtime access | Account, mounted directories, environment variables, network destinations | A small integration requires unrestricted host access |
| Data | Fields sent, storage location, retention, deletion terms | Sensitive data handling is unknown |
| Credentials | Token audience, scopes, expiry, storage, revocation path | A personal administrator token is the only proposed option |
| Tools | Actual exposed tool list and allowed resources | Read-only intent coexists with unnecessary write capabilities |
| Approval | Visible tool arguments and meaningful confirmation for risky actions | The client approves everything silently |
| Operations | Owner, upgrade process, sanitized audit records, disable procedure | Nobody can investigate or revoke the integration |
A pinned version improves repeatability; it does not prove the package is safe. Review the source and dependency provenance appropriate to your risk level, and deliberately review updates rather than forgetting the integration after installation.
A worked boundary: repository issue search
Imagine an agent that needs to summarize issues in one repository. It does not need permission to push code, modify organization settings, or read every private repository.
Define the boundary before choosing a server:
- Use a dedicated identity or appropriately scoped credential for the selected repository.
- Expose only the issue-reading tools required for the task, where the client supports tool selection.
- Enforce repository restrictions on the server or upstream account. A prompt saying “only this repository” is not authorization.
- Keep unrelated credentials out of the local server’s environment. Restrict filesystem and network access using the deployment’s actual sandbox controls.
- Inspect the tool arguments and returned fields for unnecessary personal or confidential data.
A nominally read-only connector can still leak information. Once an agent reads private issues, another available tool might send their contents to an external destination. Review the combined workflow, not just each connector in isolation.
For remote HTTP servers, inspect authorization
The MCP security guidance explicitly forbids accepting tokens that were not issued for the MCP server. Do not solve integration friction by passing an unrelated downstream API token straight through as the MCP bearer token.
Ask the implementer how audience validation, issuer validation, expiry checks, and downstream credentials are handled. If the server proxies a third-party authorization flow, verify per-client consent instead of assuming an earlier upstream consent covers every new client.
OAuth discovery also creates a network boundary: metadata URLs and redirects can point somewhere unintended. The MCP guidance discusses blocking private-network and cloud-metadata destinations, validating redirects, and defending against DNS rebinding. Apply these controls to the deployment’s intended destinations; a generic URL parser alone is not a complete SSRF defense.
For local HTTP deployments, the 2025-06-18 transport specification explicitly calls for Origin validation and recommends localhost binding and authentication. Do not expose a development connector on all interfaces merely to make connection setup easier.
Exercise denial, not just successful connection
In an isolated test repository with disposable data, check that an allowed read works and an out-of-scope read is rejected. Attempt a write using the same restricted identity; rejection must come from enforced permissions, not the agent choosing to abstain.
Include a benign issue comment that asks the agent to perform an unrelated action. Confirm it is treated as document content, not authorization. Passing that example does not establish prompt-injection immunity; it exposes obvious gaps in the workflow.
Finally, revoke the credential, disconnect the server, and confirm the credential no longer permits a fresh protected request. Preserve enough sanitized information to identify the server, tool, account, and decision during an investigation. Do not store raw secrets in logs.
Keep security attached to the task
Use the coding-agent workflow to define which actions require approval, and the context diagnostics guide to keep retrieved data distinct from instructions. Local inference has separate resource and privacy considerations in the local-model guide. The coding directory can help find integrations; inclusion is not a security endorsement.
A successful connection is not proof that tools were advertised or admitted. Use the MCP connected-but-no-tools diagnostic to trace discovery separately from execution permission.
Research note: X search surfaced MCP security discussions, but direct thread access was blocked. The checklist is grounded in the linked protocol and OWASP documentation, not unverified thread claims.