mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 12:20:38 +01:00
Partial redo of #34710. The changes there tried to use `z.function(args, return)` to be compatible across Zod v3 and v4, but Zod 4's function API has completely changed. Instead, I've updated to just use `z.any()` where we expect a function, and manually validate that it's a function before we call the value. We already have validation of the return type (also using Zod). Co-authored-by: kolvian <eliot@pontarelli.com> |
||
|---|---|---|
| .. | ||
| src | ||
| package.json | ||
| README.md | ||
| todo.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
React MCP Server (experimental)
An experimental MCP Server for React.
Development
First, add this file if you're using Claude Desktop: code ~/Library/Application\ Support/Claude/claude_desktop_config.json. Copy the absolute path from which node and from react/compiler/react-mcp-server/dist/index.js and paste, for example:
{
"mcpServers": {
"react": {
"command": "/Users/<username>/.asdf/shims/node",
"args": [
"/Users/<username>/code/react/compiler/packages/react-mcp-server/dist/index.js"
]
}
}
}
Next, run yarn workspace react-mcp-server watch from the react/compiler directory and make changes as needed. You will need to restart Claude everytime you want to try your changes.