Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

react-mcp

MCP.Pizza Chef: kalivaraprasad-gonapa

React MCP is a server implementation that bridges Claude AI with React applications using the Model Context Protocol. It allows Claude to create, modify, and interact with React apps dynamically based on user prompts, facilitating real-time AI-driven development workflows within the React ecosystem.

Use This MCP server To

Create new React applications from natural language prompts Modify existing React app components via AI instructions Enable AI-driven UI prototyping and iteration in React Integrate Claude AI with React development environments Automate React code generation and updates through AI Facilitate real-time collaboration between AI and React developers

README

React MCP (Model Context Protocol)

smithery badge

A powerful server implementation that enables Claude AI to interact with React applications through the Model Context Protocol.

https://github.com/Streen9/react-mcp MCP server

Sample Usage

  • Markdown Editor/Viewer By Claude image

  • API Tester By Claude image

Overview

React MCP provides a bridge between Claude AI and the React ecosystem, allowing Claude to:

  • Create new React applications
  • Run React development servers
  • Manage files and directories
  • Install npm packages
  • Execute terminal commands
  • Track and manage long-running processes

This server implements the Model Context Protocol, providing Claude with the ability to perform real-world actions in the development environment.

Features

  • React Project Management

    • Create new React applications with optional templates
    • Run development servers
    • Manage dependencies
  • File Operations

    • Read and write files
    • Edit React components and configuration
  • Process Management

    • Start and monitor long-running processes
    • Track process output in real-time
    • Terminate processes when needed
  • Command Execution

    • Run arbitrary terminal commands
    • Install npm packages
    • Execute development tasks
  • Comprehensive Logging

    • Detailed JSON and text logs
    • Process tracking with timestamps
    • Execution history

Installation

Installing via Smithery

To install React MCP for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @Streen9/react-mcp --client claude

Manual Installation

  1. Clone this repository
  2. Install dependencies:
npm install

Usage

Add this in claude_desktop_config:

{
  "mcpServers": {
    "react-mcp": {
      "command": "node",
      "args": [
        "C:/Users/kalip/OneDrive/Desktop/react-mcp/index.js"
      ]
    },
  }
}

The server runs on the stdio transport, allowing it to be used with Desktop Claude APP as a Model Context Protocol tool.

Available Tools

create-react-app

Creates a new React application.

Parameters:

  • name (required): Name of the React app
  • template (optional): Template to use (e.g., typescript, cra-template-pwa)
  • directory (optional): Base directory to create the app in (defaults to home directory)

run-react-app

Runs a React application in development mode.

Parameters:

  • projectPath (required): Path to the React project folder

run-command

Runs a terminal command.

Parameters:

  • command (required): Command to execute
  • directory (optional): Directory to run the command in (defaults to current directory)

get-process-output

Gets the output from a running or completed process.

Parameters:

  • processId (required): ID of the process to get output from

stop-process

Stops a running process.

Parameters:

  • processId (required): ID of the process to stop

list-processes

Lists all running processes.

edit-file

Creates or edits a file.

Parameters:

  • filePath (required): Path to the file to edit
  • content (required): Content to write to the file

read-file

Reads the contents of a file.

Parameters:

  • filePath (required): Path to the file to read

install-package

Installs a npm package in a project.

Parameters:

  • packageName (required): Name of the package to install (can include version)
  • directory (optional): Directory of the project (defaults to current directory)
  • dev (optional): Whether to install as a dev dependency

check-installation-status

Checks the status of a package installation process.

Parameters:

  • processId (required): ID of the installation process to check

Logging

The server maintains detailed logs in the logs directory:

  • react-mcp-logs.json: Structured JSON logs
  • react-mcp-logs.txt: Human-readable text logs

Architecture

The server uses the following key components:

  • Model Context Protocol SDK: For communication with Claude AI
  • StdioServerTransport: For I/O through standard input/output
  • Zod: For schema validation and type safety
  • Child Process: For spawning and managing external processes

License

MIT

Author

@streen9

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

react-mcp FAQ

How does react-mcp integrate with React applications?
It acts as a server that connects Claude AI to React apps via the Model Context Protocol, enabling AI-driven creation and modification.
Can react-mcp work with other LLM providers besides Claude?
While designed for Claude, react-mcp can be adapted to work with other LLMs like OpenAI's GPT-4 and Anthropic's Claude through MCP's provider-agnostic interfaces.
What setup is required to use react-mcp?
You need to deploy the react-mcp server and connect it with your React app and an MCP client managing the AI model interactions.
Does react-mcp support real-time updates to React components?
Yes, it enables dynamic, real-time creation and modification of React components based on AI prompts.
Is react-mcp limited to specific React versions?
React-mcp is designed to be compatible with modern React versions but check the documentation for any version-specific notes.
How secure is the interaction between Claude AI and React apps via react-mcp?
MCP enforces scoped, secure, and observable interactions, ensuring safe AI-driven modifications.
Can react-mcp be used for production React apps?
Yes, it can be integrated into production workflows to automate and enhance React app development.
What kind of user prompts can react-mcp handle?
It can process natural language prompts to create or modify UI components, manage state, and update app logic.