mcp-security-guard
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_SECURITY_API_KEY | No | Opt-in API key for the paid Pro & Team plans (daily threat feed, alerts on changed tool descriptions, history, team policies and dashboards). Everything else runs locally and needs no account. | |
| MCP_SECURITY_AUDIT_LOG | No | Set to `off` to disable the runtime audit log at `~/.claude/mcp-security/audit.jsonl`. | on |
| MCP_SECURITY_SECRET_GUARD | No | Controls the PreToolUse hook on `mcp__*` calls: asks for confirmation when a call's arguments contain a credential. Values: `ask` (default), `deny` or `off`. | ask |
| MCP_SECURITY_SESSION_CHECK | No | Controls the SessionStart hook check that re-verifies only the servers you have pinned. Values: `full` (default) compares launch configs and re-lists tools; `config` compares launch configs only, launch nothing; `off` disables the check. | full |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_mcp_serversA | Lists every MCP server configured for this project (user, local and project scope in Claude Code, plus Claude Desktop) with its transport. Reads config files only; launches nothing. |
| audit_mcp_configA | Static audit of MCP server configuration: plaintext secrets in env/headers/args/URLs, plain-HTTP remote servers, unpinned npx/uvx packages, unpinned or privileged Docker containers, pipe-to-shell launch commands, and duplicate server names across scopes. Read-only; launches nothing. |
| audit_agent_contextA | Scans the text files Claude reads besides MCP tools: CLAUDE.md, skills (and their bundled scripts), slash commands, subagents, rules and the hook configs of installed plugins, from the user, the project and every enabled plugin. Flags instruction overrides, requests to hide things from the user, invisible text, HTML comments addressed to the model, directives to read credential files, commands that upload credentials, download-and-run and encoded execution, credential-stealing scripts, and pre-approved unrestricted shell access. Read-only; launches nothing and sends nothing. |
| pin_contextA | Records a SHA-256 of every skill, command, subagent, rule, CLAUDE.md, plugin hook config and bundled script (user, project and each installed plugin) in ~/.claude/mcp-security/context-pins.json, so later scans and the session-start check report anything that changed after you approved it. A plugin that changes files without a new version is the rug-pull pattern. Pin only after the user has reviewed an audit_agent_context report; origins with critical or high findings are skipped unless force is true. Reads files only; launches nothing. |
| audit_server_toolsA | Connects to the selected MCP servers, lists their tools, and checks every name, description and schema string for tool poisoning (instruction overrides, concealment requests, hidden tags, invisible Unicode, sensitive file paths, exfiltration wording, encoded payloads), cross-server tool shadowing, and changes since the tools were last pinned (rug pulls). Never calls the scanned tools. |
| pin_toolsA | Records a SHA-256 hash of every tool definition of the selected servers in ~/.claude/mcp-security/pins.json, so later audits can detect rug pulls. Pin only after the user has reviewed an audit_server_tools report for these servers. Launches the servers like audit_server_tools. |
| analyze_tool_definitionsA | Runs the tool-poisoning checks on tool definitions you pass in (e.g. the output of tools/list from a server you are developing), without connecting to anything. Useful in CI or before publishing an MCP server. |
| check_supply_chainA | For servers launched with npx/uvx and similar, checks the package on its registry and in the OSV database: known vulnerabilities, known malicious versions, typosquats of popular MCP packages, non-existent names, very new packages or releases, install scripts, deprecation and npm publisher changes. Sends package names and versions to registry.npmjs.org, pypi.org and api.osv.dev; nothing else leaves the machine. |
| adversarial_testA | CALLS every non-destructive tool of one configured server with command-injection payloads (each would only create an empty canary file) and path-traversal payloads, then reports which parameters reach a shell or the file system unchecked. Only for servers the user develops or operates, ideally a test instance in a container. Destructive tools are skipped unless include_destructive is true. |
| security_dashboardA | Opens the interactive mcp-security-guard dashboard: every configured MCP server with its score and grade, findings filterable by severity and server, the OWASP MCP Top 10 breakdown, recommended permission rules, and pin buttons. scan='config' reads files only. scan='full' starts the servers to list their tools, prompts and resources (no tool is called) and needs confirm_launch=true; ask the user first. |
| apply_fixesA | Fixes findings in the project's own files. permissions: adds the recommended permissions.ask rules for tools that execute code, delete data or write files to .claude/settings.json (needs confirm_launch, because the servers are listed to classify their tools). pin-versions: pins unpinned npx/uvx packages in .mcp.json to the registry's current version (needs confirm_network). env-refs: replaces literal secrets in .mcp.json env/headers with ${VAR} references. Without write=true it only shows the planned edits. Every written file is backed up under ~/.claude/mcp-security/backups/ first; ~/.claude.json is never modified. |
| generate_policyA | Returns a .mcp-security.json policy that approves exactly the MCP servers configured now (and their remote hosts) and requires pinned versions. Commit it to the repository so CI, session checks and audits flag any server added later that is not on the list (shadow MCP servers). Read-only: returns the JSON, does not write it. |
| team_statusA | Syncs the organisation's policy from the team backend (it is then enforced next to the user's own policy) and shows the organisation, the role, the policy version and whether fleet reporting is on. Needs a team API key (MCP_SECURITY_API_KEY or the plugin's setting). Sends only the API key; the answer is cached locally. |
| request_approvalA | Creates an approval request in the user's organisation for an MCP server (e.g. project:linear) or a plugin, when the team policy blocks it or does not list it. Use it only when the user asks. The admin decides on the command line; this tool cannot approve anything. |
| team_reportA | Shows exactly what a fleet report would send (server names, scopes, transport, package names and versions or remote hostnames, pinned or not; plugin names and versions; never paths, arguments, environment, headers or secrets). With confirm_send=true it sends it, if the admin turned fleet visibility on. Only when the user asks. |
| export_bomA | Inventory of everything the agent can run or read here: MCP servers, plugins, skills, commands, subagents, CLAUDE.md and hook configs, with SHA-256, pin status, scores and OWASP MCP Top 10 evidence. format=summary is a Markdown overview for audits; format=cyclonedx is a CycloneDX 1.6 JSON document. Static and local: nothing is launched or sent, and it holds no paths, arguments, environment or secrets. |
| query_audit_logA | Summarises the local audit log written by the plugin's hooks: MCP tool calls per server and tool, and every call where a credential was sent, a credential came back, or the output contained injected instructions. The log stores hashes and sizes only, never arguments or outputs. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| mcp-security-guard dashboard | Interactive security dashboard (MCP App). |
TDQS
Scored across 17 tools
The audit and pin families overlap conceptually, but each tool names a distinct target: agent context files, MCP config, server tool definitions, or supply-chain packages. The only mild ambiguity is between audit_server_tools, analyze_tool_definitions, adversarial_test, and security_dashboard scan='full', though their scopes and side effects are explicitly differentiated.
Most tools use predictable snake_case verb_noun names such as audit_mcp_config, pin_tools, and generate_policy. A few outliers like team_status, adversarial_test, and security_dashboard are noun-oriented, but they remain readable and do not break the overall convention.
At 17 tools, the set is slightly heavy but reasonable for a security lifecycle covering audit, pinning, reporting, remediation, policy, and dashboard workflows. No tool appears redundant enough to remove, though the surface is near the upper comfortable range for agent selection.
The toolset covers context and configuration auditing, tool poisoning checks, supply-chain review, adversarial testing, pinning, policy generation, remediation, export, logging, and team reporting. Minor gaps exist around unpinning management and broader runtime enforcement, but core security workflows are well covered.