Primereact Mcp

io.github.wisdomrock由 GitHub 帳號 wisdomrock 發布v1.2.3更新於 Oct 24, 2026

105 PrimeReact v10 components with props, types, and events

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,提供 PrimeReact v10 元件文件(屬性、事件、範例與搜尋),讓助理查詢與比較 UI 元件。

可以做什麼
  • 列出、搜尋元件,依分類篩選,並依使用情境推薦元件
  • 檢視元件的屬性、事件、方法、插槽、Pass Through 選項、設計權杖與 CSS 類別名稱
  • 取得元件各區段、用法範例、匯入語句與官方文件連結
  • 依屬性、事件或功能尋找元件,並並排比較兩個元件
  • 查詢版本與相容性資訊,列出表單、資料顯示與浮層元件分組
適用情境
使用 PrimeReact v10 開發或維護 React 介面時,希望助理準確回答元件 API 問題、挑選合適元件,或提供正確的匯入語句與範例程式碼。
執行需求
需要 Node.js 18 或更新版本;以 stdio 在本機執行,通常透過 npx 免安裝使用,也可複製儲存庫後執行。元件資料已預先產生並隨套件提供。未宣告需要帳號、API 金鑰或環境變數。
安裝前請注意
僅供唯讀文件查詢,未描述憑證或寫入操作。資料僅涵蓋 PrimeReact v10,且由 TypeScript 定義產生,重新產生前可能落後於新版本。透過 npx 執行會在本機執行第三方套件程式碼。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Primereact Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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/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. 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.ts source — 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

bash
git clone https://github.com/wisdomrock/primereact-mcp.gitcd primereact-mcpnpm installnode index.mjs   # starts the server

To regenerate component data after a PrimeReact version upgrade:

bash
npm install primereact@10   # install the target versionnode generate-data.mjs      # rewrites components-data.json

MCP Client Setup

Claude Code (CLI)

bash
# via npx — zero installclaude mcp add primereact -- npx -y primereact-mcp
# or point at a local cloneclaude mcp add primereact -- node /absolute/path/to/primereact-mcp/index.mjs

Or add it to your project's .mcp.json:

json
{  "mcpServers": {    "primereact": {      "command": "npx",      "args": ["-y", "primereact-mcp"]    }  }}

Claude Desktop

Add the following to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "primereact": {      "command": "npx",      "args": ["-y", "primereact-mcp"]    }  }}

Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "primereact": {      "command": "npx",      "args": ["-y", "primereact-mcp"]    }  }}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "primereact": {      "command": "npx",      "args": ["-y", "primereact-mcp"]    }  }}

Available Tools

ToolDescription
list_componentsList all 105 PrimeReact components, optionally filtered by category
get_componentGet full details for a component (stats, props preview, sections)
get_component_propsGet all props for a component with types and descriptions
get_component_eventsGet all event callbacks a component supports
get_component_methodsGet component methods (where documented)
get_component_slotsGet slots/render props for a component
get_component_ptGet Pass Through (PT) customization options
get_component_tokensGet design tokens (CSS variables)
get_component_stylesGet CSS class names
get_component_sectionsGet all sections with examples (basic, advanced, etc.)
get_component_importGet the correct import statement
get_component_urlGet the official documentation URL
get_usage_exampleGet code examples for a component
search_componentsSearch components by name or description
find_by_propFind all components that have a specific prop
find_by_eventFind all components that emit a specific event
find_components_with_featureFind components with a feature (e.g. "filter", "lazy", "virtual")
compare_componentsCompare two components side by side
suggest_componentSuggest components based on a use-case description
get_categoriesGet all component categories
get_version_infoGet PrimeReact version and compatibility info
get_form_componentsGet all form input components
get_data_componentsGet all data display components (tables, lists, trees)
get_overlay_componentsGet all overlay/popup components

Example prompts

Which PrimeReact component should I use for a searchable multi-select?
What props does the DataTable component accept?
Find all PrimeReact components that have a filter prop.
Compare the Dropdown and AutoComplete components.
Show me the import statement for the Calendar component.

Upgrading PrimeReact Version

To update the component data after upgrading PrimeReact:

bash
npm install primereact@NEW_VERSIONnode generate-data.mjs

The generate-data.mjs script re-reads all .d.ts files and rewrites components-data.json.


Project Structure

primereact-mcp/├── index.mjs              # MCP server entry point├── generate-data.mjs      # Generates components-data.json from .d.ts files├── components-data.json   # Generated component data (committed for convenience)├── server.json            # MCP Registry metadata├── package.json└── README.md

MCP Registry

This server is published to the Official MCP Registry. Registry metadata is in server.json at the repo root.

How it works

  1. 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.

  2. 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.


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.ts files
  • Design tokens — extract CSS variable names

Please open an issue before sending a large PR.


License

MIT — see LICENSE.


Related

來源:README.md,提交 9685499

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分