FalcyonSign in

How to check if an MCP server is safe

Updated

Treat a local MCP server like any other program you install, because it runs with the same privileges as the app that starts it. Find its source, check that your install command really runs that source, pin the version, and give it the least access that works.

Why it matters

The Model Context Protocol's own security guide warns that a harmful local server lets attackers run any command with the AI client's privileges. On most computers that includes your files, your saved logins and your network.

There is a second risk. Your assistant reads whatever the server returns, so text in a tool's description or its results can try to give your assistant new instructions.

Before you install

  1. Find the source code. If a local server has no public source, you are trusting its publisher completely.
  2. Read the command you were told to paste. A command such as npx some-package downloads and runs a package, so open that package's page and check that it links back to the repo you reviewed.
  3. Scan the repo, then read every high or critical finding yourself.
  4. Read the tool descriptions in the code. They should describe the tool. Text that tells the assistant to hide something, or to read unrelated files, is a red flag.
  5. List what it asks for. A weather server doesn't need your GitHub token.

Set it up with less risk

  • Pin an exact version, so an update can't change what runs without you noticing.
  • Create a new key just for this server, with the narrowest permissions and an expiry date.
  • Give it one folder, not your whole home directory.
  • Run it in a container if it doesn't need your machine.
  • Keep your assistant's approval prompts on for tools that write, send or delete.
A pinned version
npx -y some-mcp-server@1.4.2

Remote servers are different

A remote server runs on someone else's computer, so it can't run commands on yours directly. But it sees everything your assistant sends it, and its operator can change it at any time. A repo scan can't confirm what is really running there. What matters is who operates it and what you let it read.

Check a repo now

It's free and you don't need an account. How the score works

Sources

More guides