@chakra-ui/react-mcp

中文文档
2.1.1发布于 2025/11/03MITES Module近 30 天下载 9822

The official MCP server for Chakra UI

原始使用文档
文档目录8 节
  1. Features
  2. Available Tools
  3. Setup
  4. Claude Desktop / Cursor
  5. OpenAI Codex
  6. Environment Variables
  7. Development
  8. License

Chakra UI MCP Server

An MCP server providing AI assistants with access to Chakra UI components, examples, migration patterns, and premium templates.

Features

  • Component Library: Get components, props, and usage examples
  • Migration Support: v2 to v3 upgrade guidance with before/after code snippets
  • Design Tokens: Access semantic tokens and text styles for consistent theming
  • Premium Templates: Chakra UI Pro blocks and component templates (requires API key)

Available Tools

  • get_components - List all Chakra UI components
  • get_component_props - Get component properties and configuration
  • get_component_example - Retrieve usage examples and code patterns
  • get_theme - Get theme tokens, semantic tokens, text styles and layer styles
  • list_blocks - List Chakra UI Pro blocks
  • get_component_templates - Get premium component templates (Pro)
  • v2_to_v3_code_review - Migration guidance with code snippets

Setup

Claude Desktop / Cursor

Add to your Claude Desktop or Cursor configuration file:

{
  "mcpServers": {
    "chakra-ui": {
      "command": "npx",
      "args": ["-y", "@chakra-ui/react-mcp"],
      "env": {
        "CHAKRA_PRO_API_KEY": "your-api-key-here"
      }
    }
  }
}

OpenAI Codex

Add to your ~/.codex/config.toml file:

[mcp_servers.chakra-ui]
command = "npx"
args = ["-y", "@chakra-ui/react-mcp"]
startup_timeout_ms = 20_000

# Optional: Add Chakra Pro API key if using premium features
# [mcp_servers.chakra-ui.env]
# CHAKRA_PRO_API_KEY = "your-api-key-here"

Or use the CLI command:

codex mcp add chakra-ui -- npx -y @chakra-ui/react-mcp

Note: Requires Codex CLI v0.34.0 or later.

Environment Variables

  • CHAKRA_PRO_API_KEY (optional) - For accessing premium templates and blocks

Development

pnpm install
pnpm build
pnpm dev

License

MIT @ Chakra Systems

版本与发布记录

@chakra-ui/react-mcp 共发布 9 个版本,首次发布于 2025/07/28;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.1.1latest2025/11/031 年前
2.1.02025/08/151.2 年前
2.0.52025/07/291.3 年前
2.0.42025/07/291.3 年前
2.0.32025/07/291.3 年前
2.0.22025/07/291.3 年前

关于 @chakra-ui/react-mcp 的常见问题

@chakra-ui/react-mcp 是什么?

The official MCP server for Chakra UI

如何安装 @chakra-ui/react-mcp?

在项目目录运行 npm install @chakra-ui/react-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 chakra-ui-mcp,可以用 npx chakra-ui-mcp 直接运行。

@chakra-ui/react-mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/chakra-ui__react-mcp 是否存在。

@chakra-ui/react-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@chakra-ui/react-mcp 可以商用吗?

@chakra-ui/react-mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@chakra-ui/react-mcp 的下载量有多少?

根据 npm 官方下载统计,@chakra-ui/react-mcp 在 2026/10/10 – 2026/11/08 这 30 天内被下载 9,822 次,日均约 327 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@chakra-ui/react-mcp 还在维护吗?

最新版本 2.1.1 发布于 2025/11/03(1 年前);至今共发布 9 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/07/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。