Claude Code Setup
Configure MCP for Anthropic's Claude Code CLI to enable AI-assisted component management.
Automatic Setup (Recommended)
Run this single command to automatically configure Claude Code:
npx archyra init --client claudeWhat this does
- Detects your Claude Code configuration file location
- Creates or updates the MCP configuration
- Preserves any existing MCP servers you have configured
Manual Setup
If you prefer to configure manually, follow these steps:
Claude Code looks for MCP configuration in these locations (in order):
~/.claude/claude_desktop_config.jsonor
~/.mcp.jsonIf you don't have an MCP config yet, create the file with this content:
{
"mcpServers": {
"archyra": {
"command": "npx",
"args": ["-y", "archyra@latest", "serve"]
}
}
}Close and reopen Claude Code to load the new MCP configuration. The server will start automatically when Claude Code launches.
Verify Setup
After restarting Claude Code, test the integration by asking:
"List all archyra components"
"What UI components are available?"
"Show me the AuthPage component"
If Claude responds with component information, your setup is complete!
Troubleshooting
MCP server not found
Solution: Ensure the config file is in the correct location and the JSON is valid. Run: npx archyra init --client claude
Claude doesn't recognize the commands
Solution: Make sure you restarted Claude Code after adding the configuration.
npx command fails
Solution: Ensure Node.js 18+ is installed. Run: node --version to check.
Permission denied errors
Solution: Check file permissions on the config file. On Unix: chmod 644 ~/.claude/claude_desktop_config.json