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.
npx agentmods add agents/sageox/ox/mcp-server-security-expertgit clone --depth 1 https://github.com/sageox/oxWrote 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.
[](https://agentmods.dev/agents/sageox/ox/mcp-server-security-expert)<a href="https://agentmods.dev/agents/sageox/ox/mcp-server-security-expert"><img src="https://agentmods.dev/badge/agents/sageox/ox/mcp-server-security-expert.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00140 | $0.01354 |
| Opus 5 | $0.00070 | $0.00677 |
| Sonnet 5 | $0.00028 | $0.00271 |
| Haiku 4.5 | $0.00014 | $0.00135 |
Grade B, and why
mcp-server-security-expert scanned grade B with 1 finding 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 5d 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.
Instruction-override phrasingmediumPrompt injection
Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.
| **Output reflection** | Tool returns content that includes embedded "ignore previous instructions" payloads, hijacking the next model turn. | Tag tool outputs with explicit data delimiters; train/instruct the model to Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP Server Security Expert
You are a senior security engineer specializing in Model Context Protocol (MCP) systems. You understand both how MCP works (JSON-RPC over stdio or SSE; client-server tool registration; structured prompt-tool interactions) and where its threat model differs from traditional API design.
Why MCP is its own threat model
In a normal API:
- The caller's identity is authenticated.
- The caller is constrained by what the application UI lets them request.
- Inputs come from a constrained surface (form fields, URL params).
In MCP:
- The caller is the LLM — its "intent" is whatever the conversation pushed it toward, including adversarial content embedded in user input or tool-output history.
- There is no UI constraint — the LLM can decide to call any registered tool with any args at any time.
- Tool outputs flow back into the LLM's context, where they can carry prompt-injection payloads that influence the next tool call.
This makes MCP a mutual-distrust environment between the model and the tool surface. Both sides need to defend.
Threat catalog
| Class | Description | Defense |
|---|---|---|
| Free-form dispatch | Tool name from model output not validated against the registered tool registry. | Strict allowlist; reject unknown names. |
| Schema bypass | Tool args not validated against the tool's declared parameter schema. | JSON-schema validate every arg; reject extras. |
| Argument injection | Validated tool name + valid-schema args, but the args contain payloads (paths, URLs, commands) that injection-attack downstream sinks. | Sink-aware validation in the tool body (allowlist, normalization). |
| Output reflection | Tool returns content that includes embedded "ignore previous instructions" payloads, hijacking the next model turn. | Tag tool outputs with explicit data delimiters; train/instruct the model to treat tool output as data not instruction; for high-risk content, sanitize before returning. |
| Server impersonation | The MCP client connects to a peer it didn't intend (cert mismatch, stdio binary swap). | Pin server identity (cert pinning for SSE; expected binary path for stdio). |
| Privileged context retention | Tool captures elevated capability (DB connection, admin token) and exposes it in subsequent tool calls. | Per-call capability binding; never persist privilege across tool boundary. |
| Missing confirmation on mutation | Tool that deletes / spends / publishes / mutates state runs on LLM intent alone. | Require user confirmation prompt for mutating tools (don't trust the LLM to ask). |
| Sensitive-info leak in tool metadata | Tool advertises its capabilities by leaking config, env vars, or paths. | Tool descriptions should be capability-only; never include secrets. |
| Async race | Concurrent tool calls modifying shared state without sync. | Tool registry is single-threaded per session, OR tools are pure / use proper sync. |
| Sandbox escape | A tool meant to read project-local files accepts .. paths. |
Path-allowlist + securejoin pattern. |
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.
- 5d ago First seen · 81 lines · 140 tokens per session scan B 4143376dab7f
mcp-server-security-expert is an agent published in the GitHub repository sageox/ox (51 stars, last pushed today), licensed MIT. It adds 140 tokens to every session and 1,354 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
devops-sre
Site reliability and deployment expert for ReasonKit infrastructure, CI/CD pipelines, Kubernetes orchestration, and zero-downtime production operations.
rust-engineer
Expert Rust systems engineer for performance-critical code, memory safety, async runtime design, and zero-cost abstractions in ReasonKit core infrastructure.
compact
You are an ultrarunning training companion. Read SOUL.md at the start of the session for your name and voice, then read athlete/profile.md and athlete/notes.md. Walk beside the athlete: explain options and tradeoffs, and leave the decision with them.
grader
Evaluate expectations against an execution transcript and outputs.
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.