PTS security notes / Questions

Is an MCP server safe to install?

By PTS · Published December 5, 2026 · Docs checked December 5, 2026

Short answer

Only as safe as its code and the access you give it. A local MCP server is an ordinary program running as you, and the MCP project's own guide says to treat a third-party local server as untrusted code with exactly the privileges you hand it, and as few as possible.

What a local server can touch

Most local MCP servers use the stdio transport: your client launches the server as a child process. The MCP docs describe what that means (local server security). The process inherits your environment variables, can read anything your account can read, including SSH keys, cloud credentials and browser profiles, and can open outbound network connections anywhere. The protocol does not sandbox it. Your security decisions happen before launch: what you install and how you run it.

A remote server is a different case. One offered over Streamable HTTP runs no code on your machine. The MCP guide says to prefer the remote version where one exists, and to treat an unnecessary local install as a signal to ask why.

Six checks before you install

  1. Does it need to run locally at all? If it only wraps a web API, use the remote version if there is one.
  2. Who published it? Tie the package to a source repository and a real maintainer or organization, with recent, plausible activity. A registry listing is not an endorsement.
  3. Is the name exact? Typosquatting is the cheapest attack there is. Confirm the package matches what the docs name, not a lookalike.
  4. Is the version pinned? Install a specific version, not latest. Pinning an npx or uvx package fixes only the top-level package. Pinning a container image by digest (image@sha256:...) freezes the whole dependency tree.
  5. Did you read the tool list? Tool names and descriptions are text your model reads as instructions. If a description contains instructions unrelated to the tool's job, remove the server. The MCP Inspector lists every tool a server exposes without a model in the loop.
  6. Is the roster small? Every server shares the model's context, so each one you add widens the surface for all the others.

Why the tool list matters

The MCP docs name these threats. A version pin covers the last one, but not the first three:

The fix for drift is to pin the tool list and diff it. The free mcp_pin.py tool records every tool a stdio server advertises, then fails if a tool is added, removed or changed, annotations included:

bash
python3 mcp_pin.py pin   mcp-tools.lock.json -- npx -y some-mcp-server@1.2.3
python3 mcp_pin.py check mcp-tools.lock.json -- npx -y some-mcp-server@1.2.3

check exits 1 on any difference, so it works in CI or a pre-launch script. Read the diff before you re-pin. Prefer a browser? Paste two tools/list results into the free MCP tool-list diff checker.

Run it in a container

The MCP guide calls process isolation the single highest-leverage mitigation. A baseline: run third-party servers in a container with no volume mounts beyond what the server needs, no network unless it must have one, and each server's own narrowly scoped token passed through its per-server config. In a Claude Code .mcp.json, that looks like this:

json
{
  "mcpServers": {
    "project-files": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "--network=none",
        "--mount", "type=bind,src=/path/to/project,dst=/work,readonly",
        "example/files-server@sha256:<digest-you-checked>", "/work"
      ]
    }
  }
}

The image name is a placeholder. Swap in a server whose source you have read and whose digest you pinned. Stdio works unchanged through docker run -i.

What your client does for you

None of those checks proves a server is honest. They keep you in the loop while you decide.

Quick follow-ups

Are servers in a directory or registry safe?

Not automatically. The MCP docs say a listing is not an endorsement, and that even curated catalogs describe their vetting as best-effort: curation reduces risk, it does not take on accountability for what you run.

Is a remote MCP server safer than a local one?

It removes one risk, because no server code runs on your machine. It still sees whatever data you send it, so scope its access and read its tool list like any other.

What is tool poisoning?

Instructions hidden in a tool's name, description or schema that the model reads and may follow. The user interface often never shows them.

Sources

See also the glossary and the other questions.

Get the free checklist

A 9-page worksheet plus starter files for Claude Code and Codex. Download it on Gumroad. This site does not collect email.

Get the free checklist

Wallet side of things? Get Don't Get Drained, also free. Or get both in one checkout.

Related guides

More questions