Mindket

Are MCP servers safe? What to check before installing one (or a skill)

A dark banner with a golden glow, tagged MCP, Agent Skills, Claude Code and Guides, titled "Are MCP servers safe?" over "What to check before installing one (or a skill)." Beside it, a terminal and a checklist sit under a glowing shield with a padlock. The checklist reads: read the exact command, check who publishes it, read the tool descriptions, give it the least access it needs, keep approval on.

Not by default. Adding an MCP server runs someone's code on your computer with your permissions, or sends what your agent reads to their server, and MCP doesn't vet that code. The specification treats every tool as arbitrary code execution. An Agent Skill can even run a shell command before Claude reads it.

In short

  • Pin every server you add to one version.
  • Start scripted Claude Code runs on shared repositories with --strict-mcp-config.
  • Before you first invoke a skill you didn't write, search it for the ! syntax that runs shell commands.
On this page
  1. A short check before you install
  2. What can go wrong, and how sure anyone is
  3. Local and remote servers carry different risks
  4. What Claude Code does, and where it stops asking
  5. Agent Skills need the same read
  6. What Mindket checks on an MCP listing
  7. Frequently asked questions
  8. Sources

A short check before you install

  1. Read the exact command or address. The MCP security guide says an app offering one-click setup must show a local server's command in full, without truncation, before it runs. Look for sudo, rm -rf, network calls and paths outside your project.
  2. Check who publishes it. Open the package or repository the command points to and match its name against the vendor's own docs. The MCP Registry ties server names to a verified GitHub account or domain but leaves code scanning to package registries and marketplaces.
  3. Read the tool descriptions. The MCP specification says a description of a tool's behavior should be treated as untrusted unless it comes from a trusted server. Find them in the server's source or README and look for text aimed at the model rather than at you, such as an order to keep something from the user. That's what Invariant Labs hid in its tool poisoning demonstration.
  4. Give it the least access it needs. Least privilege is one of OWASP's prompt injection defenses: use a read-only token for work that only reads, and point a file server at one folder. Add the server at your own scope first, and share it in .mcp.json only after that.
  5. Keep approval on. Leave tool calls on ask until you've seen the server work, then pre-approve named tools, not whole servers. In Claude Code, the permission rule mcp__github__get_* approves only that server's get_ tools.

What can go wrong, and how sure anyone is

Say you ask your agent to file a GitHub issue. Your app has already asked each MCP server for its tools, and the model picks one by its name and description. The app runs the call and hands the result back. Both the description and the result land in the model's context as text it trusts.

A description is text the model reads and you usually don't, so an instruction hidden in it can steer the model. Results can carry instructions too, when a server fetches a web page or a file that someone else wrote. OWASP calls that second case indirect prompt injection and says it's unclear whether any method prevents prompt injection completely. In the issue example, an injected instruction still can't delete anything through a read-only token, and an approval prompt lists the tool and its inputs before the call runs.

Of the risks in the table, only tool poisoning and shadowing were shown working, in Invariant Labs' own experiments. The rest are patterns a security guide or the spec describes, and no source here counts real victims or how often attacks happen.

Invariant Labs' April 2025 demonstrations
  1. Tool poisoning attacks described

    Instructions hidden in a tool description, invisible to users and visible to the model. The post names Cursor as a susceptible client.

    Source: Invariant Labs, 1 April 2025 (read November 3, 2026)

  2. WhatsApp MCP exploited

    An untrusted MCP server exfiltrates a user's message history.

    Source: Invariant Labs, 7 April 2025 (read November 3, 2026)

  3. MCP-Scan released

    A security scanner for MCP servers, added to the first post as an update.

    Source: Invariant Labs, update note of 11 April 2025 (read November 3, 2026)

Risks named in the sources, with the evidence each one gives
RiskWhat happensEvidence level
Malicious startup commandA config line runs a harmful command, such as one that posts your SSH key elsewhereDescribed: an attack pattern with example commands, MCP security guide
Tool poisoningHidden text in a tool description tells the model to read ~/.ssh/id_rsa and send it as an argumentDemonstrated: Invariant Labs, against Cursor, April 1, 2025
ShadowingOne server's description changes how the agent uses another server's tool, so email goes to the attackerDemonstrated: the same Invariant Labs experiments
Indirect prompt injectionA page or file the server fetches carries instructions the model followsDescribed: OWASP LLM01, and Claude Code's MCP docs
Token passthroughA remote server accepts a token not issued for it and forwards it to another APIForbidden by the MCP authorization spec, so ask a vendor about it
DNS rebindingA website reaches a local HTTP server left running on your machineDescribed: why the spec makes servers check the Origin header
Luca Beurer-Kellner's post on X about a flaw in MCP he calls Tool Poisoning, with a chat where adding 5+1 also reads mcp.json and an SSH public key, posted 1 April 2025
Luca Beurer-Kellner on X, 1 April 2025
Luca Beurer-Kellner's post on X: a new MCP attack leaks WhatsApp messages through a sleeper design that skips user approval, posted 7 April 2025
Luca Beurer-Kellner on X, 7 April 2025

Luca Beurer-Kellner is an author of the Invariant Labs posts above. The shots show X's own embed of each post on 3 November 2026, times in US Pacific time. Select one to open it on X.

Local and remote servers carry different risks

A local server runs with the client's privileges, so whoever controls it can execute any command on your machine. The MCP security guide has apps launch local servers in a sandbox, with restricted access to files and the network, and grant more only when you ask. Run scripts and tool calls that reach outside web services in a virtual machine, as Claude Code's security page suggests, so a bad command stays off your own system.

A remote server gets whatever your agent sends it: tool arguments, and sometimes text from your files. The tools specification asks apps to show you a tool's inputs before calling the server, to stop data leaving by accident or on purpose.

When a remote server signs you in, the security guide asks it to request a minimal set of permissions at first. A stolen token with broad scopes such as files:* or admin:* opens tools the task never needed.

Local or remote, as the guides describe each
Local serverRemote server Our pick
Where its code runsOn your machine, under your accountOn someone else's platform
What it can reachAny command, with the client's privileges, if an attacker controls itWhat your agent sends it: tool arguments, sometimes text from your files
What the security guide asks forA sandbox, with limited access to files and the networkA minimal scope set when it signs you in

Our pick: Remote server. For a service you already have an account with, the vendor's own remote server keeps a stranger's code off your machine.

Sources: MCP security best practices (read November 2, 2026), MCP specification: Tools (read November 2, 2026)

What Claude Code does, and where it stops asking

In an interactive session, Claude Code asks for approval before it uses a project-scoped server, because those live in a .mcp.json file that can be checked into source control. Per its MCP docs, that prompt never appears in claude -p runs, Agent SDK sessions or cloud sessions outside a project's threads. So a script that runs Claude Code on a repository other people push to never asks you to approve the servers in its .mcp.json. To block them, list each one in disabledMcpjsonServers or start with --strict-mcp-config.

Reading .mcp.json won't show you every server either. Claude Code's security page notes that servers at other scopes, claude.ai connectors and plugins can all add servers to a session.

Agent Skills need the same read

An Agent Skill is a folder of instructions and scripts, not a running server. In Claude Code it can still run commands. Per the skills documentation, a line written as ! followed by a command in backticks runs that shell command before the skill's content reaches Claude, and the output takes its place.

  • Setting "disableSkillShellExecution": true swaps each such command for a notice, except in bundled and managed skills.
  • The allowed-tools field lets Claude use the listed tools without asking during the turn that invokes the skill. The grant clears when you send your next message, and it doesn't restrict any other tool.
  • Permission rules decide which skills run at all. Skill(deploy *) as a deny rule blocks one skill, and denying Skill turns every skill off.

What Mindket checks on an MCP listing

Every new or changed MCP listing on Mindket waits for a moderator, who checks the program it starts or the address it connects to. A local server's program must be a bare name such as npx, uvx or docker, never a path. Its arguments can't hold quotes, $, ;, |, & or other characters a shell reads. So a line you paste from the MCP servers page can only start the listed program. The moderator checks that line, not the code in the package npx downloads from the publisher.

A remote server's address must be public https, never one on your own network. No listing may carry a key. It names the variable or header the server needs, and you type your own value. If a listing looks wrong, reports from three accounts hide it until a moderator looks.

Prompt skills on Mindket's skills page are ready-made prompts you read on the page before you paste one into an AI chat, so nothing runs that you haven't seen.

We last checked the pages under Sources on November 2, 2026, at 03:27 UTC, and reread the two Invariant Labs posts on November 3. We did not test any server or skill hands-on.

Frequently asked questions

Are the official MCP reference servers safe to use?

You can trust who wrote them, but they aren't built for production. The servers repository README calls them educational examples rather than production-ready solutions, and asks developers to weigh their own threat model.

Does Anthropic or Claude Code scan MCP servers for malware?

No. Per Claude Code's security page, Anthropic doesn't security-audit or manage any MCP server, and the page describes no malware scan. What Anthropic does review is connectors, against its listing criteria, before they enter the Anthropic Directory. For any other server, it encourages you to write your own or use providers you trust.

Can a local MCP server read my files?

Yes, unless a sandbox limits it. The MCP security guide asks apps to warn before a server's command touches sensitive places such as your home directory, SSH keys and system folders.

Can an MCP server change after I approve it?

Yes. Invariant Labs calls it a rug pull, where a server changes a tool description after the client has approved it. Its suggested defense is for apps to pin the version of the server and of its tools.

Is it safe to let Claude Code run MCP tools without asking?

Claude Code checks deny rules first, then ask, then allow, so a deny rule always wins. A broad allow rule may not do what you expect: written as mcp__*, with no server name, it is skipped and approves nothing.

Sources

  1. MCP specification: Security and trust & safety (read November 2, 2026)https://modelcontextprotocol.io/specification/latest
  2. MCP docs: Security best practices (read November 2, 2026)https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices
  3. MCP specification: Tools (read November 2, 2026)https://modelcontextprotocol.io/specification/latest/server/tools
  4. MCP specification: Streamable HTTP transport (read November 2, 2026)https://modelcontextprotocol.io/specification/latest/basic/transports/streamable-http
  5. MCP specification: Authorization (read November 2, 2026)https://modelcontextprotocol.io/specification/latest/basic/authorization
  6. MCP: The MCP Registry (read November 2, 2026)https://modelcontextprotocol.io/registry/about
  7. GitHub: modelcontextprotocol/servers (read November 2, 2026)https://github.com/modelcontextprotocol/servers
  8. Claude Code docs: Connect Claude Code to tools via MCP (read November 2, 2026)https://code.claude.com/docs/en/mcp
  9. Claude Code docs: Security (read November 2, 2026)https://code.claude.com/docs/en/security
  10. Claude Code docs: Configure permissions (read November 2, 2026)https://code.claude.com/docs/en/permissions
  11. Claude Code docs: Extend Claude with skills (read November 2, 2026)https://code.claude.com/docs/en/skills
  12. Invariant Labs: MCP Security Notification, Tool Poisoning Attacks (read November 3, 2026)https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks
  13. Invariant Labs: WhatsApp MCP Exploited (read November 3, 2026)https://invariantlabs.ai/blog/whatsapp-mcp-exploited
  14. OWASP GenAI Security Project: LLM01 Prompt Injection (read November 2, 2026)https://genai.owasp.org/llmrisk/llm01-prompt-injection/

Share this article

Read a server before you add it

Every MCP server on Mindket shows what it runs or connects to, the variables it needs and its tools. That's enough to make the first check before you add it.

Browse MCP servers

This article as Markdown · Blog RSS feed · All articles