agentleFS
scoobydont-666scoobydont-666/shared-claude-skills/skills/mcp-hardening/SKILL.md

mcp-hardening

Skill1 starsChanged 33 days agoMITView on GitHub

Audit MCP authorization, transport, filesystem/network boundaries, tenant isolation, input limits and safe failure with evidence-backed checks.

The file

Files
SKILL.md

MCP security review

Record server/client/SDK versions, transport, deployment exposure and tool privileges. Consult the current official security guidance: https://modelcontextprotocol.io/specification/2025-11-25/basic/security_best_practices and the specification selected by the project. Different transports have different authorization requirements.

BoundaryEvidence required
Authentication/authorizationProtected operations reject missing, expired, wrong-audience and insufficient-scope credentials. No token passthrough to unrelated upstreams. Explicitly justify any unauthenticated health/metrics route and ensure it discloses no sensitive data.
Origin/HostHTTP Origin and Host policies tested separately; unexpected origins rejected under the selected transport specification. Local-only binding alone is not protection from DNS rebinding.
Outbound requestsAllowlist intended destinations; validate resolved addresses and redirects, block unintended local/link-local/metadata access, and prevent DNS validation-to-connect races. Test IPv4/IPv6, alternate representations and redirect chains.
FilesystemValidate canonical path containment with path components, not string-prefix tests. Path.resolve() and realpath() both resolve symlinks; neither alone prevents a concurrent symlink swap. Use race-resistant directory-relative operations and no-follow controls for hostile writable trees.
Tenant isolationDerive allowed scope from authenticated identity; every read, write, list and session operation enforces it. User-supplied namespaces cannot expand authority.
Input/resourcesValidate schemas, bound payloads, response size, concurrency, sessions and deadlines. Parameterize queries and use argv subprocess calls. Propagate cancellation.
Rate limitsBound expensive work per principal and globally; handle quota/timeout failures explicitly.
TransportProtect credentials in transit; default to local binding, expose remotely only with approved TLS/auth/network controls.
Process/containerLeast-privilege identity, minimal mounts/devices/capabilities, no privileged control sockets. Test actual deployment controls.
ConfigurationMissing required permissions/secrets fail closed. Empty allowlists never imply wildcard authority. Configuration errors must be visible.

For each item report PASS, FAIL, NOT_RUN or N/A with reason, exact evidence, impact and owner. Do not certify production readiness by counting nine passing boxes. Any unverified material boundary remains unresolved. Use disposable fixtures for traversal, SSRF and cross-tenant tests; obtain authorization before testing live systems.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.