Scans MCP servers, source trees, and packages for security vulnerabilities, protocol conformance, and coverage gaps.
Also known as devlab-group/mcp-scanner
- Stars
- 35
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Oct 20, 2026
- License
- Apache-2.0
What is scanner MCP?
scanner scans MCP servers, source trees, and packages for security vulnerabilities, protocol conformance, and coverage gaps.
Summary generated from the project's README
About scanner MCP server
Securing Model Context Protocol implementations by auditing live servers, source trees, and packages is the primary function of mcp-scanner. Developers use this tool to identify security vulnerabilities, verify protocol conformance, and detect coverage gaps in their MCP deployments. It supports various scanning methods including remote URL scanning, local source tree analysis, and inspecting npm packages without executing install scripts.
Users can run the scanner against remote endpoints, local stdio servers, or existing client configurations. For high-security environments, the tool offers a runtime stdio mode that executes statically linked ELF executables within a container. It provides deep inspection capabilities such as source-to-sink dataflow analysis for Go, Python, JavaScript, TypeScript, Java, and Rust, alongside checks for prompt injection and tool poisoning.
Integration into CI/CD pipelines is handled through specific exit codes and the ability to output results in SARIF format. The scanner uses different probe levels to control interaction, ranging from simple declaration reading to sending malformed protocol messages to test rejection logic. It requires libyara for signature matching and can be installed via Go.
What you can do with it
- 1Verify source code securityPerform dataflow analysis across multiple files in a local repository.
- 2Inspect npm packages safelyScan a published package for vulnerabilities without running its installation scripts.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachabledevlab-group/mcp-scanner is public and reachablegithub.com/devlab-group/mcp-scanner ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-20github.com/devlab-group/mcp-scanner ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubmcp-scanner
A security scanner for Model Context Protocol servers. It scans live servers,
source trees, and packages, and reports both findings and coverage gaps.
SAFE requires every required analyzer to finish without a reported coverage
gap:
COMPLETED + SAFE required analysis ran, nothing blocking
COMPLETED + UNSAFE required analysis ran, something blocking
PARTIAL + UNKNOWN an analyzer could not finish
ERROR + UNKNOWN an analyzer failed
SKIPPED + UNKNOWN no analyzer produced usable analysis
Timeouts, crashes, unexplained files, and missing statuses downgrade the scan.
An analyzer error is never self-excusing; only an explicit best-effort policy
can exempt it. A known limitation is that any recorded file-skip reason accounts
for all skipped files, so some incomplete file scans can still be SAFE.
Install
go install github.com/devlab-group/mcp-scanner/cmd/mcp-scanner@latest
Signature matching requires libyara and a tagged build:
# Debian, Ubuntu
sudo apt install libyara-dev pkg-config
# Fedora, RHEL
sudo dnf install yara-devel pkgconf-pkg-config
# macOS
brew install yara pkg-config
make build-yara
See the YARA installation guide
for source builds. If /usr/local/lib is outside the linker path, run
sudo ldconfig or set LD_LIBRARY_PATH=/usr/local/lib. Builds without the
tag report YARA as unavailable.
Use
Scan a remote server:
mcp-scanner remote https://mcp.example.com/mcp
Scan a trusted stdio server as a child process:
mcp-scanner stdio -- npx -y @example/mcp-server
This runs the target on your machine with your privileges. For untrusted code,
use source or package, which do not execute it. runtime stdio runs only an
absolute, statically linked ELF executable in a container and needs a trusted
snapshot.
Scan the servers declared in your MCP client configuration:
mcp-scanner known-configs --run
--run scans remote entries. Stdio entries are skipped unless you also pass
--include-stdio, and any skipped stdio entry makes the command exit 3.
Scan a source tree, or a published package:
mcp-scanner source ./my-mcp-server
mcp-scanner package npm:@example/mcp-server@1.4.0
Gate a pipeline:
mcp-scanner remote https://mcp.example.com/mcp --format sarif --output results.sarif --fail-on high
Exit codes:
| Code | Meaning |
|---|---|
| 0 | scan completed, policy passed |
| 1 | bad flags or configuration |
| 2 | scan completed, policy failed |
| 3 | scan could not determine an answer |
| 4 | the scanner itself broke |
--fail-on defaults to high, so a pipeline that never sets it still stops
on a high or critical finding. Pass --fail-on none to report without
gating.
Treat exit code 3 as a pipeline failure. It means the scan did not finish.
What it checks
- MCP protocol conformance, capability declarations against actual behaviour, and how the server handles malformed input
- Authentication, token validation and session binding
- Prompt injection, tool poisoning, hidden Unicode and credential harvesting in the text a server hands a model
- Source-to-sink dataflow across files, in Go, Python, JavaScript, TypeScript, Java and Rust
- Mismatch between what a tool says it does and what its handler reaches
- Dependency vulnerabilities and package contents, without running install scripts
- Optional sandboxed confirmation of static findings
- Optional model-assisted review that supplements deterministic evidence
Scanning safely
By default, the scanner discovers capabilities without invoking real tools.
--active-probes none connect and read declarations
--active-probes safe also send malformed protocol messages a correct server must reject
--active-probes tool-calls permit tools named with --allow-tool-call
safe is the default. Its tools/call probes use an invalid name or a name
that does not exist, which a conforming server rejects before dispatch.
A loose server may dispatch such a request before validating the name. No
setting invokes arbitrary declared tools on a live server or sends intentionally
destructive requests. The runtime analyzer can invoke declared tools only inside
its sandbox.
Documentation
Development
make check # gofmt, vet, test, race, vulnerability scan, version check
make build
Three rules hold the design together: SAFE must mean the analysis ran,
every finding carries evidence, and every analyzer reports what it did not
look at.
Security
Report vulnerabilities privately. See SECURITY.md.
License
Apache License 2.0. See LICENSE. Binaries also include the third-party components listed in THIRD_PARTY_NOTICES.
scanner MCP questions
What languages does the source-to-sink dataflow analysis support?
The scanner supports dataflow analysis across files in Go, Python, JavaScript, TypeScript, Java, and Rust.
Is it safe to scan live servers?
Yes, by default the scanner uses 'safe' active probes which send malformed protocol messages that a conforming server must reject without invoking arbitrary tools.