agentleFS
awarexoneawarexone/AXguard/mcp-security/SKILL.md

mcp-security

Skill18 starsChanged 3 months agoMITView on GitHub

Review Model Context Protocol servers/clients and tool bridges for trust, supply-chain, and over-privileged tool exposure before ship.

  • Pipes a download into a shell

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After agent.* or supply.* hits near tool packaging

    line 41
  2. Distinctive:

    Ensure clients allowlist servers and tools.

    line 66
  3. Very specific:

    Check whether tool descriptions / resources are attacker-influable (user-edited markdown, remote URLs) → prompt-injection.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Security

Purpose

Secure Model Context Protocol (MCP) and similar tool-bridge deployments: which servers are trusted, how tools are described and invoked, and how install/update integrity is enforced — defensive pre-ship only.

When to Use

  • Apps or IDE agents that load MCP servers / tool registries
  • Reviewing MCP server implementations that expose filesystem, shell, DB, or HTTP tools
  • After agent.* or supply.* hits near tool packaging

When Not to Use

  • Products with no MCP or equivalent external tool protocol
  • Publishing malicious MCP servers or exploit payloads

Security Concepts

MCP expands the agent attack surface: third-party servers are a supply chain; tool descriptions can carry indirect prompt injection; broad tools recreate unrestricted shell risks. Treat server identity, pin versions, and validate arguments like any privileged plugin system.

Threat Model

Attacker goals:

  1. Ship a malicious MCP server package (typosquat / compromised publisher).
  2. Poison tool descriptions or resources so the model follows attacker instructions.
  3. Abuse connected tools for local RCE, data theft, or SSRF.
  4. Escalate via confused-deputy: user authorizes a benign server that later gains dangerous tools.

Analysis Workflow

  1. Inventory MCP clients/servers in the repo (configs, manifests, install docs).
  2. Apply supply-chain-security: pin versions, verify checksums/signatures, avoid curl|sh installs of servers.
  3. List tools each server exposes; classify side effects (read / write / egress / exec).
  4. Ensure clients allowlist servers and tools; disable unused capabilities.
  5. Inspect tool schemas: no free-form shell string if a typed API suffices; validate args server-side.
  6. Check whether tool descriptions / resources are attacker-influable (user-edited markdown, remote URLs) → prompt-injection.
  7. Confirm secrets for tools are scoped and not logged; cross-check secrets-detection.
  8. Align runtime behavior with ai-agent-security approval gates for high-impact tools.

Evidence Requirements

  • MCP config paths and server identifiers
  • Tool list with privilege notes
  • Integrity controls on install/update
  • Any path from tool output → privileged sink

False Positive Controls

  • Local first-party MCP server with reviewed code, pinned in lockfile, tools read-only and scoped
  • Dev-only MCP disabled in production builds
  • Documentation mentioning MCP without shipping a client

Remediation

  • Pin and verify MCP server packages; prefer first-party or vetted registries.
  • Least-privilege tools; separate servers per trust domain.
  • Sanitize/ignore untrusted tool metadata for instruction-like content; keep system policy outside tool text.
  • Require explicit user consent when adding servers; show tool permissions clearly.
  • Monitor and revoke compromised servers quickly (A06/A08 hygiene).

Verification

Confirm production configs only load allowlisted, pinned servers. Re-run /axguard-agent and /axguard-supply. Hostile tool-description text must not unlock new tools or bypass approvals.

Related Skills

ai-agent-security, prompt-injection, supply-chain-security, secrets-detection, security-remediation

Framework Mapping

  • CWE-494 / CWE-78 / CWE-94 as applicable to install and tool exec paths
  • OWASP A03:2021 / A06:2021 / A08:2021
  • OWASP LLM03:2026 Excessive Agency; LLM04:2026 Supply Chain

References

Research Provenance

Primary: OWASP Top 10:2021 A03/A06/A08; CWE-494/78/94; OWASP LLM Top 10:2026 LLM03/LLM04 (accessed 2026-09-15).
Internal: AXGuard rules/agent.json, rules/supply.json, /axguard-agent, /axguard-supply.

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.