usethishook-mcp
v1.3.0
Published
MCP server for usethishook 1.3.0 — search 53 React hooks, docs, and copy-paste examples.
Maintainers
Readme
usethishook-mcp
MCP (Model Context Protocol) server for useThisHook 1.3.0 (53 hooks).
Playground setup page: usethishook.mentorbridge.in/mcp.
AI clients (Cursor, Claude Desktop, and other MCP hosts) can list, search, and fetch typed docs/examples for every hook in the library.
Tools
| Tool | Purpose |
| ---------------- | ------------------------------------------------------- |
| list_hooks | List hooks (optional category: State / Browser / App) |
| search_hooks | Keyword search across name, summary, docs, and API text |
| get_hook | Full markdown docs + copy-paste example for one hook |
| recommend_hook | Best hooks for a natural-language React task |
Resources
| URI | Content |
| -------------------------- | -------------------------- |
| usethishook://hooks | JSON index of every hook |
| usethishook://hooks/{id} | Markdown docs for one hook |
Prompt
pick_hook— guided prompt that tells the model to use these tools before choosing a hook.
Cursor setup
Add to your MCP config (Cursor Settings → MCP, or .cursor/mcp.json):
{
"mcpServers": {
"usethishook": {
"command": "npx",
"args": ["-y", "usethishook-mcp"]
}
}
}From this monorepo (after npm run mcp:build):
{
"mcpServers": {
"usethishook": {
"command": "node",
"args": ["mcp/dist/index.js"]
}
}
}Develop in this repo
From the repository root:
npm run mcp:catalog # refresh data/catalog.json from playground docs
npm run mcp:build
npm run mcp:testOr inside mcp/:
npm install
npm test
npm run build
npm start # stdio MCP server (for Inspector / hosts)Try with the MCP Inspector:
npx @modelcontextprotocol/inspector node mcp/dist/index.jsKeeping the catalog fresh
data/catalog.json is generated from the playground (api/, descriptions/, *Hooks.ts, demos).
Whenever you add or change a hook’s playground docs, run:
npm run mcp:catalogCI runs mcp:catalog and fails if the committed JSON is stale.
Publish
From GitHub: Actions → Publish MCP npm → Run workflow on main (OIDC Trusted Publishing). Do not publish from a laptop unless that publisher is unavailable.
Trusted publisher on npmjs.com/package/usethishook-mcp → Settings:
| Field | Value |
| -------------------- | -------------------------------------------------------------------------- |
| Organization or user | senthilkumar979 |
| Repository | useThisHook |
| Workflow filename | mcp-npm-publish.yml (filename only) |
| Allowed actions | enable Allow npm publish (npm defaults new publishers to stage-only) |
A 404 on PUT …/usethishook-mcp with a signed provenance log almost always means this config is wrong, not that the package is missing.
