{"_id":"@bna-ui/mcp","name":"@bna-ui/mcp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"$schema":"https://json.schemastore.org/package.json","name":"@bna-ui/mcp","version":"1.0.0","type":"module","description":"MCP server for the BNA UI registry — lets AI assistants browse and read components","main":"dist/index.js","bin":{"bna-ui-mcp":"bin/bna-ui-mcp.js"},"keywords":["mcp","model-context-protocol","react-native","expo","bna-ui"],"author":{"name":"Ahmed BNA","email":"ahmdabdelsamea@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ahmedbna/ui.git","directory":"packages/mcp"},"bugs":{"url":"https://github.com/ahmedbna/ui/issues"},"homepage":"https://ui.ahmedbna.com/docs/mcp","publishConfig":{"access":"public"},"engines":{"node":">=22.12.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.30.0","zod":"^4.4.3","bna-ui":"3.0.0"},"devDependencies":{"@types/node":"^22.10.2","eslint":"^9.17.0","typescript":"~6.0.3","@bna-ui/typescript-config":"0.0.0","@bna-ui/eslint-config":"0.0.0"},"scripts":{"build":"pnpm clean && tsc","dev":"tsc --watch","typecheck":"tsc --noEmit","lint":"eslint .","clean":"rm -rf dist .turbo"},"_id":"@bna-ui/mcp@1.0.0","types":"./dist/index.d.ts","_integrity":"sha512-ETxlC3FlG0fOP3ggKFQ6UotYF8BJvyFKg4rFnZTw2U7mN9AFUiy7mGeYTfD9uyWGhTiUqBLimfhAHbBvsZX0aQ==","_resolved":"/Users/ahmedbna/Desktop/ui/packages/mcp/bna-ui-mcp-1.0.0.tgz","_from":"file:bna-ui-mcp-1.0.0.tgz","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-ETxlC3FlG0fOP3ggKFQ6UotYF8BJvyFKg4rFnZTw2U7mN9AFUiy7mGeYTfD9uyWGhTiUqBLimfhAHbBvsZX0aQ==","shasum":"dc2da4dbfe5f970741434b6a631409a5dfa050e4","tarball":"https://registry.npmjs.org/@bna-ui/mcp/-/mcp-1.0.0.tgz","fileCount":8,"unpackedSize":17638,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDH9QPlW507vWliY5GtAD7df96cY8IYbtonKvmpWHjpagIhAPNo+89OvKyjl9jFbHHsjklkcIABH+13gw9PCDNXkTOj"}]},"_npmUser":{"name":"ahmedbna","email":"ahmdabdelsamea@gmail.com"},"directories":{},"maintainers":[{"name":"ahmedbna","email":"ahmdabdelsamea@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_1.0.0_1785819931728_0.1486426130646581"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T05:05:31.609Z","1.0.0":"2026-08-04T05:05:31.861Z","modified":"2026-08-04T05:05:32.023Z"},"maintainers":[{"name":"ahmedbna","email":"ahmdabdelsamea@gmail.com"}],"description":"MCP server for the BNA UI registry — lets AI assistants browse and read components","homepage":"https://ui.ahmedbna.com/docs/mcp","keywords":["mcp","model-context-protocol","react-native","expo","bna-ui"],"repository":{"type":"git","url":"git+https://github.com/ahmedbna/ui.git","directory":"packages/mcp"},"author":{"name":"Ahmed BNA","email":"ahmdabdelsamea@gmail.com"},"bugs":{"url":"https://github.com/ahmedbna/ui/issues"},"license":"MIT","readme":"# @bna-ui/mcp\n\nA [Model Context Protocol](https://modelcontextprotocol.io) server over the\n[BNA UI](https://ui.ahmedbna.com) registry, so Claude Code, Cursor, VS Code and\nother assistants can list, search and read components — props, usage and full\nsource — instead of recalling the library from training data.\n\nThat matters more than it sounds. Asked to \"add a BNA UI button\", a model with no\nway to look it up produces web React: `<div className=\"flex\">`, Tailwind classes,\nRadix primitives. BNA UI is React Native — it renders through `react-native`, not\nthe DOM. Every response from this server is prefixed with that constraint, next to\nthe component it is about to be used for.\n\nNo configuration, no API key. Everything it serves is the public registry.\n\n## Install\n\n**Claude Code**\n\n```bash\nclaude mcp add bna-ui -- npx -y bna-ui mcp\n```\n\n**Any other client** — same command, in its config file:\n\n```json\n{\n  \"mcpServers\": {\n    \"bna-ui\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"bna-ui\", \"mcp\"]\n    }\n  }\n}\n```\n\n- **Cursor** — `.cursor/mcp.json`\n- **VS Code / Copilot** — `.vscode/mcp.json`\n- **Windsurf** — `~/.codeium/windsurf/mcp_config.json`\n- **Codex** — `~/.codex/config.toml`\n\n`bna-ui mcp` hands off to this package, which is why the CLI stays small: the MCP\nSDK pulls in express, hono, ajv, cors and jose for HTTP and SSE transports this\nserver never uses — 93 packages and 24 MB that no `npx bna-ui add` should pay\nfor. Only `StdioServerTransport` is used here.\n\nYou can also run it directly, skipping the CLI shim:\n\n```bash\nnpx -y @bna-ui/mcp\n```\n\n## Tools\n\n| Tool                   | What it answers                                                                                        |\n| ---------------------- | ------------------------------------------------------------------------------------------------------ |\n| `list_components`      | Everything installable, filterable by component, chart, hook or theme.                                 |\n| `search_components`    | \"Which component does X?\" — matches names and descriptions.                                            |\n| `get_component`        | Description, props, variants, usage, accessibility notes, dependencies, full source and every example. |\n| `get_component_source` | Just the source, for when the API is already known.                                                    |\n| `get_install_plan`     | The exact `add` command, the npm packages, and the files it will write.                                |\n| `get_docs`             | Any documentation page as Markdown, with all source expanded inline.                                   |\n\n## Nothing is written to disk\n\n`get_install_plan` returns a command; it does not run it. Installing stays an\nexplicit step you or your assistant takes with `npx bna-ui add`, so nothing\nappears in your project without you asking.\n\n## Configuration\n\n| Variable          | Effect                                                          |\n| ----------------- | --------------------------------------------------------------- |\n| `BNA_UI_REGISTRY` | Registry to read from. Defaults to `https://ui.ahmedbna.com/r`. |\n\nIt shares the `~/.cache/bna-ui` ETag cache with `bna-ui add`, so an agent and a\nhuman hitting the same registry see byte-identical data, repeat calls are free,\nand it keeps working offline against a warm cache. Point `BNA_UI_REGISTRY` at\n`http://localhost:3000/r` to develop against a local docs site; `get_docs` follows\nit there too.\n\nRequires Node.js 22.12 or newer.\n\n## Links\n\n- [Documentation](https://ui.ahmedbna.com/docs/mcp)\n- [Components](https://ui.ahmedbna.com/docs/components)\n- [Source](https://github.com/ahmedbna/ui/tree/main/packages/mcp)\n\nMIT © [Ahmed BNA](https://github.com/ahmedbna)\n","readmeFilename":"README.md","_rev":"1-dce10a569b430c29bc06b38f62ac74a9"}