- Docs
- Build With Roxy
- Cursor
Cursor, connect Roxy as an MCP server and docs source
Register Roxy once, then build spiritual-data features in natural language with full endpoint knowledge. Time to ship: 5 minutes.
Cursor is the most popular AI code editor. Roxy works with Cursor through MCP servers and docs indexing. Add Roxy docs and the agent builds with real API knowledge instead of guessing. Add the MCP server and the agent can call Roxy endpoints directly.
What you can build with this
- Natal chart, kundli, tarot, numerology, and dream features generated inline
- Full apps scaffolded from single prompts ("build a tarot reader with the three-card spread")
- Typed TypeScript code generated against live OpenAPI schemas
- Project rules that keep Cursor on the right base URL, auth, and language conventions
- MCP-driven prototyping where the agent picks the right tool per question
What you need, 30 seconds
- A Roxy API key. Get one on the pricing page.
- Cursor installed.
Step 1, add Roxy docs to Cursor
Give Cursor full knowledge of every Roxy endpoint, parameter, and response shape.
- In any Cursor chat, type
@Docsthen click Add new doc. - Paste the URL
https://roxyapi.com/api-reference. - Name it RoxyAPI.
- Cursor crawls the Scalar-rendered API reference and indexes every endpoint.
Now @Docs RoxyAPI in any prompt gives Cursor full API context. Manage indexed docs later from Cursor Settings > Features > Docs.
Point @Docs at /api-reference (Scalar live docs) rather than /llms.txt. The Scalar page walks every tag and endpoint with full request/response schemas.
For tight execution context (without indexing the full Scalar reference), drop the site-level AGENTS.md URL into Cursor too: @Docs https://roxyapi.com/AGENTS.md. It is a tight 120-line execution playbook with Rule 0, common task body shapes, and the field gotcha table. Smaller context, faster recall.
Step 2, add Roxy as an MCP server
Visit the MCP setup page or use the config below. Cursor supports either a project-scoped .cursor/mcp.json or a global ~/.cursor/mcp.json.
{
"mcpServers": {
"roxy-astrology": {
"url": "https://roxyapi.com/mcp/astrology",
"headers": {
"X-API-Key": "${env:ROXY_API_KEY}"
}
}
}
}
Save as .cursor/mcp.json in your project root. Export ROXY_API_KEY in your shell before launching Cursor.
Same JSON, save as ~/.cursor/mcp.json. Applies to every project you open in Cursor.
- Open Cursor Settings (gear icon > Cursor Settings).
- Navigate to Features > MCP.
- Click Add New MCP Server.
- Fill in name, URL, headers from the JSON above.
{
"mcpServers": {
"roxy-astrology": { "url": "https://roxyapi.com/mcp/astrology", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-vedic-astrology": { "url": "https://roxyapi.com/mcp/vedic-astrology", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-tarot": { "url": "https://roxyapi.com/mcp/tarot", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-numerology": { "url": "https://roxyapi.com/mcp/numerology", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-iching": { "url": "https://roxyapi.com/mcp/iching", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-dreams": { "url": "https://roxyapi.com/mcp/dreams", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-crystals": { "url": "https://roxyapi.com/mcp/crystals", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-angel-numbers": { "url": "https://roxyapi.com/mcp/angel-numbers", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-biorhythm": { "url": "https://roxyapi.com/mcp/biorhythm", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } },
"roxy-location": { "url": "https://roxyapi.com/mcp/location", "headers": { "X-API-Key": "${env:ROXY_API_KEY}" } }
}
}
If you inline the API key directly (instead of using ${env:ROXY_API_KEY}), add .cursor/mcp.json to .gitignore. A committed config with a real key is the single most common way API keys leak into public repos.
Step 3, verify the MCP server is connected
After saving .cursor/mcp.json:
- Open Cursor Settings > Features > MCP. Your
roxy-*servers should show a green "connected" status. - Open the agent chat (
Cmd+L/Ctrl+L) and ask "list the Roxy tools you have access to". - The agent should enumerate tools it discovered (for example
get_astrology_horoscope_sign_daily,post_astrology_natal_chart). - Smoke test: "use the Roxy MCP to get the horoscope for Aries today".
Step 4, first prompt to try
Paste into Cursor chat or inline edit.
- Using @Docs RoxyAPI, build a birth chart component that takes a date, time, and city.
- Add a tarot daily card to my homepage using Roxy MCP.
- Create a numerology calculator page with Life Path, Expression, and Soul Urge numbers. @Docs RoxyAPI
- Build a dream symbol search with autocomplete using the dreams API. @Docs RoxyAPI
- Using @Docs RoxyAPI, add a Vedic astrology kundli page with planet positions and dasha periods.
Add project rules
The current Cursor rules format is .mdc with YAML frontmatter. Create .cursor/rules/roxy.mdc so Cursor follows Roxy conventions in every prompt:
---
description: Roxy API conventions
alwaysApply: true
---
When using Roxy API:
- Base URL: https://roxyapi.com/api/v2
- Auth: X-API-Key header from env ROXY_API_KEY
- Never expose the API key in client-side code
- Typed SDK reference: https://roxyapi.com/docs/sdk (npm install @roxyapi/sdk for TypeScript, pip install roxy-sdk for Python, composer require roxyapi/sdk for PHP 8.2+)
- Reference docs: @Docs RoxyAPI
- Errors return { error, code } (no success wrappers)
- Multi-language: add ?lang=xx (tr, de, es, hi, pt, fr, ru)
- Always geocode via /location/search before chart endpoints
- Prefer IANA timezones (America/New_York) over decimal offsets
alwaysApply: true injects the rule into every chat. Use globs: ["**/*.ts", "**/*.tsx"] if you only want it active in specific file types.
Generate TypeScript types
Generate typed client code from any Roxy OpenAPI spec:
npx openapi-typescript https://roxyapi.com/api/v2/astrology/openapi.json -o src/api/astrology.ts
Available specs: astrology, vedic-astrology, tarot, numerology, iching, dreams, crystals, angel-numbers, biorhythm, location.
Or install the SDK for pre-built types across all domains in TypeScript, Python, or PHP:
npm install @roxyapi/sdk # TypeScript
pip install roxy-sdk # Python
composer require roxyapi/sdk # PHP 8.2+
Gotchas
${env:VAR}only interpolates vars set before Cursor launched. Quit Cursor,export ROXY_API_KEY=..., then relaunch withcursor .from that terminal.- Invalid JSON silently fails. Paste
.cursor/mcp.jsoninto a JSON linter after editing. Reload the window (Cmd+Shift+P > Developer: Reload Window) to pick up changes. - 401 after config edit. Run
echo $ROXY_API_KEYin the launching terminal, relaunch Cursor from there. Strip quotes and whitespace from the key. @Docsand MCP solve different problems. Docs gives the agent endpoint knowledge for writing code. MCP lets the agent actually call those endpoints during the session. Use both.- Never commit a real key. If you inline it instead of using env interpolation, gitignore the config.
What to build next
- The MCP setup docs cover every other MCP client (Claude Code, Claude Desktop, Antigravity, OpenAI Agents, Gemini Agents).
- The Claude Code guide uses the same MCP servers in the terminal.
- The Antigravity guide uses them in the Google Gemini 3 Pro IDE.
- The SDK docs cover typed calls in TypeScript, Python, and PHP.
- The AI chatbot tutorial builds a multi-domain chatbot on the same servers.