mcp-guard
Security scanner for MCP servers: poisoning, shadowing, permissions, secrets, transport
mcp-guard is a free MCP server for security. It runs locally on your machine and is started by your AI client.
- Pricing
- Free
- Platforms
- CLI, API
- Runs
- Locally
- Version
- 1.1.1
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add mcp-guard-scan -- npx -y mcp-guard-scanAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-guard-scan": {
"command": "npx",
"args": [
"-y",
"mcp-guard-scan"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-guard-scan": {
"command": "npx",
"args": [
"-y",
"mcp-guard-scan"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-guard-scan": {
"command": "npx",
"args": [
"-y",
"mcp-guard-scan"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mcp-guard-scan": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-guard-scan"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mcp-guard-scan -- npx -y mcp-guard-scanOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-guard-scan]
command = "npx"
args = ["-y", "mcp-guard-scan"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-guard-scan": {
"command": "npx",
"args": [
"-y",
"mcp-guard-scan"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }Or run: gemini mcp add -s user mcp-guard-scan npx -- -y mcp-guard-scan
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mcp-guard-scan": { "command": "npx", "args": [ "-y", "mcp-guard-scan" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
MCP_GUARD_ALLOW_STDIOSet to 1 to add scan_stdio_server, which starts the command it is givenMCP_GUARD_ALLOW_PRIVATE_NETWORKSet to 1 to let scan_server reach local and private addresses, over http tooLOG_LEVELpino log level; logs go to stderr
About mcp-guard
It connects to a target the way an MCP client would, inventories the tools, prompts and resources it exposes, and checks them against deterministic rules, with no model needed for the core scan. The README describes 24 rules in six families, each with an ID, severity, bad and good examples, remediation and CWE or OWASP references. One rule catches invisible Unicode tag characters and decodes the hidden text.
The same package runs as a command-line tool, a GitHub Action that can fail a build, and an MCP server so an agent can scan something before you install it. Inputs can be a stdio command, a Streamable HTTP URL, or an exported tools/list JSON file, and scanning several at once turns on cross-server shadowing checks. Output formats include SARIF and a self-contained HTML report.
By default the MCP server does not start commands or reach private addresses; setting MCP_GUARD_ALLOW_STDIO adds scan_stdio_server and MCP_GUARD_ALLOW_PRIVATE_NETWORK allows local targets.
Tools this server provides (2)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 names don't say.
From the server's own tool labels and tool names; not verified by us.
- scan_server
- Scan a remote MCP server.
- scan_stdio_server
- Scan a local stdio server; only available when MCP_GUARD_ALLOW_STDIO=1.
What it does
- 24 documented rules
- Tool poisoning, shadowing, excessive permissions, secrets and transport weaknesses.
- Hidden text detection
- Decodes invisible Unicode tag characters in tool metadata.
- CI integration
- GitHub Action and exit codes that fail a pipeline.
- SARIF and HTML output
- Machine-readable results and a single-file report.
- Cross-server checks
- Spot the same tool name exposed by more than one server.
- Opt-in risky modes
- Stdio launch and private-network scans are off until enabled.
Good for
- Vet an MCP server before connecting an agent
- Block risky MCP servers in CI
- Audit an exported tools/list result
- Find leaked credentials in tool metadata
Pricing
Free
Free npm package; licence file in the repository
mcp-guard FAQ
Does mcp-guard need Node?
Yes, Node 22 or later for the CLI.
Will mcp-guard run commands I give it?
Only if MCP_GUARD_ALLOW_STDIO is set to 1, which adds scan_stdio_server.
Why is the npm package called mcp-guard-scan?
The README says the name mcp-guard on npm belongs to an unrelated project.
What formats can mcp-guard report?
Markdown, SARIF and a standalone HTML report, among others.
Is mcp-guard free?
Yes. mcp-guard is free to use.
How do I add mcp-guard to Claude Code?
Run this command in your terminal: claude mcp add mcp-guard-scan -- npx -y mcp-guard-scan
What are the best alternatives to mcp-guard?
The closest alternatives to mcp-guard are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


