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 skills/agentcathq/webmcp-react/webmcp-add-toolnpx skills add agentcathq/webmcp-react --skill webmcp-add-toolgit clone --depth 1 https://github.com/agentcathq/webmcp-reactWrote 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/skills/agentcathq/webmcp-react/webmcp-add-tool)<a href="https://agentmods.dev/skills/agentcathq/webmcp-react/webmcp-add-tool"><img src="https://agentmods.dev/badge/skills/agentcathq/webmcp-react/webmcp-add-tool.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.00073 | $0.01593 |
| Opus 5 | $0.00036 | $0.00796 |
| Sonnet 5 | $0.00015 | $0.00319 |
| Haiku 4.5 | $0.00007 | $0.00159 |
Grade A, and why
webmcp-add-tool 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 today.
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 — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add a WebMCP Tool
Overview
Each tool is a React component that calls useMcpTool. It registers on mount, unregisters on unmount. Tools can be headless (return null) or render UI showing execution state.
Workflow
- Determine the tool's name, description, input schema, and what the handler does
- Choose headless vs UI tool
- Scaffold using the appropriate template below
- Set annotations based on tool behavior
- Wire the component into the
<WebMCPProvider>tree
Template: Headless tool
For tools that do work without rendering anything visible:
import { useMcpTool } from "webmcp-react";
import { z } from "zod";
export function MyTool() {
useMcpTool({
name: "my_tool",
description: "One-line description of what this tool does",
input: z.object({
// Define each input field with .describe() for AI context
query: z.string().describe("The search query"),
}),
handler: async ({ query }, { signal }) => {
// signal aborts if the agent cancels — forward it to cancellable work
const result = await doSomething(query, { signal });
return {
content: [{ type: "text", text: JSON.stringify(result) }],
};
},
});
return null;
}
Template: Tool with execution state UI
For tools that show loading, results, or errors:
import { useMcpTool } from "webmcp-react";
import { z } from "zod";
export function MyTool() {
const { state, execute, reset } = useMcpTool({
name: "my_tool",
description: "One-line description of what this tool does",
input: z.object({
text: z.string().describe("Input text to process"),
}),
handler: async ({ text }) => {
const result = await process(text);
return { content: [{ type: "text", text: result }] };
},
onSuccess: (result) => {
// Optional: analytics, toast, etc.
},
onError: (error) => {
// Optional: error reporting
},
});
return (
<div>
<button onClick={() => execute({ text: "hello" })} disabled={state.isExecuting}>
{state.isExecuting ? "Processing..." : "Run"}
</button>
{state.lastResult && <p>{state.lastResult.content[0].text}</p>}
{state.error && <p className="error">{state.error.message}</p>}
<span>Executions: {state.executionCount}</span>
</div>
);
}
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.
- today Changed b3b0315c30ae
- 4d ago First seen · 214 lines · 73 tokens per session scan A a3c7de658f0e
webmcp-add-tool is a skill published in the GitHub repository agentcathq/webmcp-react (47 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 1,593 once invoked, about $0.0004 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 skills, from other repositories
react-hooks-composition
Advanced React hooks composition patterns - SWR integration, debounced search, memoized contexts, state machines, and performance optimization.
react-patterns
Comprehensive React 19 patterns expert covering Server Components, Actions, use() hook, useOptimistic, useFormStatus, useFormState, React Compiler, concurrent features, Suspense, and modern TypeScript development. 트리거: "React", "컴포넌트", "hooks", "JSX/TSX", "상태 관리" 안티-트리거: "Vue", "Svelte", "Angular", "백엔드".
Functional Programming in React
Practical patterns for using fp-ts with React - hooks, state, forms, data fetching. Works with React 18/19, Next.js 14/15.
react-expert
Expert-level React development with hooks, performance optimization, state management, and modern patterns.
react-code-review-patterns
Review checklists and patterns for React/TypeScript frontend code reviews. Use when: (1) reviewing React components, (2) checking TypeScript type safety, (3) validating hooks usage, (4) checking accessibility compliance.
zustand-docs
Zustand — small, fast, scalable state management for React. Store creation, hooks, middleware, TypeScript.