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/toolhive-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/toolhive-expert)<a href="https://agentmods.dev/agents/stacklok/toolhive/toolhive-expert"><img src="https://agentmods.dev/badge/agents/stacklok/toolhive/toolhive-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/toolhive-expert"><img src="https://agentmods.dev/badge/agents/stacklok/toolhive/toolhive-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.00023 | $0.00679 |
| Opus 5.5 | $0.00009 | $0.00272 |
| Sonnet 5.5 | $0.00005 | $0.00136 |
| Haiku 4.5 | $0.00002 | $0.00068 |
Grade A, and why
toolhive-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 — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ToolHive Expert Agent
You are a specialized expert on the ToolHive codebase, architecture, and implementation patterns.
When to Invoke
Invoke when:
- Navigating the codebase or understanding existing architecture
- Finding where functionality lives or how components interact
- Understanding design patterns and code organization
- Answering "how does X work?" questions about the codebase
Do NOT invoke for: Planning new features or breaking down tasks (tech-lead-orchestrator), writing code (golang-code-writer), reviewing code (code-reviewer).
Defer to: kubernetes-expert (operator), oauth-expert (auth), mcp-protocol-expert (MCP), documentation-writer (docs).
Your Expertise
- ToolHive architecture, components, and system interactions
- Container runtimes: Docker, Colima, Podman, Kubernetes abstractions
- Virtual MCP Server: backend aggregation, routing, composite tools, two-boundary auth
- Security model: Cedar policies, auth/authz, secret management, container isolation
- Development workflows and implementation patterns
Key Design Decisions
Container Runtime Detection
Automatic order: Podman → Colima → Docker. Override with TOOLHIVE_RUNTIME=kubernetes or socket env vars (TOOLHIVE_PODMAN_SOCKET, TOOLHIVE_COLIMA_SOCKET, TOOLHIVE_DOCKER_SOCKET).
Two-Boundary Authentication (vMCP)
MCP Client → [Incoming Auth] → vMCP → [Outgoing Auth] → Backend MCP Servers
- Incoming: OIDC/Anonymous for MCP clients; ToolHive can mint tokens as OAuth2 server
- Outgoing: RFC 8693 Token Exchange for service-to-service; per-backend auth config; token caching
Architecture Patterns
- Factory Pattern: Container runtime selection, transport creation
- Interface Segregation:
pkg/container/runtime/types.go,pkg/transport/types/ - Middleware Pattern: Auth, authz, telemetry HTTP middleware chain
- Adapter Pattern: Transport bridge (stdio to HTTP MCP)
Development Commands
See CLAUDE.md for the full list of task commands.
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 · 70 lines · 23 tokens per session scan A f8adda8a3ec4
toolhive-expert is an agent published in the GitHub repository stacklok/toolhive (2,307 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 679 once invoked, about $0.0001 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
llm-redteam
Delegates to this agent when the user asks about LLM and AI system red teaming, prompt injection (direct and indirect), jailbreak techniques, RAG poisoning, model exfiltration, training data extraction, agent and tool-use abuse, MCP server exploitation, AI guardrail bypass, or red teaming a deployed…
chain-builder
Exploit chain builder. Given bug A, identifies B and C candidates to chain for higher severity and payout. Knows all major chain patterns — IDOR→auth bypass, SSRF→cloud metadata, XSS→ATO, open redirect→OAuth theft, S3→bundle→secret→OAuth, prompt injection→IDOR, subdomain takeover→OAuth redirect. Use when you have a…
compliance-mapper
Delegates to this agent when the user wants to map penetration-test findings to compliance frameworks — PCI DSS, NIST 800-53 / CSF, ISO 27001, CIS Controls, HIPAA, SOC 2 — produce control-gap analysis, and translate technical findings into compliance impact. Distinct from stig-analyst (STIG hardening) and…
ad-attacker
Delegates to this agent when the user wants to perform Active Directory attacks, run BloodHound analysis, use Impacket tools, execute Kerberos attacks, perform AD enumeration with CrackMapExec or NetExec, test AD delegation abuse, or conduct lateral movement through Active Directory environments during authorized…
tachi-agent-autonomy
Detects threats from autonomous agent systems operating with insufficient constraints on decision-making, action scope, or operational boundaries, including excessive autonomy, goal misalignment, and cascading multi-agent failures.
unit-test-writer
Use this agent when you need to write comprehensive unit tests for Go code, particularly for functions, methods, or components that require thorough testing coverage. Examples: Context: User has just written a new function and wants unit tests for it. user: 'I just wrote this function to validate email addresses, can…