react-analyzer-mcp

MCP server for analyzing & generating docs for React code locally

by azer
26 stars
1 forks
Available MCP Tools 0 tools

Model Context Protocol tools provided by this server

No tools information available for this server.

Check the GitHub repository or documentation for more details.

README

Analyze & generate docs for React code using the Model Context Protocol. Based on react-analyzer library.

What it does

This tool analyzes React component files (JSX/TSX) and extracts information about components and their props.

Available Tools

  • analyze-react: Analyzes a single React component from source code
  • analyze-project: Generates documentation for all React components in a project folder
  • list-projects: Lists all projects under the root folder

Installation

git clone https://github.com/azer/react-analyzer-mcp.git
cd react-analyzer-mcp

npm install

vim src/index.ts

npm run build

Using with Claude

  1. Enable MCP server in the Claude Desktop config:
{
    "react-analyzer-mcp": {
      "command": "node",
      "args": [
        "/Users/azer/code/sandbox/react-analyzer-mcp/build/index.js"
      ]
    }
}
  1. Connect Claude to your MCP server using the Claude Shell.
  2. Use the tools directly in Claude conversations:
Analyze my project's React components in the "ui" folder.

Or:

What React components do I have in my project?

Examples

Analyzing a project folder:

Input:

Can you analyze the components in my "foobar" folder?

Output:


## Button

### Props

| Prop | Type | Optional | Default |
|------|------|----------|---------|
| `variant` | `string` | ✓ | `primary` |
| `size` | `string` | ✓ | `md` |
| `onClick` | `function` | ✓ | |
...

License

MIT

Details
Category Developer Tools
Scope local
Language TypeScript
License Unknown
OS Support
linux macos windows