MCP server security scanner

Drop your MCP server folder or paste a server file to find tools that pass model-written arguments to a shell, the file system, SQL, URLs or eval.

Run the check

Drop a project folder or files here

node_modules, .git, virtualenvs and build folders are skipped. Limit 25 MB / 5,000 files.

The Python engine (Pyodide, a few MB, cached by your browser) loads when you start.

The mistake

An MCP tool that runs subprocess.run(..., shell=True) / exec with a tool argument, opens a model-supplied path without containment, builds SQL with f-strings or template literals, fetches any URL the model gives it, or evaluates tool input.

Why it is dangerous

Tool arguments are written by the model, and the model follows instructions it reads in web pages, files, issues and emails. A shell call lets a prompt injection run any command as the user running the server. An uncontained path can be pointed at ../../.ssh/id_rsa or ~/.aws/credentials. A fetch tool can be steered to cloud metadata (http://169.254.169.254/ returns instance credentials) and localhost admin ports.

How to fix it

Do not use a shell: run a fixed program with an argument list, and validate input. Resolve paths and check they stay inside an allowed root:

subprocess.run(["git", "log", "--", ref], shell=False, check=True,
               capture_output=True, timeout=30)

ROOT = Path(ALLOWED_DIR).resolve()
target = (ROOT / path).resolve()
if not target.is_relative_to(ROOT):
    raise ValueError("path outside allowed directory")

If a command must be chosen by the model, map an allowlisted name to a fixed argv. Use query placeholders for SQL, and annotate destructive tools so clients ask before running them.

What this checker looks for

This page runs mcp-audit, which reads mcp.json / .mcp.json / claude_desktop_config.json and MCP server source (Python, JS/TS). The rules most relevant to this page:

RuleWhat it finds
MCP101Shell command built from tool input
MCP102File access without path containment
MCP103SQL built from tool input
MCP104Tool fetches arbitrary URLs (SSRF)
MCP105Raw web content returned to the model
MCP106Destructive tool without annotations
MCP107Secret from environment returned in tool result
MCP108Code evaluation of tool input

Every finding has a rule id, a severity, file:line, the offending line (secrets masked), why it matters and how to fix it. Run mcp-audit rules for the full list.

FAQ

Which SDKs are understood?

MCP servers written in Python (FastMCP / the official SDK) and JavaScript / TypeScript (the official SDK's tool registrations).

Does it run my server?

No. It reads source code only; it never imports, runs or connects to anything.

Are my files uploaded anywhere?

No. The checker is Python running inside your browser tab (Pyodide, WebAssembly). Your files are read with the browser's File API and written into an in-memory file system that exists only in this tab. Your files are never sent anywhere. The only network requests load the Python runtime and the checker code, plus Google Analytics page-view counting, which never sees your files. You can disconnect from the internet after the engine has loaded and the scan still works.

Is a clean report a guarantee?

No. It is a static check for known patterns, not a penetration test. A clean report means none of these patterns were found, nothing more.

Can I run the same check on my machine or in CI?

Yes. Every checker on this site is an open-source command-line tool (MIT licence, Python 3.10+ standard library only). The results here are the same as `scan --json` on the command line, except for checks that need git (whether a file is committed or ignored), which cannot run in a browser.