Skip to content
  1. Docs
  2. Build With RoxyAPI
  3. Replit

Replit Agent astrology MCP setup

One click hands Replit Agent the whole RoxyAPI reference as a searchable tool. Add your key and it runs live calculations while it builds. Five minutes, all in the browser.

Replit Agent connects to Remote MCP servers from the Integrations pane. The keyless docs server answers every question about endpoints, fields and SDK methods, so Agent stops inventing paths, and a per-domain server pulls a real natal chart, horoscope or tarot spread while it builds. Nothing to install.

Step 1, the docs server (keyless)

One click: open this Add-to-Replit link and confirm.

By hand: go to replit.com/integrations, scroll to MCP Servers for Replit Agent, click + Add MCP server, name it RoxyAPI Docs, paste the URL, then Test & save.

https://roxyapi.com/mcp/docs

Agent fetches the tool list itself. That is one tool, search_docs, over the entire reference: endpoints, request and response fields, SDK methods, auth, integration steps. No API key, documentation only, never a live calculation. Once saved it is available across all your projects. Then ask in plain language:

Using the RoxyAPI Docs server, find the natal chart endpoint and show me how to call it.

Step 2, a domain server for live calls

Live calculations take your key in the X-API-Key header, one server per domain. Add the server the same way and open Advanced settings to set the header:

  • Display name: RoxyAPI Astrology
  • MCP Server URL: https://roxyapi.com/mcp/astrology
  • Advanced settings, custom header: name X-API-Key, value your key

Swap the last path segment for any other domain: vedic-astrology, forecast, human-design, chinese-astrology, feng-shui, mesoamerican-astrology, vastu, numerology, kabbalah, tarot, biorhythm, ayurveda, iching, crystals, dreams, angel-numbers, location. Reuse the same header on each. Get your API key, or mint another there.

The MCP connection is how Agent calls RoxyAPI while you build and chat. In the app you deploy, the key belongs in Secrets as ROXY_API_KEY, read by a backend route. The browser calls your route, never roxyapi.com.

Step 3, point Agent at the truth sources

Agent has no rules file, so lead your build prompt with this block and it stops guessing:

## RoxyAPI
- Search https://roxyapi.com/mcp/docs (tool: search_docs) before writing any RoxyAPI call. No MCP in this context? Fetch https://roxyapi.com/llms.txt instead.
- Read https://roxyapi.com/AGENTS.md in full before the first call: auth, the location rule, request body shapes, the error contract, the SDK for this language.
- Print request and response fields from https://roxyapi.com/api/v2/openapi.json before using an endpoint, with the jq recipe in https://roxyapi.com/AGENTS.md. Generate types from that spec, never by hand.
- Base URL https://roxyapi.com/api/v2. Auth is the X-API-Key header, read from the ROXY_API_KEY Secret in a backend route only. The frontend calls my route, never roxyapi.com.
- Every chart, horoscope, panchang, dasha and compatibility call needs latitude, longitude and timezone from GET /location/search?q={city}. Never ask a person for coordinates.
- A 200 is clean JSON with no wrapper. Errors are { error, code, doc_url }, and a 400 carries issues[]. Retry only 429 and 5xx.
- Add ?lang= for en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant.

Step 4, copy the prompt for what you are building

Every app prompt lives on one page: AI prompts. Building a whole app from a blank Repl is Astrology Birth Chart App or the domain prompt beside it; adding a feature to something you already have is Add RoxyAPI to an existing app.

Frequently asked questions

Where do I add a custom MCP server in Replit?

At replit.com/integrations, under MCP Servers for Replit Agent. Click + Add MCP server, give it a display name Agent can refer to in chat, paste the HTTPS endpoint, and click Test & save. Replit connects and reports the status; the server is then available across all your projects.

How do I pass my RoxyAPI key to a Replit MCP server?

RoxyAPI authenticates with the X-API-Key header, not a bearer token. Open Advanced settings in the add-server dialog and add a custom header named X-API-Key with your key as the value. Replit sends it on every request to that server.

How do I keep the RoxyAPI key out of my deployed Replit app?

Store it in the Secrets pane as ROXY_API_KEY and call RoxyAPI from a backend route that reads the environment variable. The frontend calls your route, so the key never reaches the browser. The MCP connection is a build-time convenience and is not what a deployed app should call.

Agent found the RoxyAPI tool but did not run it. Why?

Some tool calls need confirmation before they run, and Agent shows a prompt in chat. Approve it and the call goes through. If the server itself shows an error instead, re-open it from the Integrations pane and check the URL and the X-API-Key value for stray whitespace.

Is RoxyAPI free to try with Replit?

The docs server at https://roxyapi.com/mcp/docs needs no key and returns documentation, so Agent writes correct code from the first prompt. Live calculations across the domains need your API key, billed flat, 1 request to 1 quota unit, every domain included.