← All articles

How to Choose and Vet an MCP Server Before You Connect It to Your AI Tools

· 5 min read

How to Choose and Vet an MCP Server Before You Connect It to Your AI Tools

This guide is for anyone about to add an MCP server to Claude, Cursor, VS Code or another AI app: developers, IT leads and owners of small businesses. It follows the OWASP MCP Security Cheat Sheet and gives you a checklist to run before you connect anything. If you are new to the protocol, start with our plain guide to [what MCP is](https://encoderbytes.com/Blog/what-is-mcp-model-context-protocol-guide).

Why vetting matters

An MCP server is a program that gives an AI app tools and data. OWASP says MCP introduces a new attack surface because AI agents execute tools based on natural language, with access to sensitive systems, and the model decides which tools to call, when, and with what parameters. It also notes that the model sees the tool descriptions from all connected servers in its context.

So a server is not just an install. It is code that runs, plus text that steers your AI. Both need checking.

The risks OWASP lists

The cheat sheet names these key risks:

- **Tool poisoning:** malicious instructions hidden in tool descriptions, parameter schemas or return values. - **Rug pull:** a server changes its tool definitions after you approved it. - **Tool shadowing:** one server's tool description manipulates how the agent uses tools from other, trusted servers. - **Confused deputy:** the server acts with its own broad privileges instead of the user's. - **Data exfiltration** through legitimate channels, such as a search query or email subject. - **Over-scoped tokens:** broad OAuth scopes such as full Gmail access instead of read-only. - **Supply chain attacks:** untrusted or compromised packages installed from public registries. - **Sandbox escapes:** local servers with full host access, enabling file traversal or credential theft.

Eight checks before you connect an MCP server: source, code, tools, scopes, sandbox, approval, changes, logs
The eight checks in this guide, based on OWASP's MCP Security Cheat Sheet.

Check 1 and 2: source and code

Only install servers from trusted, verified sources, and review the server's source code and tool definitions before installing. Prefer the official server from the vendor of the system you are connecting. OWASP specifically warns about typosquatting, where a near-identical package name is a common attack route, so copy the package name from the vendor's own documentation and compare it letter by letter.

Verify package integrity with checksums or signing where available, and scan the server's dependencies for known vulnerabilities. Open the repository and look at who maintains it, how recently it was updated, and whether others have reported problems.

Check 3: read the tools

OWASP advises inspecting all tool descriptions, parameter names, types and return schemas before approval, and treating the entire schema as a possible injection surface, not only the description field. It also suggests tools such as mcp-scan to detect poisoned descriptions and cross-server shadowing. We have not tested that tool for this article, so check its repository yourself before using it.

Check 4: narrow the access

Give each server the minimum permissions it needs, with its own credentials, never shared across servers. Ask for narrow OAuth scopes, for example mail.readonly instead of mail.modify. Prefer short-lived tokens over long-lived personal access tokens.

One OWASP point is worth remembering: enforce read-only access at the data source, with a read-only database role or API token, instead of trusting the tool to filter what the model asks for. The cheat sheet cites an advisory where a read-only mode that inspected each query let writes through. After you enable a read-only mode, confirm that a write is actually rejected.

Check 5: sandbox local servers

A local server can see whatever your user account can see. OWASP says to run local servers in a sandbox with minimal privileges, limit file access to the directories required, and turn off network access unless needed. It stresses that the stdio transport avoids a listening endpoint but does not restrict the process's file, network or credential access. For local servers that listen over HTTP, bind to localhost unless network access is truly needed.

Check 6: keep a human in the loop

Require explicit confirmation for destructive, financial or data-sharing operations. OWASP says to show the full tool-call parameters, not just a summary name, and never to auto-approve tool calls, especially with several servers. Where a tool can spend money, enforce spending limits in the component that makes payments, outside the model.

Check 7 and 8: watch for changes and keep logs

A rug pull only works if nobody notices a change. OWASP recommends pinning reviewed tool definitions with cryptographic hashes and requiring review when they change, hashing the complete definition, because a flipped hint flag can alter client approval behaviour with no visible change to the description. Re-prompt for consent when definitions change.

Log every tool invocation with full parameters, user context and timestamps, redact secrets and personal data, and alert on new tools being called or unusual call volumes.

Treat every tool response as untrusted data too, even from an approved server. A web page or email returned by a tool can carry hidden instructions; our guide to [prompt injection](https://encoderbytes.com/Blog/prompt-injection-explained-security-hole-in-every-ai-app) explains why.

A quick policy for a small team

1. Keep a written list of approved servers, who approved each, and the access each has. 2. Test a new server with dummy data and a throwaway account first. 3. Never let web content or untrusted data trigger a server installation, which OWASP lists under consent and installation security. 4. Remove servers nobody uses. 5. Review the list every quarter.

This is general security guidance, not a guarantee. Requirements differ by company and by the data you hold.

Sources

OWASP MCP Security Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/MCP_Security_Cheat_Sheet.html MCP security best practices (official docs): https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices MCP authorization specification: https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization OWASP cheat sheet source (GitHub): https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/MCP_Security_Cheat_Sheet.md

Frequently asked questions

Is it safe to install any MCP server?

No. OWASP advises installing only from trusted, verified sources and reviewing the code and tool definitions first, because a server runs code and its descriptions steer the AI.

What is a tool poisoning attack on MCP?

It is when malicious instructions are hidden in a tool's description, schema or return values so they manipulate the AI. OWASP lists it as a key MCP risk.

What is an MCP rug pull?

A server changes its tool definitions after you approved it. OWASP recommends pinning reviewed definitions with hashes and re-reviewing when they change.

Does using stdio make a local MCP server safe?

No. OWASP says stdio avoids a listening endpoint but does not restrict the server's file, network or credential access, so a sandbox is still needed.

Contact

Let's Discuss Your Project

Tell us what you are building. Every conversation is covered by a mutual NDA.

What happens next

  1. 1Our team contacts you within one business day
  2. 2An initial discussion to understand your requirements
  3. 3A scope assessment and proposal

We reply from info@encoderbytes.com.