{"_id":"@codedthemes/uiable-mcp","name":"@codedthemes/uiable-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@codedthemes/uiable-mcp","version":"0.1.0","description":"MCP server for the uiable shadcn registry: discover, install, and generate UI from uiable blocks.","license":"Apache-2.0","author":{"name":"Ray","email":"codedthemes@gmail.com"},"type":"module","bin":{"uiable-mcp":"dist/index.js"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.json","dev":"tsc -p tsconfig.json --watch","start":"node dist/index.js","inspect":"npx @modelcontextprotocol/inspector node dist/index.js","test":"npm run build && node --test \"test/**/*.test.mjs\"","prepublishOnly":"npm run build && npm test"},"keywords":["mcp","shadcn","uiable","registry","ui"],"dependencies":{"@modelcontextprotocol/server":"^2.0.0","zod":"^4.4.3"},"devDependencies":{"@modelcontextprotocol/client":"^2.0.0","@types/node":"^24.13.3","typescript":"^5.9.3"},"engines":{"node":">=20"},"gitHead":"bbd04e3b7c61c43dd20367ffc4c875ce768b9cd7","_id":"@codedthemes/uiable-mcp@0.1.0","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-6otSPaJ5XRzRNAjcZkTQ3pUrVcQBpogXtMT5IMZdQ1cp2JdXKL/AwXckB8V4yC8kGNsRSBJl1fEmT94Cu5fKbg==","shasum":"a39e71d02763d699e2ce5d0e5b1e45da3452dcb8","tarball":"https://registry.npmjs.org/@codedthemes/uiable-mcp/-/uiable-mcp-0.1.0.tgz","fileCount":21,"unpackedSize":63514,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDB1yX8gw9+FNhNfe9sMJll+5RdTnC8tJ9kntD7bKsrpgIgKsLirPmoW2WFW7TISyEOAyIzs+j1+/xep3G5dgJGeYk="}]},"_npmUser":{"name":"codedthemes-official","email":"codedthemes@gmail.com"},"directories":{},"maintainers":[{"name":"codedthemes-official","email":"codedthemes@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/uiable-mcp_0.1.0_1785828452355_0.20982969934797002"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T07:27:32.113Z","0.1.0":"2026-08-04T07:27:32.493Z","modified":"2026-08-04T07:27:32.707Z"},"maintainers":[{"name":"codedthemes-official","email":"codedthemes@gmail.com"}],"description":"MCP server for the uiable shadcn registry: discover, install, and generate UI from uiable blocks.","keywords":["mcp","shadcn","uiable","registry","ui"],"author":{"name":"Ray","email":"codedthemes@gmail.com"},"license":"Apache-2.0","readme":"# uiable-mcp\n\nPublished as [`@codedthemes/uiable-mcp`](https://www.npmjs.com/package/@codedthemes/uiable-mcp).\n\nMCP server for the [uiable](https://uiable.com) shadcn registry. It exposes tools so AI\nassistants (Claude Code, Cursor, VS Code, …) can **discover**, **install**, and\n**generate** UI from uiable blocks via natural language.\n\nThis is the \"Layer 2\" custom server. Layer 1 (the standard 7 registry tools) comes for\nfree from `npx shadcn@latest mcp` once a consumer has `@uiable` configured.\n\n## Protocol support\n\nSpeaks **MCP 2026-07-28** and every 2025-era revision from the same binary. `serveStdio`\ndecides the era per connection, so a client that predates 2026-07-28 connects exactly as\nit always did — there is nothing for a consumer to change or configure.\n\n## Tools\n\n| Tool              | Purpose                                                                                      |\n| ----------------- | -------------------------------------------------------------------------------------------- |\n| `list_blocks`     | List page-level blocks (hero, pricing, feature, footer…), filter by category.                |\n| `list_components` | List primitive components (button, input, card…), filter by category.                        |\n| `search_blocks`   | Ranked keyword/intent search across all items, with previews + install commands.             |\n| `get_block`       | Full details for one item: metadata, files, add command, and a link to its source.           |\n| `get_add_command` | `npx shadcn add` command(s) for one or more items (validates names).                         |\n| `create_ui`       | Compose a page from blocks for an intent: ordered plan + `page.tsx` scaffold + add commands. |\n\nEvery tool declares an `outputSchema` and returns `structuredContent` alongside the\nserialized text, and is annotated read-only / non-destructive / idempotent.\n\n`get_block` links each item's source as a resource rather than inlining it; pass\n`includeContent: true` when you actually want the file bodies in the result.\n\n## Resources and prompts\n\n| URI                     | Contents                                                          |\n| ----------------------- | ----------------------------------------------------------------- |\n| `uiable://catalog`      | The full registry index.                                          |\n| `uiable://item/{name}`  | One item's metadata and the full source of every file it installs. |\n\nThe `{name}` variable is completable from the live catalog. Two prompts —\n`build-page` and `find-block` — wrap the common workflows, with completions on their\n`pageType` and `category` arguments.\n\n## Wire into a client\n\n```json\n{\n  \"mcpServers\": {\n    \"uiable\": { \"command\": \"npx\", \"args\": [\"@codedthemes/uiable-mcp\"] }\n  }\n}\n```\n\n**Claude Code** (`.mcp.json`), **Cursor** (`.cursor/mcp.json`), **VS Code**\n(`.vscode/mcp.json`) all take the same shape.\n\n### Pro items\n\nPro blocks are listed in the catalog like any other item — only their **source** is\ngated. Discovery (`list_blocks`, `search_blocks`) needs no credential; installing or\nreading a pro item does. Generate a token at\n[uiable.com/account](https://uiable.com/account) and pass it through the client's `env`\nblock; the server forwards it as a bearer credential and the registry decides\nentitlement:\n\n```json\n{\n  \"mcpServers\": {\n    \"uiable\": {\n      \"command\": \"npx\",\n      \"args\": [\"@codedthemes/uiable-mcp\"],\n      \"env\": { \"UIABLE_TOKEN\": \"uia_…\" }\n    }\n  }\n}\n```\n\nItems that need a subscription come back marked `pro: true` (requires the registry's\ncatalog build to emit that flag). Listing results stay `cacheScope: \"public\"` — the\ncatalog is identical for every caller — while `resources/read` becomes `\"private\"` once\na token is configured, so no shared cache can serve gated source to another caller.\n\n## Configuration\n\n| Env var            | Purpose                                                                     |\n| ------------------ | --------------------------------------------------------------------------- |\n| `UIABLE_TOKEN`     | Pro registry token. Unlocks pro items; omitted means the public catalog.     |\n| `UIABLE_BASE_URL`  | Registry host. Defaults to `https://uiable.com`.                            |\n| `UIABLE_CATALOG`   | Explicit `registry-index.json` URL **or local file path**. Wins over the above. |\n| `UIABLE_NAMESPACE` | Install namespace (default `@uiable`, baked into the catalog).               |\n\nWhen `UIABLE_CATALOG` points at a local file, item sources are read from `r/<name>.json`\nbeside it — the layout `shadcn build` produces — so a local checkout stays self-consistent.\n\n## Develop\n\n```bash\nnpm install\nnpm run build\nnpm test          # builds, then runs the suite against test/fixtures\nnpm run inspect   # MCP Inspector against the built server\n```\n\nThe test suite covers both protocol eras: 2025-era over a linked in-memory pair,\n2026-07-28 by driving `createMcpHandler` through its own fetch function, plus one\nend-to-end check that the built binary boots over stdio.\n\nTo develop against a local registry build:\n\n```bash\nUIABLE_CATALOG=/path/to/uiable/public/registry-index.json npm start\n```\n\n## Publish\n\n`npm publish` ships `dist/` only. `prepublishOnly` builds and runs the tests first.\n`publishConfig.access` is set to `public` — required for a scoped package to install for\neveryone via `npx`, since npm defaults scoped packages to restricted/private otherwise.\n","readmeFilename":"README.md","_rev":"1-50fd415b433ca53b6bfa139c8ab1bf33"}