{
  "markdown": "# primereact-mcp\n\nA Model Context Protocol (MCP) server that gives AI assistants full access to **PrimeReact v10** component documentation — props, events, examples, and search.\n\n> **Why does this exist?**  \n> The PrimeReact team has not yet published an official `@primereact/mcp` package. This server fills that gap using the same engine (`@primeuix/mcp`) that powers the official PrimeNG MCP server, with component data extracted from PrimeReact's TypeScript definitions.\n> The official PrimeReact MCP will be launched with v11.\n\n---\n\n## Features\n\n- 105 PrimeReact v10 components with full prop/event documentation\n- 15+ MCP tools: search, suggest, inspect props, get examples, compare components, and more\n- Works with Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP-compatible client\n- Generated directly from PrimeReact's TypeScript `.d.ts` source — no stale hand-written docs\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) 18 or later\n- An MCP-compatible AI client (see below)\n\n### Option A — npx (no install needed)\n\nUse `npx -y primereact-mcp` directly in your MCP client config. Component data ships pre-generated inside the package.\n\n### Option B — clone and run locally\n\n```bash\ngit clone https://github.com/wisdomrock/primereact-mcp.git\ncd primereact-mcp\nnpm install\nnode index.mjs   # starts the server\n```\n\nTo regenerate component data after a PrimeReact version upgrade:\n\n```bash\nnpm install primereact@10   # install the target version\nnode generate-data.mjs      # rewrites components-data.json\n```\n\n---\n\n## MCP Client Setup\n\n### Claude Code (CLI)\n\n```bash\n# via npx — zero install\nclaude mcp add primereact -- npx -y primereact-mcp\n\n# or point at a local clone\nclaude mcp add primereact -- node /absolute/path/to/primereact-mcp/index.mjs\n```\n\nOr add it to your project's `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"primereact\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"primereact-mcp\"]\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd the following to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"primereact\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"primereact-mcp\"]\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `.cursor/mcp.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"primereact\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"primereact-mcp\"]\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"primereact\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"primereact-mcp\"]\n    }\n  }\n}\n```\n\n---\n\n## Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `list_components` | List all 105 PrimeReact components, optionally filtered by category |\n| `get_component` | Get full details for a component (stats, props preview, sections) |\n| `get_component_props` | Get all props for a component with types and descriptions |\n| `get_component_events` | Get all event callbacks a component supports |\n| `get_component_methods` | Get component methods (where documented) |\n| `get_component_slots` | Get slots/render props for a component |\n| `get_component_pt` | Get Pass Through (PT) customization options |\n| `get_component_tokens` | Get design tokens (CSS variables) |\n| `get_component_styles` | Get CSS class names |\n| `get_component_sections` | Get all sections with examples (basic, advanced, etc.) |\n| `get_component_import` | Get the correct import statement |\n| `get_component_url` | Get the official documentation URL |\n| `get_usage_example` | Get code examples for a component |\n| `search_components` | Search components by name or description |\n| `find_by_prop` | Find all components that have a specific prop |\n| `find_by_event` | Find all components that emit a specific event |\n| `find_components_with_feature` | Find components with a feature (e.g. \"filter\", \"lazy\", \"virtual\") |\n| `compare_components` | Compare two components side by side |\n| `suggest_component` | Suggest components based on a use-case description |\n| `get_categories` | Get all component categories |\n| `get_version_info` | Get PrimeReact version and compatibility info |\n| `get_form_components` | Get all form input components |\n| `get_data_components` | Get all data display components (tables, lists, trees) |\n| `get_overlay_components` | Get all overlay/popup components |\n\n### Example prompts\n\n```\nWhich PrimeReact component should I use for a searchable multi-select?\n\nWhat props does the DataTable component accept?\n\nFind all PrimeReact components that have a filter prop.\n\nCompare the Dropdown and AutoComplete components.\n\nShow me the import statement for the Calendar component.\n```\n\n---\n\n## Upgrading PrimeReact Version\n\nTo update the component data after upgrading PrimeReact:\n\n```bash\nnpm install primereact@NEW_VERSION\nnode generate-data.mjs\n```\n\nThe `generate-data.mjs` script re-reads all `.d.ts` files and rewrites `components-data.json`.\n\n---\n\n## Project Structure\n\n```\nprimereact-mcp/\n├── index.mjs              # MCP server entry point\n├── generate-data.mjs      # Generates components-data.json from .d.ts files\n├── components-data.json   # Generated component data (committed for convenience)\n├── server.json            # MCP Registry metadata\n├── package.json\n└── README.md\n```\n\n## MCP Registry\n\nThis server is published to the [Official MCP Registry](https://modelcontextprotocol.io). Registry metadata is in [`server.json`](./server.json) at the repo root.\n\n### How it works\n\n1. **`generate-data.mjs`** reads each component's `.d.ts` file from the `primereact` npm package, parses JSDoc comments and TypeScript interface definitions using a line-by-line state machine, and writes structured JSON to `components-data.json`.\n\n2. **`index.mjs`** calls `runPrimeMcpServer()` from `@primeuix/mcp` — the same shared engine used by the official PrimeNG MCP server — passing PrimeReact-specific configuration and the generated component data.\n\n---\n\n## Contributing\n\nContributions welcome! Areas that would benefit from improvement:\n\n- **Richer examples** — add JSX code snippets to more component sections\n- **PrimeReact v11 support** — the alpha v11 uses `@primereact/types`, requiring a different parsing strategy\n- **Pass Through (PT) data** — extract PT options from `.d.ts` files\n- **Design tokens** — extract CSS variable names\n\nPlease open an issue before sending a large PR.\n\n---\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n\n---\n\n## Related\n\n- [@primeng/mcp](https://www.npmjs.com/package/@primeng/mcp) — Official MCP server for PrimeNG (Angular)\n- [@primeuix/mcp](https://www.npmjs.com/package/@primeuix/mcp) — Shared MCP engine by the PrimeFaces team\n- [PrimeReact Documentation](https://primereact.org)\n- [Model Context Protocol](https://modelcontextprotocol.io)",
  "bytes": 6810,
  "sha": "4b256fcb173cd7f42f028f88e572eefda16825bf0d025c8ba2054e6df6feeefe",
  "repo_slug": "wisdomrock/primereact-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_wisdomrock_primereact_mcp_2736ed86/readme"
}