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 instructions/agentcathq/webmcp-react/agents-mdgit clone --depth 1 https://github.com/agentcathq/webmcp-reactWhat 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.01403 | $0.01403 |
| Opus 5 | $0.00701 | $0.00701 |
| Sonnet 5 | $0.00281 | $0.00281 |
| Haiku 4.5 | $0.00140 | $0.00140 |
Grade A, and why
webmcp-react AGENTS.md 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 2d 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file is for AI agents contributing to the webmcp-react library. For integrating webmcp-react into your app, see the skills/ directory.
Reference
- WebMCP standard: https://github.com/webmachinelearning/webmcp — the W3C spec this library implements
- API reference:
docs/api.md— this library's full API docs
Commands
| Task | Command |
|---|---|
| Install | pnpm install |
| Build | pnpm build |
| Test | pnpm test |
| Test (watch) | pnpm test:watch |
| Test (single file) | pnpm test -- path/to/file.test.tsx |
| Type check | pnpm typecheck |
| Lint | pnpm lint |
| Lint + fix | pnpm lint:fix |
| Full check before PR | pnpm build && pnpm typecheck && pnpm lint && pnpm test |
Project Structure
src/ ← core library (your focus)
├── index.ts ← public API exports
├── types.ts ← all TypeScript types
├── context.tsx ← WebMCPProvider + useWebMCPStatus hook
├── hooks/
│ └── useMcpTool.ts ← main hook for tool registration
├── polyfill/ ← document.modelContext polyfill
│ ├── index.ts ← installPolyfill / cleanupPolyfill + polyfill marker
│ ├── registry.ts ← in-memory tool storage
│ ├── testing-shim.ts ← simulates MCP client calls
│ └── validation.ts ← input validation against JSON Schema
└── utils/
├── schema.ts ← Zod → JSON Schema conversion + schema fingerprinting
└── warn.ts ← dev-only fire-once warnings
Other directories (don't modify unless explicitly asked):
extension/— Chrome extension that bridges web tools to desktop MCP clientsexamples/playground/— Wordle demo showcasing dynamic tool registrationexamples/nextjs/— Next.js integration exampleskills/— agent skills for consumers of the librarydocs/api.md— full API reference
Architecture Decisions — Don't "Fix" These
These patterns look like they could be simplified but exist for specific reasons:
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.
- 2d ago First seen · 104 lines · 1,403 tokens per session scan A c26e8abc6c4a
webmcp-react AGENTS.md is an instructions file published in the GitHub repository agentcathq/webmcp-react (46 stars, last pushed 9d ago), licensed MIT. It adds 1,403 tokens to every session, about $0.0070 per session on Opus 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 instructions, from other repositories
xahau-mcp CLAUDE.md
Claude Code instructions for Hugegreencandle/xahau-mcp, covering xahau-mcp — agent guide, what it does, layout (src/), build / test / run and honesty rules (the product's credibility).
agentboard AGENTS.md
AGENTS.md instructions for Vladev0/agentboard, covering agentboard — conventions for agents, quick start for a new agent, 1. primary path — mcp tools, project memory — a graph of knowledge notes and protocol for long loop/cycle sessions.
harvey-design-system-mcp AGENTS.md
AGENTS.md instructions for thenpceo/harvey-design-system-mcp: Run the local server yourself and open the preview in the browser available to this environment. Do not give the user server-start instructions when you can run it.
synapse CLAUDE.md
Instructions for NimbleBrainInc/synapse, covering @nimblebrain/synapse, verification, releasing, hard rules and where spec types are used.
teadata-mcp AGENTS.md
AGENTS.md instructions for adpena/teadata-mcp, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and testing guidelines.
teadata-mcp GEMINI.md
Gemini CLI instructions for adpena/teadata-mcp, covering project context: teadata-mcp, technology stack, backend, frontend and directory structure.