MCP server security checklist: 10 checks before you connect one
Ten checks to run before an AI agent connects to an MCP server, from who publishes it to how you revoke it, built on the MCP specification and OWASP.
Before you connect an MCP server to an agent, find out who publishes it, whether it runs on your machine or on someone else's, which token it asks for and how narrow that token is, what its tool descriptions tell the model, and how you will switch it off. Connecting a server means giving a stranger's text and code a place inside your agent's decisions. These ten checks keep that place small.
The checks follow the security best practices and the authorization page of the Model Context Protocol specification, version 2025-11-25: security best practices. They apply to any client. Where a point is our own practice and not a spec rule, the text says so.
1. Who publishes it, and where did you get it?
Start with provenance. A server from the vendor of the service it talks to, installed from that vendor's own documentation, is a different risk from a package found through a search result or a list of "top MCP servers". Check that the repository and the package name belong to the same publisher, that the project is maintained, and that you can read the code.
This matters most for local servers. The spec describes attackers who put a malicious startup command in a client configuration, or who hide a payload inside the server itself. If a one-click install asks you to run a command, read the whole command first.
2. Does it run on your machine or on someone else's?
A local server (stdio transport) is a program on your computer. The spec says local servers have direct access to your system, and lists arbitrary code execution and data exfiltration among the risks. It also notes that servers run with the same privileges as the client. Prefer a sandbox, a container or a throwaway user account, with only the folders and network access the server needs.
A remote server (HTTP transport) is someone else's service. It cannot read your disk, but it receives everything the agent sends it, and you depend on how its operator handles tokens. The spec applies its authorization rules to HTTP servers.
Client code is part of this too. In 2025 the NVD recorded CVE-2025-6514: a proxy for connecting to remote servers was exposed to OS command injection when it connected to an untrusted server, through crafted input in the authorization_endpoint response URL. The record carries a CVSS 3.1 base score of 9.6, from a secondary scorer. The spec lists this class of attack under OAuth authorization URL validation. The lesson is that a malicious server can attack the client before any tool runs, so connect only servers you have vetted, and keep your client updated.
3. Does it follow the authorization rules?
For a remote server that uses OAuth, three rules from the spec are worth checking:
- Audience. The client sends an RFC 8707
resourceparameter naming the server, and the server must accept only tokens issued for itself. - No token passthrough. The spec says servers must not accept any tokens that were not explicitly issued for the MCP server, and must not pass the token they received on to an upstream API. A server that forwards your token is an open door to the service behind it.
- Consent that names the client and the scopes. A proxy server that fronts a third-party API must ask for your consent per client, and the consent page must show the scopes requested and where tokens will be sent.
Tokens are short-lived by design: the spec says authorization servers should issue short-lived access tokens, so a leaked token expires. For a local stdio server the spec says to read credentials from the environment instead. In that case the secret sits in your configuration, so give it its own key with its own limits, never a shared admin key.
4. Are the scopes the smallest that work?
The spec's scope minimization section warns about servers that publish every scope up front and clients that request them all, so that a stolen token reaches unrelated tools. It recommends a small initial scope, with more granted when a privileged action is first attempted.
When a consent screen lists something like files:* or admin:* for a task that needs to read one folder, decline and look for a narrower option. The same logic applies to a plain API key: create a read-only key first and add write access only when you need it. For how to sort tools into run, ask and never, see which AI agent actions should wait for a human.
5. What do the tool descriptions tell the model?
A tool's name and description are written by the server's author, and the model reads them. The spec says the description can be thought of as a hint to the model, and that tools are model-controlled: the model discovers and calls them from its own reading of the context. Text that the model reads from an outside source is the channel OWASP calls indirect prompt injection.
So read every description and parameter note before you approve. Look for sentences aimed at the model and not at you: instructions to call another tool first, to include a file or a secret in an argument, to hide something from the user, or to ignore earlier instructions. A description should say what the tool does and nothing else. Read tool results the same way, since they also arrive as text the model trusts.
6. Are you trusting its annotations?
MCP lets a server mark tools with annotations such as readOnlyHint and destructiveHint. The schema calls them hints, says they are not guaranteed to describe the tool faithfully, and says clients should never make tool use decisions based on annotations from untrusted servers. The tools page says the same in normative terms: clients must consider tool annotations untrusted unless they come from trusted servers.
In practice: a tool labeled read-only by a server you have not vetted is not read-only until you have checked. Do your own sorting, and let a label from the server lower your approval requirement only for a publisher you already trust.
7. What happens when the tool list changes?
A server that declares the listChanged capability may send notifications/tools/list_changed whenever its tools change, and the client then fetches the new list. The spec's session hijacking section describes the risk: a client could end up with tools that it was not aware were enabled.
Treat a changed list as a new connection. Approve the list you read, re-read any tool that was added or whose description changed, and make sure your client does not give new tools automatic permission. If your client cannot show you what changed, that is a reason to connect fewer servers.
8. Is the version pinned?
This one is our practice, not a spec rule. A command such as npx some-server@latest runs whatever the publisher shipped today. A pinned version runs what you reviewed. Pin an exact version or a commit, keep the lockfile, and update on purpose, after reading the changelog. For a remote server you cannot pin, so the tool list check above carries more weight.
9. What can it reach on the network?
Limit where a server can send data. For a local server, run it with no network access if it does not need any, or with an allowlist if it does. For a client that fetches URLs a server supplies, the spec's SSRF section recommends requiring HTTPS, blocking private and link-local address ranges (including the cloud metadata address), validating each redirect, and using an egress proxy for server-side deployments. A hosted client that connects to servers for you should do this on your behalf, so ask its operator whether it does.
An agent that holds private data, reads untrusted content and can send data out can be steered into leaking that data. Fewer outbound paths is a direct defense. The prompt injection guide covers this combination.
10. Do writes ask first, and how will you revoke it?
The spec says there should always be a human in the loop with the ability to deny tool invocations, and that clients should show tool inputs to the user before calling the server, to avoid malicious or accidental data exfiltration. Require approval for every tool that changes something, sends something or spends something, and read what the call will send.
Then plan the exit before you connect:
- Know where the grant lives (the authorization server's connected apps page, or an API key page) and revoke it there, not only in your client.
- Remove the server from your client configuration.
- Rotate any secret you placed in the server's environment, and check the service's activity log for what the server did.
- Delete the local files, container and cached credentials of a local server.
A short version to keep
- Publisher and source verified; code readable.
- Local server sandboxed, or remote server's operator trusted.
- Audience bound, no passthrough, consent shows client and scopes.
- Smallest scopes, key or token with its own limits.
- Descriptions and results read for instructions aimed at the model.
- Annotations treated as hints.
- Tool list changes reviewed before use.
- Version pinned.
- Network reach limited.
- Writes need approval; revocation steps written down.
Tenslo Bot connects to MCP servers only at public HTTPS addresses, so a connection cannot be pointed into a private network. Bots act without asking by default, and you choose per bot which tools and connectors wait for your approval. A run that has read outside text, such as a web page, an email or a webhook, asks before it acts.
Sources
- Security Best Practices, Model Context Protocol
- CVE-2025-6514, NIST National Vulnerability Database
- Authorization, Model Context Protocol
- Tools, Model Context Protocol
- Schema reference: ToolAnnotations, Model Context Protocol
- LLM01:2025 Prompt Injection, OWASP Gen AI Security Project