
Mcp React Toolkit
io.github.Nishant-Chaudhary5338由 GitHub 账号 Nishant-Chaudhary5338 发布v1.0.1更新于 Oct 27, 2026
9 MCP servers for React/TypeScript — dep auditing, a11y, test gen, and TypeScript enforcement.
概览
本地 npm 工具包,提供 59 个 React/TypeScript 开发工具(脚手架、审计、测试生成、CRUD、CRA 迁移),每个工具作为独立的 stdio MCP 服务器运行。
- 可以做什么
- 生成与扩展组件:基于 shadcn/ui 模板的组件工厂、Storybook 故事、变体与边界用例测试
- 审计并修复代码质量:TypeScript any 类型规则、WCAG 2.1 无障碍检查与自动修复、设计令牌、渲染与性能分析、包体积预算、质量门禁
- 生成与修复测试:Vitest 测试套件、测试缺口分析、测试数据工厂、失败测试归因、Playwright CRUD 用例与视觉回归配置
- 从 JSON 样例或 OpenAPI 模式生成完整 CRUD 功能:字段推断、Zod 模式、API 客户端、表单、表格、详情页、路由与 MSW 模拟
- 将 Create React App 迁移到 Vite,包括环境变量、Jest 转 Vitest 与 webpack 配置转换
- 检查 monorepo 与依赖,并在 JSON 结果之外输出可交互的 HTML 仪表板
- 适用场景
- 适合在 React/TypeScript 项目中让助手处理重复性、多文件的机械工作,例如审计、脚手架、迁移和测试生成,用一次结构化调用替代多轮读写。对小型、全新的单文件改动收益有限。
- 运行要求
- 通过 npx 从 npm 包 mcp-react-toolkit 以 stdio 在本地运行,需要 Node.js。每个工具需按名称单独启动,因此客户端配置中每个工具对应一个服务器条目。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp React Toolkit,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-toolkit
MCP servers for React + TypeScript development automation. Works with Claude Desktop, Cline, Cursor — and as plain CLI scripts — one protocol, zero duplication.
[npm] [CI] [License: MIT] [MCP SDK]
59 tools across 9 categories — component scaffolding, code quality, a full CRUD-feature factory, CRA→Vite migration, and more. Every tool ships as its own MCP server, built and tested independently.
Why this exists — the token math
Here's the thing nobody tells you when you start building agentic workflows: the loop itself is what's expensive, not the model. An agent working without any composed tools does everything the slow way — read a file, think, write a file, read it back to check its own work, repeat — and every single one of those turns re-sends the whole conversation so far as input tokens. By the time you're 20 steps into a real multi-file task, that resent context alone can be running 50K+ tokens per call. It adds up fast, and it's not really about which model you're using.
I didn't just take that on faith — a few sources back it up with real numbers. LeanOps measured agent loops running about 3.2× the tokens of a single direct call at 5 steps, ~30× at 50 steps, and past 100× once you're deep into a typical build-and-debug session — because re-sent context is roughly 62% of the bill. Vantage found similar: real agentic sessions run an input-to-output ratio around 25:1 (a direct call is closer to 1:1), with a 50-turn session routinely hitting a million input tokens, and non-agentic usage on comparable work costing something like 200× less per interaction on the same team. And a recent arXiv paper on agentic tokenomics puts agentic tasks at roughly 1000× the tokens of single-turn work, with up to 30× variance run to run on the exact same task — so it's not just expensive, it's unpredictable.
That's the problem this toolkit's composed tools are built to get rid of. workflow-runner's schema_to_feature and cra-to-vite don't add one more tool call into an agent's existing loop — they replace what would otherwise be 7 or 8 separate read/write/verify turns with a single in-process call that runs the whole generator or migration pipeline and hands back the finished result. That's the "50-turn loop collapses into 1 call" shape the research above says saves 10–100×, which is a very different thing from just bolting one extra tool onto an unchanged loop (that only gets you the 20–40% range).
To keep myself honest, I also ran a real, measured benchmark rather than just trusting the theory — ax-benchmark, 6 tasks, claude -p running headless, three arms (agent alone, agent with one MCP tool call added into its loop, and the tool called directly with no agent at all). This is a conservative baseline on purpose, since it only tests adding a single tool call into an otherwise unchanged loop, not the deeper pipeline collapse described above:
Two things worth being upfront about: cost is the fair metric here, not wall-time — the agent-alone arm ran headless with no shell access and over-explored on open-ended tasks, which inflated its time without touching its actual cost. And on small, novel, single-file work, the overhead of the tool's structured output can offset what it saves — the real win shows up on repetitive, mechanical, multi-file work, which also happens to be exactly where the multi-turn-loop tax above hits hardest.
Install
Published on npm as mcp-react-toolkit. No clone or build required:
Add it to Claude Desktop / Cursor / Cline:
Swap in any tool name from npx mcp-react-toolkit --list. Restart your client and the tool appears.
Interactive dashboards
Most MCP tools return raw JSON. These return that JSON plus an interactive HTML dashboard — health score, sortable issue triage, light/dark toggle, and one-click fix actions that call other tools in the toolkit. One self-contained artifact, no server, no external requests:
Analysis tools (legacy-analyzer, component-reviewer, dep-auditor, etc.) get an audit view — grade, category cards, filterable issue table. Generators (component-factory, code-modernizer, etc.) get a result view — files created/changed, diffs, follow-ups. Powered by the internal @mcp-showcase/ui-kit package: dependency-free, ~30 KB per report.
Tools
Component Development
Code Quality & Modernisation
Monorepo & Infrastructure
CRUD Factory
One JSON API sample (or OpenAPI schema) fans out into a full, typed CRUD feature. Every generator keys off the shared FieldSchema contract, so the pieces compose.
CRA → Vite
Migrate a Create React App project to Vite: analyze → plan → scaffold → migrate → verify.
Boilerplate
Meta
Automation workflows
Chain tools together for common tasks:
How MCP works
Each server extends McpServerBase from tools/shared/ — handles transport, routing, and error formatting. Adding a new tool is ~50 lines:
Run from source (contributors)
Prefer npm for everyday use (see Install). Clone only to hack on the tools or run the showcase UI:
Point Claude Desktop at a local build the same way as Install, swapping npx -y mcp-react-toolkit <name> for node /path/to/mcp-toolkit/tools/<name>/build/index.js.
Use as a CLI / in CI
Every tool's build/index.js has a #!/usr/bin/env node shebang — pipe a JSON-RPC message to it on stdin:
Testing
Every tool has a co-located Vitest suite covering its core logic directly — no MCP transport required.
CI runs on every push and PR against Node 20 and 22.
Companion package
code-graph-indexer — indexes any TS/React/Next.js repo into a queryable code graph (files, components, functions, and the edges between them) and answers structural questions: who calls this, blast radius, dead code, semantic search. Same family, separate package.
Contributing
See CONTRIBUTING.md — how to scaffold a new tool, write tests, and open a PR.
Stack
TypeScript strict · Node.js · MCP SDK 1.12 · Vitest · React 19 · Vite · Tailwind CSS · Express
Built by
Nishant Chaudhary — Senior Frontend Engineer · [email protected]
Also see: dashcraft · react-present · ai-builder
MIT License
来源:README.md,提交 7b64768
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分