packages/dev/mcp/react-aria/README.md
The @react-aria/mcp package provides a Model Context Protocol (MCP) server for React Aria documentation. It exposes a set of tools that MCP clients can discover and call to browse the docs.
Simply run the server using npx:
npx @react-aria/mcp@latest
Add the server to your MCP client configuration (the exact file and schema may depend on your client).
{
"mcpServers": {
"React Aria": {
"command": "npx",
"args": ["@react-aria/mcp@latest"]
}
}
}
Or follow the MCP install guide and use the standard config above.
</details> <details> <summary>VS Code</summary>Follow the MCP install guide and use the standard config above. You can also add the server using the VS Code CLI:
code --add-mcp '{"name":"React Aria","command":"npx","args":["@react-aria/mcp@latest"]}'
Use the Claude Code CLI to add the server:
claude mcp add react-aria npx @react-aria/mcp@latest
For more information, see the Claude Code MCP documentation.
</details> <details> <summary>Codex</summary>Create or edit the configuration file ~/.codex/config.toml and add:
[mcp_servers.react-aria]
command = "npx"
args = ["@react-aria/mcp@latest"]
For more information, see the Codex MCP documentation.
</details> <details> <summary>Gemini CLI</summary>Use the Gemini CLI to add the server:
gemini mcp add react-aria npx @react-aria/mcp@latest
For more information, see the Gemini CLI MCP documentation.
</details> <details> <summary>Windsurf</summary>Follow Windsurf MCP documentation and use the standard config above.
</details>| Tool | Input | Description |
|---|---|---|
list_react_aria_pages | { includeDescription?: boolean } | List available pages in the React Aria docs. |
get_react_aria_page_info | { page_name: string } | Return page description and list of section titles. |
get_react_aria_page | { page_name: string, section_name?: string } | Return full page markdown, or only the specified section. |
Build the docs and MCP server locally, then start the docs server.
yarn workspace @react-spectrum/s2-docs generate:md
yarn workspace @react-aria/mcp build
yarn start:s2-docs
Update your MCP client configuration to use the local MCP server:
{
"mcpServers": {
"React Aria": {
"command": "node",
"args": ["{your path here}/react-spectrum/packages/dev/mcp/react-aria/dist/index.js"],
"env": {
"DOCS_CDN_BASE": "http://localhost:1234"
}
}
}
}