MCP Server
The @react-spectrum/mcp
package allows you to run Model Context Protocol (MCP) servers for React Aria locally. It exposes a set of tools that MCP clients can discover and call to browse the docs.
Using with an MCP client
Add one or both servers to your MCP client configuration (the exact file and schema may depend on your client).
{
"mcpServers": {
"React Aria": {
"command": "npx",
"args": ["@react-spectrum/mcp", "react-aria"]
}
}
}
Cursor
Or follow Cursor's MCP install guide and use the standard config above.
VS Code
Or follow VS Code's MCP install guide and use the standard config above. You can also add servers using the VS Code CLI:
code --add-mcp '{"name":"React Aria","command":"npx","args":["@react-spectrum/mcp","react-aria"]}'
Claude Code
Use the Claude Code CLI to add the servers:
claude mcp add react-aria npx @react-spectrum/mcp react-aria
For more information, see the Claude Code MCP documentation.
Codex
Create or edit the configuration file ~/.codex/config.toml
and add:
[mcp_servers.react-aria]
command = "npx"
args = ["@react-spectrum/mcp", "react-aria"]
For more information, see the Codex MCP documentation.
Gemini CLI
Use the Gemini CLI to add the servers:
gemini mcp add react-aria npx @react-spectrum/mcp react-aria
For more information, see the Gemini CLI MCP documentation.
Windsurf
Follow the Windsurf MCP documentation and use the standard config above.