How to vet an MCP server before connecting it

Eight checks to make by hand before you connect an MCP server to Claude Code or any other agent — and which of them RepoGates answers first.

The short answer. To vet an MCP server, find the source repository it declares, check who owns it and since when, read the command that launches it, pin its version, match a remote server's host to the vendor, and list the secrets it asks for. A local server runs as you every time a session starts; a remote one receives every tool call your agent sends it.

Last reviewed , against Anthropic's Claude Code documentation linked below. For what a malicious server is and how one reaches you, read What is a malicious MCP server?

Why vet it before you connect it

An MCP server is a program your AI agent calls for tools. A local server's launch line — npx, uvx, docker run or a binary — runs as you every time a session starts, with your files and credentials in reach. A remote server is an endpoint someone else runs. Either kind writes tool names, descriptions and results into your agent's context. Anthropic's advice is to "verify you trust each server before connecting it" (Claude Code MCP).

How to vet an MCP server: eight checks

  1. Find the source repository. Find the source repository the MCP server's listing declares. A server with no repository has no code you can read, so you are trusting the listing's word.
  2. Check who owns the repository, and since when. Read the repository owner's Joined date before the README. An account and a repository created in the same month is the shape the FakeGit campaign used.
  3. Read the launch line. Read the command that starts the server, because it runs as you every time a session starts. A curl or wget piped into sh, bash or node runs whatever that URL serves that day — the shape check C20 looks for.
  4. Pin the version. Pin the package version in the launch line — npx -y @scope/server@1.2.3 or uvx server==1.2.3 — so a new release cannot change what starts. A launch line with no version starts whatever the latest release is, every session.
  5. For a remote server, match the host to the vendor. Match the URL against the vendor's own website and documentation before you give it a token. A lookalike domain with a working endpoint is cheap, and a remote server receives every tool call your agent makes to it.
  6. List the secrets it asks for. List every environment variable and header the server asks for, and give it a token made for that one job rather than your own broad credentials.
  7. Do not run a README's install steps verbatim. A ZIP link in the install instructions of a supposed MCP server was the delivery path in 211 FakeGit repositories.
  8. Add it at the narrowest scope Claude Code offers. In Claude Code, a server added at local scope, the default, "loads only in the project where you added it"; user scope makes it available in every project on your machine. A repository's .mcp.json servers wait for your approval one by one in an interactive session, but a claude -p run does not show that prompt (Claude Code MCP; what runs before you trust a folder).

What the official registry tells you, and what it does not

A listing in the official MCP registry is not a review. In our census of 5–6 October 2026, 27.0% of the registry's 39,653 servers declared no source repository and 57.7% were remote-only, so there was no code to read. Publishing there says who registered a name, not what the server does.

Where RepoGates does a step for you

What it covers, and what it cannot

Nothing RepoGates does observes what a server does once it runs. It reads the registry's record and the repository, never a remote server's behaviour, and a remote-only server has no code in the picture at all.

The plugin's hook sees Bash tool calls in Claude Code and nothing else: it does not see a command you type in your own terminal or one another agent runs. Edit and Write are read for one thing only — an API key about to be saved — checked on the machine and never sent; that guard asks, it never denies. It does not see a server added by editing a configuration file, or through the /mcp menu. The browser extension does not see git clone, package managers or curl — outside Claude Code with the RepoGates plugin, whose hook refuses a clone or install that names a blocked repository on the command line, before it runs. The MCP server is a check an agent can be told to call; an agent that never calls it is not stopped.

Questions

Are MCP servers safe to install? Nobody can promise that of a server. A local MCP server is a program that runs with your permissions every time a session starts, and a remote one receives every tool call your agent sends it. What you can check before you connect one is its source, its owner, its launch line, its version, its host and the secrets it asks for.

Is a server in the official MCP registry vetted? A listing is not a review. In the RepoGates census of 5–6 October 2026, 27.0% of the registry's 39,653 servers declared no source repository and 57.7% were remote-only, so there was no code to read.

Can RepoGates tell me an MCP server is safe? No, and nothing honest can. It scores a server listed in the official MCP registry on ten checks and the repository behind a server on 22, through the MCP server and the Claude Code plugin. It reads the registry's record and the repository, never the server's code at runtime, and it does not observe what a server does once it runs.

Set up the Claude Code plugin Connect your AI agents Plans

The registry checks, the repository checks and the plugin run on the paid plans. Numbers on this page: the RepoGates census of the official MCP registry, 5–6 October 2026; Island's FakeGit analysis, 20 July 2026.

Checking a skill or a Claude Code plugin rather than a server? Read how to check a Claude Code skill is safe before installing it. Installing an npm package or a VS Code extension? Read the pre-install checklist.