mcp-security
Skill20 starsChanged 4 months agoMITView on GitHub
Detects MCP tool handlers vulnerable to malicious inputs, hardcoded secrets,
3 other projects use a version of this.
Adopted by
Most recently taken up by
- awarexone/AXguardtheir own version, first seen Sep 15, 2026
- wgpsec/AboutSecuritytheir own version, first seen May 21, 2026
- GoldenWing-360/claude-security-skillstheir own version, first seen May 12, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- wgpsec/AboutSecurity★ 1.8ksame name
- GoldenWing-360/claude-security-skills★ 19same name
- awarexone/AXguard★ 18same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- file-uploadSkill
- graphql-securitySkill
- hardcoded-secretsSkill
- header-injectionSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mass-assignmentSkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- pr-reviewSkill
- race-conditionSkill
- rag-securitySkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- training-data-poisoningSkill
- unsafe-api-consumptionSkill
The file
Files
MCP Server Security (OWASP LLM07:2025)
What this checks
Prevents MCP tool handlers from being exploited via malicious inputs, hardcoded secrets, unrestricted file access, or shell injection. A compromised MCP server gives attackers direct access to the host environment.
Vulnerable patterns
- MCP tool handler that opens or reads a file path supplied directly by the caller with no allowlist or root confinement
- Tool handler that runs a shell command built from tool input with shell expansion enabled
- Hardcoded API key, token, or credential in the handler body or tool definition
- Tool schema declaring a string parameter with no length cap, pattern, or enum constraint
Fix immediately
Flag the vulnerable code and explain the risk. Then suggest a fix that establishes these properties:
- Tool schemas constrain every string parameter — maximum length, regex pattern, enumerated values, or rejection of additional properties. A bare string type is a blank check. The schema is the first line of defense because the model generated the input.
- Paths are canonicalized and confined to an allowed root. The handler resolves the supplied filename against a fixed base directory and verifies the result stays inside that directory — defeating traversal, symlink escape, and absolute paths.
- Shell execution uses argument lists, never a shell string with interpolated input. If the tool must run a command, the command name comes from a static allowlist and arguments are passed as discrete argv elements.
- Secrets come from the environment or a secrets manager — never hardcoded literals in the handler or tool definition. A leaked MCP server config should not leak credentials.
- Every invocation is audit-logged with the tool name and sanitized inputs
before the side-effect runs. For broader MCP tool design guidance, see the
insecure-plugin-designskill.
Translate each principle to the MCP SDK and language of the audited handler. Use the SDK's documented schema-validation, path-resolution, and process-execution APIs — do not hand-roll equivalents.
Verification
Confirm the response:
- No secrets hardcoded — all credentials loaded from environment variables or a secrets manager
- File paths resolved and confined to an allowed base directory
- Shell calls use argument lists, not a shell string with interpolated input
- Every schema string parameter has a length cap, pattern, or enum constraint
References
- CWE-284 (Improper Access Control)
- CWE-78 (OS Command Injection)
- CWE-200 (Exposure of Sensitive Information)
- OWASP LLM07:2025 Insecure Plugin Design
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

