
Primereact Mcp
io.github.wisdomrock由 GitHub 账号 wisdomrock 发布v1.2.3更新于 Oct 24, 2026
105 PrimeReact v10 components with props, types, and events
概览
本地 MCP 服务器,提供 PrimeReact v10 组件文档(属性、事件、示例与搜索),让助手查询和比较 UI 组件。
- 可以做什么
- 列出、搜索组件,按分类筛选,并根据使用场景推荐组件
- 查看组件的属性、事件、方法、插槽、Pass Through 选项、设计令牌与 CSS 类名
- 获取组件分区、用法示例、导入语句与官方文档链接
- 按属性、事件或特性查找组件,并并排比较两个组件
- 查询版本与兼容性信息,列出表单、数据展示与浮层组件分组
- 适用场景
- 在使用 PrimeReact v10 开发或维护 React 界面时,希望助手准确回答组件 API 问题、挑选合适组件,或给出正确的导入语句和示例代码。
- 运行要求
- 需要 Node.js 18 或更高版本;以 stdio 在本地运行,通常通过 npx 免安装使用,也可克隆仓库后运行。组件数据已预先生成并随包提供。未声明需要账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Primereact Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
primereact-mcp
A Model Context Protocol (MCP) server that gives AI assistants full access to PrimeReact v10 component documentation — props, events, examples, and search.
Why does this exist?
The PrimeReact team has not yet published an official@primereact/mcppackage. 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. The official PrimeReact MCP will be launched with v11.
Features
- 105 PrimeReact v10 components with full prop/event documentation
- 15+ MCP tools: search, suggest, inspect props, get examples, compare components, and more
- Works with Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP-compatible client
- Generated directly from PrimeReact's TypeScript
.d.tssource — no stale hand-written docs
Quick Start
Prerequisites
- Node.js 18 or later
- An MCP-compatible AI client (see below)
Option A — npx (no install needed)
Use npx -y primereact-mcp directly in your MCP client config. Component data ships pre-generated inside the package.
Option B — clone and run locally
To regenerate component data after a PrimeReact version upgrade:
MCP Client Setup
Claude Code (CLI)
Or add it to your project's .mcp.json:
Claude Desktop
Add the following to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Cursor
Add to .cursor/mcp.json in your project root:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
Available Tools
Example prompts
Upgrading PrimeReact Version
To update the component data after upgrading PrimeReact:
The generate-data.mjs script re-reads all .d.ts files and rewrites components-data.json.
Project Structure
MCP Registry
This server is published to the Official MCP Registry. Registry metadata is in server.json at the repo root.
How it works
-
generate-data.mjsreads each component's.d.tsfile from theprimereactnpm package, parses JSDoc comments and TypeScript interface definitions using a line-by-line state machine, and writes structured JSON tocomponents-data.json. -
index.mjscallsrunPrimeMcpServer()from@primeuix/mcp— the same shared engine used by the official PrimeNG MCP server — passing PrimeReact-specific configuration and the generated component data.
Contributing
Contributions welcome! Areas that would benefit from improvement:
- Richer examples — add JSX code snippets to more component sections
- PrimeReact v11 support — the alpha v11 uses
@primereact/types, requiring a different parsing strategy - Pass Through (PT) data — extract PT options from
.d.tsfiles - Design tokens — extract CSS variable names
Please open an issue before sending a large PR.
License
MIT — see LICENSE.
Related
- @primeng/mcp — Official MCP server for PrimeNG (Angular)
- @primeuix/mcp — Shared MCP engine by the PrimeFaces team
- PrimeReact Documentation
- Model Context Protocol
来源:README.md,提交 9685499
工具
0版本历史
1- v1.2.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分