Mcpscan
FreeNot checkedScan MCP servers for RCE/SSRF/no-auth/tool-poisoning vulnerabilities
About
Scan MCP servers for RCE/SSRF/no-auth/tool-poisoning vulnerabilities
README
mcpscan
The security suite for your MCP servers. Scan, harden, gate, and pin every Model Context Protocol server your agents talk to — from one command, fully offline.
MCP is a brand-new attack surface: unauthenticated servers, tools that shell out, URL fetchers that can be turned into SSRF, tool descriptions that carry prompt injection, and config trust settings that auto-approve remote code. mcpscan finds those problems across a whole fleet of servers — and tells you exactly how to fix each one.
pip install cognis-mcpscan
mcpscan scan . # audit the MCP servers configured on this machine
No cloud, no telemetry, no runtime dependencies — it runs on the stdlib and everything stays on your box.
See it work
mcpscan harden posture over a fleet of four servers surfaces problems no single-server scan can see — shared credentials, lateral-movement paths, tool-name collisions, and inconsistent trust tiers across the fleet:
$ mcpscan harden posture ./fleet --format table
MCPHARDEN fleet posture — ./fleet
========================================================================
4 server(s), 3 network-reachable. Fleet score: 0/100 (grade F)
------------------------------------------------------------------------
[FAIL] 0/100 net http files-mcp
[FAIL] 20/100 net sse weather-mcp
[FAIL] 60/100 net http github-mcp
[PASS] 100/100 local stdio jira-mcp
------------------------------------------------------------------------
CROSS-SERVER CORRELATIONS (6):
[CRIT] fleet.shared_secret
The same embedded credential (sk_live_…) appears in 2 manifests
(files-mcp, github-mcp); compromise of any one server exposes a
credential whose blast radius is the whole fleet.
fix: Move it to a per-server secret store with distinct,
least-privilege, independently-rotatable tokens.
[HIGH] fleet.lateral_movement
files-mcp exposes RCE-prone tools while 2 reachable peers are
under-protected; code-exec on one host pivots to the peers — a
lateral-movement surface no single manifest reveals.
[HIGH] fleet.tool_collision
Tool 'read_file' is registered by 2 servers; the agent cannot
disambiguate which runs — the precondition for tool shadowing.
Every finding ships with a severity, the exact location, and a concrete remediation. Findings emit as human-readable, JSON, HTML, or SARIF (straight into GitHub's Security tab).
Why mcpscan
| manual review | single-purpose scripts | mcpscan | |
|---|---|---|---|
| RCE / tool-poisoning detection | ⚠️ error-prone | partial | ✅ |
| SSRF probing (consent-gated) | ✗ | ✗ | ✅ |
| Prompt-injection in tool descriptions | ✗ | ✗ | ✅ |
| Drop-in auth for unauth'd servers | ✗ | ✗ | ✅ |
| Definition pinning / drift detection | ✗ | ✗ | ✅ |
| Cross-server fleet correlations | ✗ | ✗ | ✅ |
| Runs offline, zero deps | — | varies | ✅ |
| CI / SARIF / SIEM output | ✗ | rare | ✅ |
The seven modules
One install, one command, seven focused tools — run mcpscan <module> --help for each:
| Module | Command | What it does |
|---|---|---|
| scan | mcpscan scan |
Static audit for RCE, SSRF sinks, no-auth, and tool-poisoning |
| harden | mcpscan harden |
Posture linter + fleet scoring (capability, transport, tool safety) |
| auth | mcpscan auth |
Drop-in token-auth gateway in front of unauthenticated servers |
| pin | mcpscan pin |
Trust-On-First-Use pinning + drift detection for tool definitions |
| ssrf | mcpscan ssrf |
Consent-gated SSRF probe for servers that fetch URLs |
| prompt | mcpscan prompt |
Prompt-injection & indirect-injection scanner for any LLM context |
| trust | mcpscan trust |
Detect symlink-hijack / one-click-RCE / unsafe auto-approve settings |
Each module is also installed as its own command (mcpharden, mcpauth, ssrfmcp, …) so existing scripts keep working.
Integrations
- CI/CD — non-zero exit on findings + SARIF upload; a ready-to-use GitHub Action is in
action.yml. - SIEM / SOAR —
mcpscan-emitstreams findings in the cognis-connect Finding contract (Splunk, Elastic, Slack, STIX/MISP). - MCP-native — install the
[mcp]extra to expose the scanners as MCP tools your own agent can call.
What it detects
Tool-poisoning and description injection · unauthenticated network transports · RCE-capable tools on reachable hosts · SSRF-prone URL fetchers · shared/embedded credentials · tool-name collisions (confused-deputy routing) · unsafe client trust settings (auto-approve, symlink-hijack, one-click-RCE) · definition drift / rug-pulls after first use.
Install
pip install cognis-mcpscan # core, stdlib only
pip install "cognis-mcpscan[mcp]" # + expose scanners as MCP tools
pip install "cognis-mcpscan[connect]" # + SIEM/Slack/STIX emitters
Requires Python 3.10+. Runs on Windows, macOS, and Linux.
Defensive use
mcpscan is a defensive tool for MCP servers you operate or are authorized to assess. The ssrf probe is consent-gated and refuses to run without an explicit authorization flag. Use it on your own infrastructure or under a written engagement.
License
COCL 1.0 — Cognis Open Collaboration License. See DISCLAIMER.md.
Installing Mcpscan
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/cognis-digital/mcpscanFAQ
Is Mcpscan MCP free?
Yes, Mcpscan MCP is free — one-click install via Unyly at no cost.
Does Mcpscan need an API key?
No, Mcpscan runs without API keys or environment variables.
Is Mcpscan hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Mcpscan in Claude Desktop, Claude Code or Cursor?
Open Mcpscan on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
by lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare Mcpscan with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
