- Docs
- Build With Roxy
- Claude Code
Claude Code
Claude Code is the terminal-based AI coding tool from Anthropic. RoxyAPI has native MCP support, so you can register it once and all 110+ endpoints become callable tools inside Claude Code. No manual tool definitions, no glue code.
Add RoxyAPI as an MCP server
Run this in your terminal:
claude mcp add --transport http roxyapi https://mcp.roxyapi.com/mcp -h "X-API-Key: YOUR_KEY"
This registers RoxyAPI as a Model Context Protocol server. Claude Code auto-discovers every tool (horoscopes, birth charts, tarot draws, numerology, I-Ching, crystals, dream symbols, angel numbers). You do not need to define tools or write wrapper functions.
Verify it works
Start Claude Code:
claude
Then ask it something like:
- "Draw me a tarot card"
- "What is the daily horoscope for Aries?"
- "Look up the dream symbol for water"
Claude will call the RoxyAPI tools automatically and return real data.
Add to your CLAUDE.md for project context
Drop this into your project CLAUDE.md so Claude Code knows how to use the API in your codebase:
## RoxyAPI
- Endpoint reference: https://roxyapi.com/llms.txt
- Base URL: https://roxyapi.com/api/v2
- Auth: X-API-Key header (env: ROXY_API_KEY)
- MCP server: already configured, tools auto-discovered
- Multi-language: ?lang=tr|de|es|hi|pt|fr|ru on any endpoint
This gives Claude the base URL, auth pattern, and available languages without needing to look anything up at runtime.
AGENTS.md in the SDK
The TypeScript SDK ships an AGENTS.md file:
npm install @roxyapi/sdk
When the SDK is in your node_modules, Claude Code reads AGENTS.md automatically and understands how to use every endpoint, what parameters each one takes, and what the responses look like. No additional context needed.
Example workflows
Once the MCP server is registered, you can give Claude Code natural-language instructions and it will call the right endpoints, read the responses, and write the code:
"Build me a birth chart component for React using RoxyAPI" -- Claude will call the natal chart endpoint, inspect the response shape, and generate a typed React component with planets, houses, and aspects.
"Add daily horoscope to my Next.js app" -- Claude will create a server action that fetches the horoscope endpoint, a UI component to display it, and wire up the route.
"Create a tarot reading page with a 3-card spread" -- Claude will call the tarot spread endpoint, build the page layout, and handle card imagery and reversed cards.
"Add numerology compatibility to my dating app" -- Claude will call the compatibility endpoint with two names and birth dates, then build the scoring UI.
Project-scoped MCP
To share the MCP server with your team, create a .mcp.json file in your project root. Anyone who clones the repo gets the server automatically:
{
"mcpServers": {
"roxyapi": {
"type": "http",
"url": "https://mcp.roxyapi.com/mcp",
"headers": {
"X-API-Key": "${ROXY_API_KEY}"
}
}
}
}
Each team member sets ROXY_API_KEY in their environment. The key is never committed to the repo.
What is next
- SDK docs -- typed calls with full autocomplete
- MCP setup -- connect to VS Code, Cursor, Windsurf, and other platforms
- AI Prompts -- ready-to-paste prompts for building with AI
- API Reference -- all endpoints, parameters, and response schemas