mcp-server-security

mcp-server-security is a skill for Claude Code from sigistry/marketplace. It costs 92 tokens per session (1,160 once invoked), scanned B, original, MIT.

A security guide for Model Context Protocol (MCP) servers, which are services that an AI agent can call. It covers ordinary service risks and AI-specific risks such as prompt injection and tool poisoning.

In plain words
What is it for?
Use it to review and harden MCP tools against command, SQL, path, and URL injection, server-side request forgery (SSRF), denial of service, unsafe cross-origin access, and leaked secrets.
Why use it?
It helps reduce the chance that hostile inputs, unsafe tool results, or excessive requests compromise the server or the agent using it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mcp-server-smith plugin — 4 skills, 3 commands, 2 agents shipped together

Good fit Use it to review and harden MCP tools against command, SQL, path, and URL injection, server-side request forgery (SSRF), denial of service, unsafe cross-origin access, and leaked secrets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sigistry/marketplace/mcp-server-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sigistry/marketplace --skill mcp-server-security
Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Made for: Claude Code.

Or install mcp-server-smith, the plugin that ships this one along with the rest of its 4 skills, 3 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-server-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/sigistry/marketplace/mcp-server-security/github.svg)](https://agentmods.dev/skills/sigistry/marketplace/mcp-server-security)
Your own site
<a href="https://agentmods.dev/skills/sigistry/marketplace/mcp-server-security"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/mcp-server-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-server-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/sigistry/marketplace/mcp-server-security"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/mcp-server-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,160 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.01160
Opus 5.5 $0.00037 $0.00464
Sonnet 5.5 $0.00018 $0.00232
Haiku 4.5 $0.00009 $0.00116

Measured 1mo ago against content hash d4d43ccf758a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

mcp-server-security scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- **SSRF**: if a tool fetches a URL, allowlist hosts/schemes and block internal ranges (`169.254.169.254`, `localhost`, RFC1918); do not let the model fetch arbitrary internal endpoints.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Command**: no `child_process.exec`/`os.system` with interpolated args; use `execFile`/arg arrays, or avoid the shell entirely.
plugins/mcp-server-smith/skills/mcp-server-security/SKILL.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Server Security

Purpose

An MCP server is an attack surface an AI agent invokes on the user's behalf, which combines two threat models: ordinary service security (injection, SSRF, secrets, DoS) and LLM-specific risks (prompt/tool-poisoning injection, confused deputy). Because the model will call tools with attacker-influenced arguments and read back tool/resource content into its context, a small server flaw becomes an agent-level compromise. This skill is the threat model and the mitigations to apply and to audit for. It complements mcp-authorization (identity/access) with the rest of the surface.

The threat model, by trust boundary

Boundary Risk Mitigation
Client → server identity confused deputy, token passthrough validate aud; never forward the incoming token (see mcp-authorization)
Tool arguments → system calls command / SQL / path injection, SSRF validate + parameterize; allowlist; never build shells/URLs from raw args
Server → model (tool/resource output) prompt injection, tool poisoning treat all returned content as untrusted; do not let it carry instructions
Anyone → server DoS, resource exhaustion size caps, timeouts, rate limits, pagination
Server config → logs/errors secret leakage secrets from env/store; never log tokens or put internals in results

Injection from tool arguments

The model may pass arguments derived from untrusted data. Never build a shell command, SQL query, file path, or outbound URL by concatenating an argument:

  • Command: no child_process.exec/os.system with interpolated args; use execFile/arg arrays, or avoid the shell entirely.
  • SQL: parameterized queries only; never string-build a WHERE.
  • Path: resolve and confirm the result stays within an allowed root; reject .. traversal.
  • SSRF: if a tool fetches a URL, allowlist hosts/schemes and block internal ranges (169.254.169.254, localhost, RFC1918); do not let the model fetch arbitrary internal endpoints. Validate every argument against the tool's schema and these rules before use.

Read the full file on GitHub · 63 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 63 lines · 92 tokens per session scan B d4d43ccf758a

Subscribe to this mod's changes

mcp-server-security is a skill published in the GitHub repository sigistry/marketplace (3 stars, last pushed 4d ago), licensed MIT. It adds 92 tokens to every session and 1,160 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 2 findings (cloud metadata endpoint, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

design-everyday-things

Apply foundational design principles: affordances, signifiers, constraints, feedback, and conceptual models. Use when the user mentions "why is this confusing", "affordance", "error prevention", "discoverability", "human-centered design", "mental model", "mapping", "seven stages of action", "users keep making…

wondelai/skills · 132 tokens

create-app

Guided journey from a raw app idea to a validated, cleanly architected first version that ships on a sustainable cadence. Orchestrates ten skills phase by phase - lean-startup, design-sprint, clean-architecture, domain-driven-design, clean-code, pragmatic-programmer, system-design, ios-hig-design, 37signals-way…

wondelai/skills · 217 tokens

cold-start-problem

Start and scale networked products using Andrew Chen's "The Cold Start Problem" framework for network effects. Use when the user mentions "network effects", "chicken and egg", "cold start", "two-sided marketplace", "atomic network", "hard side", "liquidity", "critical mass", "invite-only launch", "how do I get my…

wondelai/skills · 168 tokens

37signals-way

Build lean, opinionated products using the 37signals philosophy from "Getting Real", "Rework", and "Shape Up". Use when the user mentions "Getting Real", "Rework", "Shape Up", "37signals", "Basecamp method", "six-week cycles", "fixed time variable scope", "appetite vs estimates", "betting table", "breadboarding", "fat…

wondelai/skills · 177 tokens

clean-architecture

Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to entities. Use when the user mentions "architecture layers", "dependency rule", "ports and adapters (hexagonal)", "onion architecture", "screaming architecture", "where should business logic go"…

wondelai/skills · 147 tokens

release-it

Build production-ready systems with stability patterns: circuit breakers, bulkheads, timeouts, and retry logic. Use when the user mentions "production outage", "circuit breaker", "deployment pipeline", "chaos engineering", "retry storm", "health checks", "my service keeps crashing", "prevent cascading failures", or…

wondelai/skills · 131 tokens