🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

mcp-react-toolkit

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcp-react-toolkit

59 MCP servers for React + TypeScript development automation — component scaffolding, dep auditing, WCAG checking, test generation, TypeScript enforcement, render analysis, performance audit, Lighthouse, Storybook generation, legacy app analysis, componen

Source
npmnpm
Version
1.40.0
Version published
Weekly downloads
50
-29.58%
Maintainers
1
Weekly downloads
 
Created
Source

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 Tests

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:

Agent aloneAgent + one MCP toolTool called directly
Analysis tasks (review, a11y, legacy-code)baseline~41% lower cost~100% free, ~15× faster (when in scope)
All 6 tasks, blendedbaseline~19% lower cost
New code (component, tests)baselineroughly cost-neutralnot applicable to novel work

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 — run any of the 59 servers straight from npm:

npx mcp-react-toolkit --list            # list all 59 tools
npx mcp-react-toolkit legacy-analyzer   # run one as an MCP server (stdio)

Add to Claude Desktop / Cursor / Cline

// claude_desktop_config.json
{
  "mcpServers": {
    "legacy-analyzer": {
      "command": "npx",
      "args": ["-y", "mcp-react-toolkit", "legacy-analyzer"]
    },
    "component-factory": {
      "command": "npx",
      "args": ["-y", "mcp-react-toolkit", "component-factory"]
    }
  }
}

Swap in any tool name from npx mcp-react-toolkit --list. Restart your client and the tools appear.

🖥️ Interactive dashboards

Most MCP tools return raw JSON. The tools here return that JSON plus a premium, interactive HTML dashboard — a 0–100 health score, sortable issue triage, light/dark toggle, and one-click fix actions that call other tools in the toolkit.

It works three ways from a single self-contained artifact (no server, no external requests):

Where you run itWhat you get
Claude Desktop (MCP Apps)The dashboard renders inline in the conversation (sandboxed iframe); action buttons drive the agent.
Claude Code (VS Code) · Cursor · CLIThe JSON plus a clickable file:// link — open it to view the full dashboard in your browser.
Any browserThe same HTML opens standalone — fully interactive.

Two dashboard styles:

  • Audit viewlegacy-analyzer, component-reviewer, accessibility-checker, dep-auditor, typescript-enforcer, performance-audit, render-analyzer, test-gap-analyzer, quality-pipeline, lighthouse-runner. Health score, grade, category cards, filter/sort issue table.
  • Result viewcomponent-factory, component-fixer, code-modernizer, storybook-generator, generate-tests, monorepo-manager. Files created/changed, diffs, and follow-up actions.

How it renders: the tool returns an MCP resource with a ui:// URI and mimeType: text/html. Hosts that support MCP Apps render it inline; for every other client the toolkit also writes the HTML to a temp file and returns a file:// link so you can open it in a browser. Powered by the internal @mcp-showcase/ui-kit package — dependency-free, dual light/dark, ~30 KB per report.

What's here

tools/      59 MCP server packages — each independently buildable and runnable
server/     Express bridge (port 3002) — proxies calls from the UI to MCP servers
client/     React 19 showcase SPA — tool catalog, workflow demos, animated flowcharts

Companion package

code-graph-indexer — a standalone code-intelligence engine that indexes any TS / React / Next.js repo into a queryable code graph (files · components · functions, and the imports/renders/calls/references/depends-on edges between them) and answers structural questions — who renders this, who calls this, find references, blast radius, cycles, dead code — plus semantic search by meaning. Use it over a CLI, an MCP server, an HTTP/WS server, and a 3D web explorer. Separate package, same family:

npx code-graph-indexer mcp                       # stdio MCP server (13 tools)
npx code-graph-indexer index --root .            # one-shot index → .code-graph/graph.json
npx code-graph-indexer query who-renders --id "cmp:src/Button.tsx#Button" --root .

Tools

All 59 tools are production-ready: built, tested, and CI-verified on Node 20 + 22.

Component Development

ToolWhat it doesMCP tools exposed
component-factoryScaffold React components from 41 shadcn/ui templates — with tests + Storybook6
component-reviewerAudit TypeScript errors, a11y issues, test coverage — graded A+ to F3
component-fixerAuto-fix broken imports, missing deps, inline style refactors3
storybook-generatorAuto-generate Storybook stories — Default, variants, sizes, callbacks, play functions2
component-improverExtend a component with variants, comprehensive stories, and edge-case tests1

Code Quality & Modernisation

ToolWhat it doesMCP tools exposed
code-modernizerAST-based JS/JSX → TypeScript conversion, PropTypes → interfaces1
refactor-executorExecute refactor plans safely — move/rename/split, update imports, validate build, rollback10
react-compiler-migratorFlag redundant useMemo/useCallback/memo for the React 19 Compiler + rules-of-hooks blockers2
a11y-autofixerApply safe a11y fixes (img alt, blank rel, htmlFor, tabIndex) — the execute half1
codemod-runnerGeneric regex codemod engine + named built-ins (env, jest→vi, render→createRoot); dry-run2
typescript-enforcerScan for any types, unsafe casts, missing modifiers — 7 rules, scored 0–104
accessibility-checkerWCAG 2.1 audit — alt text, label associations, ARIA roles, keyboard navigation3
generate-testsAnalyze a TypeScript/React source file and generate a Vitest test suite2
quality-pipeline5-stage audit (tests · types · perf · a11y · design tokens) graded A–F2
render-analyzerDetect unnecessary re-renders, missing memo, inline objects/functions3
performance-auditMemory leaks, heavy imports, unoptimized images, deep nesting3
test-gap-analyzerFind unimplemented functions, uncovered branches, missing edge cases3
bundle-budget-guardGate gzipped asset sizes against per-pattern budgets — fail CI on regressions1
api-contract-differDiff two API snapshots → breaking vs additive changes — CI gate against breaks1
redux-state-analyzerAudit Redux for anti-patterns/optimizations (selectors, mutations, RTK Query) — grade A–F1
i18n-extractorScan JSX for hardcoded strings → i18n keys + message catalog1
enforce-design-tokensFlag hardcoded colors/spacing/radii/shadows, suggest tokens, grade A–F3
test-data-factoryFieldSchema → typed fixture factory (makeX/makeXs + overrides) for tests/stories1
fix-failing-testsRun the suite, classify failures by root cause, generate targeted fixes3
legacy-analyzer22-tool health audit for any React/Next.js/Remix app — scores 0–100, migration hints22

Monorepo & Infrastructure

ToolWhat it doesMCP tools exposed
dep-auditorUnused deps, duplicate versions, circular imports, bundle impact analysis4
monorepo-managerWorkspace listing, dependency graph, health check, shared dep finder6
lighthouse-runnerStatic HTML audit — meta tags, a11y, OG/Twitter cards, canonical, JSON-LD4
json-viewerGenerate an interactive HTML JSON viewer — collapsible, searchable, dark/light3

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.

ToolWhat it doesMCP tools exposed
infer-fieldsJSON sample / OpenAPI → typed FieldSchema (types, FK relations, table/form defaults)1
zod-schema-generatorFieldSchema → Zod schema + inferred TS type1
api-client-generatorFieldSchema → RTK Query slice or TanStack Query hooks, with cache tags1
form-generatorFieldSchema → React Hook Form + Zod form (create / edit)1
table-generatorFieldSchema → TanStack Table (sort / filter / paginate)1
detail-generatorFieldSchema → typed detail view + delete action1
crud-composerWire the pieces into routes — React Router 7 or Next App Router1
form-wizard-generatorFieldSchema → multi-step RHF+Zod wizard (per-step validation, progress)1
msw-mock-generatorFieldSchema → MSW handlers + seed data, so the generated CRUD runs against a mock API1
workflow-runnerRun schema_to_feature end-to-end, gated by review-gate — returns files + journal + A–F grade1
e2e-generatorFieldSchema → Playwright CRUD flow spec (create→edit→delete + a11y)1
playwright-scaffolderScaffold the Playwright harness — config, fixtures, base POM, auth setup1
visual-regression-setupPlaywright toHaveScreenshot specs for routes/stories — catch CSS drift1
review-gateStatic A–F quality gate for generated/changed code (a11y, tokens, smells, stubs)1

CRA → Vite

Migrate a Create-React-App project to Vite: analyze → plan → scaffold → migrate → verify.

ToolWhat it doesMCP tools exposed
cra-to-viteOrchestrator — analyze → plan → scaffold → migrate → report (A–F), point it at a CRA app1
craconfig-analyzerDeep CRA config inspection (react-scripts, env, proxy, jest, browserslist, PWA, SVG…)1
dependency-remapperCRA deps → Vite plan (remove/add with versions + unmapped)1
env-var-migratorRewrite REACT_APP_ → VITE_ / import.meta.env + rename .env keys, flag dynamic1
jest-to-vitest-migratorjest.* → vi.* + vitest import + flag mock factories1
vite-project-scaffolderGenerate the Vite shell — vite.config, index.html, main.tsx, strict tsconfig1
webpack-config-translatorTranslate webpack/CRACO → Vite (aliases, plugins, loaders) + manual-review list1

Boilerplate

ToolWhat it doesMCP tools exposed
barrel-generatorGenerate an index.ts barrel re-exporting a folder — no more drifting export lists1
type-from-jsonJSON sample → plain TS interfaces (nested objects → their own interfaces)1
zustand-store-generatorState shape → typed Zustand store (setters, reset, persist/devtools)1
svg-to-componentRaw SVG → typed React component (SVGProps, currentColor) — SVGR-grade1
env-config-generatorZod-validated typed env module (Vite/Next) — fail fast on missing/bad vars1
states-scaffolderLoading/empty/error state components + a switch wrapper for a data view1

Meta

ToolWhat it doesMCP tools exposed
mcp-tool-factoryScaffold + wire + verify new MCP tools in this package — the executable form of the mcp-server-builder skill3
mcp-tool-improviserAnalyze + improve MCP tools across 7 dimensions — proposed diffs, apply, rollback4
docs-generatorGenerate a README (from an MCP tool) or an API reference (from a TS module + JSDoc)2

Automation workflows

1 · Code Modernization

legacy-analyzer → code-modernizer → typescript-enforcer → generate-tests

Migrate a JS codebase to strict TypeScript with auto-generated test coverage.

2 · Component Quality Pipeline

component-factory → component-reviewer → accessibility-checker → storybook-generator

Generate a production-ready component, review it, fix a11y issues, and add full story coverage.

3 · Render Performance Audit

render-analyzer → performance-audit → quality-pipeline

Find unnecessary re-renders, memory leaks, and heavy imports — graded A–F.

4 · App Health Check

legacy-analyzer [analyze-legacy-app] → component-reviewer → generate-tests

Full health score (0–100) with prioritized migration hints, then fix the top issues.

5 · Dependency Health

dep-auditor [unused] → dep-auditor [duplicates] → dep-auditor [bundle-impact] → monorepo-manager

Audit and clean up a monorepo's dependency graph end-to-end.

How MCP works

Claude Desktop / Cline / Cursor
        │
        │ JSON-RPC over stdio
        ▼
   MCP Server (e.g. typescript-enforcer)
        │
        ▼
   Tool handlers (your code)

Each server in this repo extends McpServerBase from tools/shared/ — an abstract class that handles transport, routing, and error formatting. Adding a new tool is ~50 lines.

import { McpServerBase } from '@mcp-showcase/shared';

class MyTool extends McpServerBase {
  constructor() {
    super({ name: 'my-tool', version: '1.0.0' });
  }

  protected registerTools(): void {
    this.addTool('do_thing', 'Does a thing', {
      type: 'object',
      properties: { path: { type: 'string', description: 'Target path' } },
      required: ['path'],
    }, async (args) => {
      const { path } = args as { path: string };
      return this.success({ result: `Processed ${path}` });
    });
  }
}

new MyTool().run();

Run from source (contributors)

Prefer npm for everyday use (see Install). Clone only to hack on the tools or run the showcase UI:

git clone https://github.com/Nishant-Chaudhary5338/mcp-toolkit.git
cd mcp-toolkit
npm install
npm run build
npm test          # run the full suite across all tools
npm run dev       # server on :3002, client on :5173

Point Claude Desktop at a local build

// ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "component-factory": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/component-factory/build/index.js"]
    },
    "component-reviewer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/component-reviewer/build/index.js"]
    },
    "component-fixer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/component-fixer/build/index.js"]
    },
    "storybook-generator": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/storybook-generator/build/index.js"]
    },
    "render-analyzer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/render-analyzer/build/index.js"]
    },
    "performance-audit": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/performance-audit/build/index.js"]
    },
    "legacy-analyzer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/legacy-analyzer/build/index.js"]
    },
    "test-gap-analyzer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/test-gap-analyzer/build/index.js"]
    },
    "lighthouse-runner": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/lighthouse-runner/build/index.js"]
    },
    "dep-auditor": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/dep-auditor/build/index.js"]
    },
    "accessibility-checker": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/accessibility-checker/build/index.js"]
    },
    "generate-tests": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/generate-tests/build/index.js"]
    },
    "typescript-enforcer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/typescript-enforcer/build/index.js"]
    },
    "code-modernizer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/code-modernizer/build/index.js"]
    },
    "quality-pipeline": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/quality-pipeline/build/index.js"]
    },
    "monorepo-manager": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/monorepo-manager/build/index.js"]
    },
    "json-viewer": {
      "command": "node",
      "args": ["/path/to/mcp-toolkit/tools/json-viewer/build/index.js"]
    }
  }
}

Use as a CLI / in CI

Every tool's build/index.js has a #!/usr/bin/env node shebang and is chmod +x — pipe a JSON-RPC message to it on stdin and it writes the result to stdout.

# Analyze a full React/Next.js/Vite app — health score 0–100 + migration hints
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analyze-legacy-app","arguments":{"path":"/path/to/app"}}}' \
  | node tools/legacy-analyzer/build/index.js

# Detect unnecessary re-renders (missing memo, inline objects)
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"detect_rerenders","arguments":{"path":"src/components"}}}' \
  | node tools/render-analyzer/build/index.js

# Audit for memory leaks and heavy imports
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"audit_bundle","arguments":{"path":"src"}}}' \
  | node tools/performance-audit/build/index.js

# Review a component — grade A+ to F
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"review","arguments":{"path":"src/components/Button.tsx"}}}' \
  | node tools/component-reviewer/build/index.js

# Auto-fix a component
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"fix","arguments":{"path":"src/components/Button.tsx"}}}' \
  | node tools/component-fixer/build/index.js

# Find untested exports
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analyze_test_gaps","arguments":{"path":"src"}}}' \
  | node tools/test-gap-analyzer/build/index.js

# Generate Storybook stories for all components in a directory
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_stories","arguments":{"path":"src/components"}}}' \
  | node tools/storybook-generator/build/index.js

# Audit an HTML file — SEO, a11y, OG tags, canonical
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"static_audit","arguments":{"path":"public/index.html"}}}' \
  | node tools/lighthouse-runner/build/index.js

# Run a WCAG audit
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_accessibility","arguments":{"path":"src/components"}}}' \
  | node tools/accessibility-checker/build/index.js

# Scan for TypeScript violations
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"scan_directory","arguments":{"path":"src"}}}' \
  | node tools/typescript-enforcer/build/index.js

# Find unused and outdated dependencies
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"find_unused_deps","arguments":{"root":"."}}}' \
  | node tools/dep-auditor/build/index.js

List a tool's available commands

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node tools/legacy-analyzer/build/index.js

Testing

Every tool has a co-located Vitest suite covering its core logic directly — no MCP transport required — plus tests for the dashboard renderers and per-tool report mappers.

npm test                                    # all tools
npm run test -w tools/legacy-analyzer      # single tool

CI runs on every push and PR against Node 20 and 22.

Architecture

tools/
  shared/                McpServerBase, ToolRegistry, shared types
  component-factory/     41 shadcn/ui templates
  component-reviewer/    Review rules engine (7 categories)
  component-fixer/       Fix strategies per issue type
  storybook-generator/   Story generator (Default, variants, play functions)
  render-analyzer/       Re-render profile + memo checker
  performance-audit/     Memory leak + heavy import detector
  legacy-analyzer/       22-tool analysis engine + health scorer
  test-gap-analyzer/     Export extractor + edge case detector
  lighthouse-runner/     Static HTML auditor
  code-modernizer/       AST-based TS conversion
  quality-pipeline/      5-stage grading system
  dep-auditor/           Dependency graph analysis
  accessibility-checker/ WCAG rule engine (9 rules)
  generate-tests/        Source analyzer + test generator
  typescript-enforcer/   7-rule type safety scanner
  monorepo-manager/      Workspace operations
  json-viewer/           HTML generation

server/                  Express bridge — spawns tools as child processes
client/                  React 19 SPA — tool catalog and live demos

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
nishantchaudhary.dev@gmail.com

Also see: dashcraft · react-present · ai-builder

MIT License

Keywords

mcp

FAQs

Package last updated on 03 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts