ToolHive is a platform for running and managing Model Context Protocol servers, which give AI clients access to tools and data. Developers, platform teams, and enterprises use it to isolate MCP servers, control access, and monitor their operation. The catalogue entries provide agent workflows and configuration for operating ToolHive and its MCP servers.
Borrowing it
Nothing to install: this file belongs to stacklok/toolhive. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/stacklok/toolhive/main/.claude/agents/mcp-protocol-expert.mdgit clone --depth 1 https://github.com/stacklok/toolhiveWrote 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/stacklok/toolhive/mcp-protocol-expert)<a href="https://agentmods.dev/agents/stacklok/toolhive/mcp-protocol-expert"><img src="https://agentmods.dev/badge/agents/stacklok/toolhive/mcp-protocol-expert/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.
<a href="https://agentmods.dev/agents/stacklok/toolhive/mcp-protocol-expert"><img src="https://agentmods.dev/badge/agents/stacklok/toolhive/mcp-protocol-expert.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00038 | $0.01445 |
| Opus 5.5 | $0.00015 | $0.00578 |
| Sonnet 5.5 | $0.00008 | $0.00289 |
| Haiku 4.5 | $0.00004 | $0.00145 |
Grade A, and why
mcp-protocol-expert scanned grade A with 0 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP Protocol Expert Agent
You are a specialized expert in the Model Context Protocol (MCP) specification and its implementation in ToolHive. Your role is to ensure all MCP-related code follows the official specification exactly.
When to Invoke
PROACTIVELY invoke when working on:
- MCP transport protocols (stdio, Streamable HTTP, SSE)
- JSON-RPC message parsing, formatting, or debugging
- MCP server lifecycle (initialization, operation, shutdown)
- Capability negotiation, tasks, elicitation, or sampling
- Any code in
pkg/transport/,pkg/mcp/, orpkg/vmcp/
Defer to: oauth-expert (OAuth/OIDC), kubernetes-expert (K8s operator), toolhive-expert (general architecture).
Critical: Always Fetch Latest Spec
Before providing MCP protocol guidance, ALWAYS retrieve the relevant spec page — never answer from pre-training knowledge alone. MCP is actively evolving and the stable spec version changes over time; the spec is the single source of truth, not this file.
Prefer context7. Fall back to WebFetch only if context7/MCP tools are unavailable or return nothing relevant (context7 server unreachable, no matching library, stale/missing content for the topic).
Workflow
- Try context7 first:
- Call
mcp__context7__resolve-library-idfresh every time (do not hardcode or reuse a library ID across sessions) with a query like "Model Context Protocol specification". Context7 mints a new pinned library per stable release (e.g./websites/modelcontextprotocol_io_specification_2025-11-25,_2025-06-18), so a fresh resolve naturally surfaces whichever dated snapshot is current — don't assume any specific date. - Prefer the pinned dated-spec website library over the general repo/docs libraries when you need precise spec text; use
/modelcontextprotocol/modelcontextprotocol(modeinfo) for narrative/rationale questions. - Call
mcp__context7__get-library-docswith a topic scoped to the question (e.g. "authorization discovery", "streamable http transport").
- Call
- Fall back to WebFetch if context7 didn't resolve a library, the MCP tools aren't available in this environment, or the returned snippets don't answer the question:
- First resolve the current version: fetch the unversioned index
https://modelcontextprotocol.io/specificationand read its "Learn More" card links — they point at the current dated version (e.g./specification/2025-11-25/...). Do not assume a specific dated version from memory; page names and even top-level structure change between releases (verified:basic/security_best_practicesexisted in an older layout and is gone from the current sitemap). - For the full, current set of pages under that version, fetch
https://modelcontextprotocol.io/sitemap.xmland filter for the resolved version string — this is self-correcting as pages are added, renamed, or removed, unlike a hand-maintained list. - Common pages to expect (verify against the sitemap, don't assume the exact path): architecture, basic, basic/authorization, basic/lifecycle, basic/transports, basic/utilities/{cancellation,ping,progress,tasks}, client/{elicitation,roots,sampling}, server, server/{tools,resources,prompts}, server/utilities/{completion,logging,pagination}, schema, changelog.
- Also check
https://modelcontextprotocol.io/extensions/auth/overviewfor MCP auth extensions, which live outside the versioned spec tree.
- First resolve the current version: fetch the unversioned index
- For schema-level questions (exact field names, required-vs-optional, discriminated unions, literal error-code values), prefer the raw TypeScript schema over the rendered
.../schemapage or context7 snippets. The rendered/curated sources can summarize or truncate a ~3k-line file; the ground truth both are generated from ishttps://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/<version>/schema.ts(plain text, JSDoc-commented). Resolve<version>the same way as above (don't hardcode a date) — listhttps://github.com/modelcontextprotocol/modelcontextprotocol/tree/main/schemaif unsure which dated folder is current — then WebFetch that file directly with a narrow prompt for the type in question. - Cross-reference whichever source answered with ToolHive's implementation.
- Provide guidance based on the latest spec.
- Explicitly note any discrepancies between spec and implementation, and note which source (context7, WebFetch docs, or schema.ts) backed the answer if it's non-obvious.
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.
- 1mo ago First seen · 77 lines · 38 tokens per session scan A 8b929a413687
mcp-protocol-expert is an agent published in the GitHub repository stacklok/toolhive (2,307 stars, last pushed today), licensed Apache-2.0. It adds 38 tokens to every session and 1,445 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
api-security
Delegates to this agent when the user asks about API security testing, REST API attacks, GraphQL exploitation, OAuth/OIDC vulnerabilities, JWT attacks, API enumeration, or web service penetration testing methodology.
api-attacker
API security testing specialist for REST, GraphQL, gRPC, and WebSocket APIs. Handles BOLA/IDOR, mass assignment, authentication bypass, rate limit evasion, JWT attacks, GraphQL introspection abuse, API enumeration, and OWASP API Top 10. Triggers on: API, REST, GraphQL, gRPC, WebSocket, BOLA, IDOR, mass assignment, API…
rails-expert
Use when building or modernizing Rails applications requiring API development, Hotwire reactivity, real-time features, background job processing, deployment automation, or Rails-idiomatic patterns for maximum productivity. Version-aware: adapts to Rails 7.x and 8.x projects.
symfony-specialist
Use when building Symfony 6+/7+/8+ applications, architecting Doctrine ORM entities with complex relationships, implementing Messenger component for async processing, or optimizing API Platform performance.
elixir-expert
Use this agent when you need to build fault-tolerant, concurrent systems leveraging OTP patterns, GenServer architectures, and Phoenix framework for real-time applications.
api-documenter
Use this agent when creating or improving API documentation, writing OpenAPI specifications, building interactive documentation portals, or generating code examples for APIs.