- Docs
- Build With RoxyAPI
- MCP Setup
Astrology MCP server for 18 insight domains
RoxyAPI ships Remote MCP servers over Streamable HTTP, 258+ tools across 18 domains on one key. No local processes, no Docker, no self-hosting.
Updated : Remote MCP on the 2026-07-28 specification, plus a stdio relay
Two kinds of MCP server
A coding agent wants the Docs server to write the integration. A runtime agent wants a domain server to compute a real chart. Both are hosted by us and both speak Streamable HTTP.
How to connect your AI agent to RoxyAPI MCP
MCP Endpoint: https://roxyapi.com/mcp/location
Prerequisite: the Location server needs an API key. Get one instantly →
Create or edit .vscode/mcp.json in your workspace:
{
"servers": {
"roxy-location": {
"type": "http",
"url": "https://roxyapi.com/mcp/location",
"headers": {
"X-API-Key": "your_api_key_here"
}
}
}
}Works with: GitHub Copilot (VS Code 1.102+), Cline, Continue, Roo Code. Reload VS Code after saving.
Add RoxyAPI MCP server via CLI (Claude Code 2.1.1+):
claude mcp add-json roxy-location '{"type":"http","url":"https://roxyapi.com/mcp/location","headers":{"X-API-Key":"your_api_key_here"}}'Add --scope user to make it available across all projects. Run claude mcp list to verify. Restart Claude Code after adding.
Fastest, recommended: download the Claude Desktop extension, double-click it, paste your API key and pick the domains to load.
If your Claude organization shows Request headers when adding a custom connector (a beta), you can add the hosted server there instead: Customize → Connectors → Add custom connector, paste https://roxyapi.com/mcp/location and add X-API-Key with your key. Or add the stdio package to claude_desktop_config.json:
{
"mcpServers": {
"roxy-location": {
"command": "npx",
"args": ["-y", "@roxyapi/mcp"],
"env": {
"ROXY_API_KEY": "your_api_key_here",
"ROXY_MCP_DOMAINS": "location"
}
}
}
}Config location: macOS: ~/Library/Application Support/Claude/claude_desktop_config.json | Windows: %APPDATA%\Claude\claude_desktop_config.json. The config file starts local servers only, so it never takes a remote URL. Restart Claude Desktop after saving.
Connect via the Claude Messages API (beta):
import Anthropic from "@anthropic-ai/sdk";
const anthropic = new Anthropic();
const response = await anthropic.beta.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 1024,
mcp_servers: [{
type: "url",
url: "https://roxyapi.com/mcp/location",
name: "roxy-location",
authorization_token: "your_api_key_here"
}],
tools: [{
type: "mcp_toolset",
mcp_server_name: "roxy-location"
}],
messages: [
{ role: "user", content: "Your prompt here" }
]
}, {
headers: { "anthropic-beta": "mcp-client-2025-11-20" }
});Pass your API key as authorization_token. No OAuth required. See Claude MCP Connector docs.
Use the OpenAI Agents SDK with MCPServerStreamableHttp:
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp
async def main():
async with MCPServerStreamableHttp(
name="RoxyAPI",
params={
"url": "https://roxyapi.com/mcp/location",
"headers": {"X-API-Key": "your_api_key_here"}
}
) as server:
agent = Agent(
name="Assistant",
instructions="Use RoxyAPI tools to answer questions",
mcp_servers=[server]
)
result = await Runner.run(agent, "Get today's horoscope for Aries")
print(result.final_output)
asyncio.run(main())
# pip install openai-agentsConnect using the MCP Python SDK with Streamable HTTP transport:
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamable_http_client
async def main():
async with streamable_http_client(
"https://roxyapi.com/mcp/location",
headers={"X-API-Key": "your_api_key_here"}
) as (read_stream, write_stream, _):
async with ClientSession(read_stream, write_stream) as session:
await session.initialize()
# Discover all available tools
tools = await session.list_tools()
print(f"Available tools: {[t.name for t in tools.tools]}")
# Call a tool
result = await session.call_tool(
"post_astrology_natal_chart",
arguments={
"date": "1990-06-15",
"time": "14:30",
"latitude": 40.7128,
"longitude": -74.0060
}
)
print(result)
asyncio.run(main())
# pip install mcpNote: RoxyAPI uses Streamable HTTP transport (POST). The Google ADK SseConnectionParams uses the older SSE transport (GET) which is not compatible. Use the MCP Python SDK directly as shown above, or call our REST API with Gemini function calling.
Edit ~/.gemini/config/mcp_config.json, or .agents/mcp_config.json for one workspace. Open it from the "..." menu at the top of the agent panel: MCP Servers, Manage MCP Servers, View raw config.
{
"mcpServers": {
"roxy-location": {
"serverUrl": "https://roxyapi.com/mcp/location",
"headers": {
"X-API-Key": "your_api_key_here"
}
}
}
}Note: Antigravity uses serverUrl (not url) for Streamable HTTP transport. Save the file, then press Refresh in the MCP panel. See the Antigravity setup guide for the all-products config.
Use the official MCP SDK for your platform. The same URL serves the 2026-07-28 protocol and the earlier 2025 handshake, so a client already on @modelcontextprotocol/sdk 1.x keeps working with no change:
// TypeScript: npm install @modelcontextprotocol/client
import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/client';
// 'auto' probes server/discover and lands on 2026-07-28; omit it for the 2025 handshake
const client = new Client(
{ name: 'my-app', version: '1.0.0' },
{ versionNegotiation: { mode: 'auto' } }
);
const transport = new StreamableHTTPClientTransport(
new URL('https://roxyapi.com/mcp/location'),
{ requestInit: { headers: { 'X-API-Key': 'your_api_key_here' } } }
);
await client.connect(transport);
const tools = await client.listTools();
// Python: pip install mcp
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamable_http_client
async def main():
async with streamable_http_client(
"https://roxyapi.com/mcp/location",
headers={"X-API-Key": "your_api_key_here"}
) as (read_stream, write_stream, _):
async with ClientSession(read_stream, write_stream) as session:
await session.initialize()
tools = await session.list_tools()
print([t.name for t in tools.tools])
asyncio.run(main())See MCP documentation.
Try it in your agent
Once the roxy-location server is connected, drop this into your agent instructions or ask your IDE directly:
Using roxy-location, find the latitude, longitude, and timezone for New York.Connect from hosted automation platforms and bots
The IDE configs above run on your own machine. For hosted automation platforms and messaging bots, the same Streamable HTTP MCP server is reachable over the public URL. Each platform has its own MCP node form or HTTP request step. The dedicated integration guides walk through the exact setup with the right URL field, header field, and API key placement.
The MCP URL and X-API-Key from the snippets above are the same values every guide uses. If your platform is not listed, the Custom tab above shows the raw MCP SDK calls any client can adapt.
Clients that only run local servers (stdio)
Some MCP clients can only launch a local process. For those, the open source astrology-mcp-server package runs over stdio and relays every call to the hosted servers: the same tools, the same answers and the same billing, with no local calculation to keep current. List the domains you want in ROXY_MCP_DOMAINS, comma separated.
{
"mcpServers": {
"roxyapi": {
"command": "npx",
"args": ["-y", "@roxyapi/mcp"],
"env": {
"ROXY_API_KEY": "your_api_key_here",
"ROXY_MCP_DOMAINS": "astrology,vedic-astrology,tarot"
}
}
}
}Claude Desktop users can install it in one click instead: download the desktop extension, double-click it and paste your key. Any client that accepts a URL should use the hosted server above instead.
How AI agents discover and call MCP tools
Your agent uses calculated charts and readings in its replies, with your model and your own voice. Planetary positions are verified against NASA JPL Horizons. No local setup, no AGPL, no hosted-AI markup.
When your AI agent connects to a RoxyAPI MCP server, it sends a tools/list request and receives the full catalog of available tools with typed input schemas, field descriptions, and enum values. Tool discovery is free and does not count toward your quota. The agent then selects the right tool based on user intent, calls it with structured parameters, and receives computed data to interpret into a natural language response.
- Your AI agent connects to the MCP server URL
- It auto-discovers all available tools (endpoints) for that domain, including parameter schemas
- When a user asks a question, the agent picks the right tool and calls RoxyAPI
- RoxyAPI computes the answer, the agent interprets it into a natural response
Every reading is backed by real astronomical calculations verified against NASA JPL Horizons, not hallucinated data.
Cut agent token cost with compact responses
Every tool on every RoxyAPI MCP server takes one optional argument: compact. Set it to true and the same data comes back in a token-optimized shape: whitespace removed, and arrays of same-shaped objects encoded columnar so each field name is sent once, not once per row. The encoding is lossless. No field is dropped, no value changes, and the round trip is verifiable.
Fewer response tokens means lower inference cost for the calling agent. It is requested per call, in the tool arguments:
{
"method": "tools/call",
"params": {
"name": "get_astrology_signs",
"arguments": { "compact": true }
}
}Nothing sets this automatically. The calling model includes compact when your agent instructions ask for it, and a programmatic client (MCP SDK, n8n, a custom agent) sets it directly in the arguments as shown. It defaults to off, so existing clients keep their current response shape until they ask, and it never touches your bill: one tool call is still one request, compact or not.
What is MCP?
Model Context Protocol is an open standard for connecting AI agents to external APIs. Instead of writing integration code, your agent discovers what tools are available and calls them based on user questions. Think of it as API documentation for AI.
MCP servers come in two forms: local (stdio), where you run a process on your own machine, and remote (Streamable HTTP), where the server is hosted for you. RoxyAPI is a remote MCP server with no infrastructure to manage, no containers to run, no dependencies to install. Just a URL and an API key.
MCP server protocol and authentication
Protocol
Remote MCP server using Streamable HTTP transport (POST). Implements MCP Specification 2026-07-28 (latest) and every earlier revision on the same URL: 2024-10-07, 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25. The earlier initialize handshake is the default, so existing configs need no change. A client gets 2026-07-28 by sending the MCP-Protocol-Version: 2026-07-28 header with the per-request _meta envelope, which the official SDKs do when version negotiation is on. On 2026-07-28 there is no handshake and no session: server/discover returns the supported revisions, capabilities and server identity in one call, and ping is gone from that revision. No local process, no stdio, no Docker, just an HTTPS endpoint. Tool schemas follow our OpenAPI 3.1 spec.
Authentication
Pass your API key via X-API-Key header, Authorization: Bearer token, or api_key query parameter. Claude Messages API uses authorization_token which maps to Bearer auth.
Billing
MCP tool calls count against your monthly request quota. Tool discovery (listing endpoints) is free.
Supported platforms
Any MCP-compatible platform works. Verified with OpenAI Agents, Gemini Agents SDK, VS Code, GitHub Copilot, Claude Desktop, Windsurf, Cline, and custom agent frameworks.
Testing
Test endpoints in your browser using the MCP Inspector. Set transport to "Streamable HTTP", add your endpoint URL and X-API-Key header.
Available MCP servers and tool counts
Each domain has its own MCP server with dedicated tools. Connect to one domain or all 18. Every subscription plan includes access to all servers at no extra cost. Tool counts reflect the number of callable operations per domain, from birth chart generation to tarot spreads to dream symbol lookups.
| Domain | Tools | MCP Server | Product page |
|---|---|---|---|
| Astrology | 39 tools | /mcp/astrology | View → |
| Vedic | 58 tools | /mcp/vedic-astrology | View → |
| Forecast | 5 tools | /mcp/forecast | View → |
| Human Design | 12 tools | /mcp/human-design | View → |
| Chinese Astrology | 16 tools | /mcp/chinese-astrology | View → |
| Feng Shui | 11 tools | /mcp/feng-shui | View → |
| Mesoamerican | 18 tools | /mcp/mesoamerican-astrology | View → |
| Vastu | 10 tools | /mcp/vastu | View → |
| Numerology | 20 tools | /mcp/numerology | View → |
| Kabbalah | 12 tools | /mcp/kabbalah | View → |
| Tarot | 10 tools | /mcp/tarot | View → |
| Biorhythm | 6 tools | /mcp/biorhythm | View → |
| Ayurveda | 8 tools | /mcp/ayurveda | View → |
| I-Ching | 9 tools | /mcp/iching | View → |
| Crystals | 12 tools | /mcp/crystals | View → |
| Dreams | 5 tools | /mcp/dreams | View → |
| Angel Numbers | 4 tools | /mcp/angel-numbers | View → |
| Location | 3 tools | /mcp/location | View → |
All servers use the same authentication and Streamable HTTP transport. See pricing for plan details.
List the tools on any server, free
Listing tools needs no API key or account. This calls the Astrology server and prints every tool it can run; swap the path for any server in the table.
curl -X POST https://roxyapi.com/mcp/astrology \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
| jq -r '.result.tools[].name'Build a multi-domain AI chatbot with MCP
Want all 18 domains in one chatbot? Free Astrology AI Chatbot is a MIT-licensed app that does tarot readings, astrology charts, numerology, dream interpretation, and more. It connects to multiple MCP servers simultaneously, auto-discovers tools across all domains, and supports Gemini, Claude, and GPT. A single user question like "compare my birth chart with a tarot reading" triggers calls across two domains automatically. Clone it, add your key, and ship. Browse all free templates →
Can the agent draw the chart, not just describe it?
Yes, in any chat UI you build. The model never draws anything: it calls a RoxyAPI tool, and the tool result is the same JSON the UI components already take, so your interface maps the tool name to the component with componentForTool and sets data, and a natal chart wheel, a kundli or a tarot spread renders beside the reply. Every component decodes the compact tool result itself, the model needs no component names and no UI instructions, and the same four lines work for the Vercel AI SDK and for the Anthropic, OpenAI, and Gemini connectors. Inside a hosted assistant such as Claude Desktop or ChatGPT the reply stays text today. Walkthrough: AI chat widgets.
AGENTS.md for AI coding agents
MCP is the runtime surface where Claude, GPT, and Cursor call RoxyAPI tools. AGENTS.md is the build-time surface where coding agents write the code that wires the rest of your app to those tools. Different file, different audience.
RoxyAPI publishes a tight playbook at https://roxyapi.com/AGENTS.md (imperative, blind-agent friendly) covering authentication, base URL, error contract, rate limits, idempotency, and the right endpoint for common tasks. It is the 2026 cross-tool standard read by Cursor, Codex, Windsurf, Aider, Claude Code, Gemini CLI, Zed, Warp, and RooCode. The same file ships inside @roxyapi/sdk, roxy-sdk, roxyapi/sdk, RoxyApi.Sdk, and github.com/RoxyAPI/sdk-go, so your coding agent picks it up the moment you install the SDK in any of the five languages.
Frequently Asked Questions
What is MCP (Model Context Protocol)?
MCP is an open standard for connecting AI agents to external APIs. Instead of writing integration code or manually defining tool schemas, your AI agent connects to an MCP server and auto-discovers all available tools at runtime. RoxyAPI provides remote MCP servers for 18 domains including astrology, forecast, human design, numerology, tarot, biorhythm, I-Ching, crystals, dreams, and angel numbers.
Does the RoxyAPI MCP return real calculations, or only documentation?
Both, from two different servers, and the difference is the point. The per-domain servers return computed data: one server per domain, 258+ callable tools in all, and a tool call returns the same verified chart, panchang or reading the REST endpoint returns. The Docs server is a separate keyless server with a single tool, search_docs, that returns documentation only and exists so a coding agent can write your integration with the right field names. Discovery is keyless on every server, so you can send a tools/list request to any /mcp/{domain} URL and read the callable tools for yourself before you have an account.
Was RoxyAPI built for MCP, or was MCP added to it later?
Built for it. RoxyAPI was the first astrology and insight API to ship Remote MCP, it has shipped since 2025 with the dated record public at roxyapi.com/changelog, and it is architecture rather than an adapter. One hosted server per domain is generated from the same specification the REST API serves, so a new endpoint becomes a callable tool with no separate MCP codebase to drift, and the token-optimized compact response is part of the tool contract rather than a later addition. That gives 258+ tools across 18 domains over Streamable HTTP, every server published in the official MCP Registry, with no local process to run, no stdio package to host and no OAuth step. Two things a reader can verify in one request: discovery is keyless, so a tools/list call to any /mcp/{domain} URL returns the callable tools before you have an account, and each server carries only its own domain, because one server exposing every tool at once gives an agent a larger surface than it can choose from well. Much of this category still ships either no MCP server at all or a stdio package the developer has to host.
What is the difference between MCP and function calling?
Function calling requires you to manually define every tool schema in your code before the model can use it. MCP eliminates this step by letting the agent discover tools dynamically from a server. MCP is ideal when an API has many endpoints (RoxyAPI has 261+), because you connect once and get access to all tools without writing or maintaining definitions.
How do I connect my AI agent to the RoxyAPI MCP server?
Get an API key from roxyapi.com/pricing, then add the MCP server URL and your API key to your platform config. For Claude Desktop, install the desktop extension, which runs a local bridge. For VS Code, add the Remote MCP URL to .vscode/mcp.json. For Claude Code, use the command shown in the setup guide. Remote HTTP clients need no local server process.
Which AI platforms support RoxyAPI MCP servers?
RoxyAPI MCP servers work with any MCP-compatible platform. Verified platforms include Claude Desktop, Claude Code, VS Code (GitHub Copilot), OpenAI Agents SDK, Google Gemini ADK, Windsurf, Cline, Continue, Roo Code, and custom agent frameworks using the MCP TypeScript or Python SDK.
Do MCP tool calls count against my API quota?
Yes, MCP tool calls count against your monthly request quota the same as REST API calls. Tool discovery (listing available endpoints) is free and does not count toward your quota. All subscription plans include access to all MCP servers across all 18 domains.
Can I reduce the tokens my AI agent spends per MCP call?
Yes. Every MCP tool exposes an optional compact argument, and when it is set the tool returns the same complete data in a token-optimized shape, measured at roughly 40 to 52 percent fewer tokens on detailed charts. Nothing enables it automatically: the calling model sends compact when your agent instructions ask for it, or a programmatic client sets it directly in the tool arguments. The encoding is lossless, so nothing is dropped, and it lowers the inference cost of the agent reading the result. It is opt-in and defaults to off, so existing clients are unaffected, and it does not change your quota: one tool call still counts as one request.
Is RoxyAPI MCP free to use?
MCP tool discovery (listing available tools) is always free. Tool calls use the same pricing as REST API calls and count toward your monthly quota. Every subscription plan includes full access to all 18 MCP servers at no extra cost. Visit roxyapi.com/pricing to see plans starting at $39/month.
Should I use MCP or the REST API?
Use MCP if you are building AI agents (Claude, OpenAI Agents, Gemini) that need to auto-discover tools at runtime. Use REST if you are building traditional apps (mobile, web, backend) where you control which endpoints to call. Both use the same calculations and pricing. MCP is simpler for AI agents; REST is simpler for custom business logic.
Can I use RoxyAPI MCP without writing code?
Yes. Claude Desktop uses the one-click desktop extension with a local bridge. VS Code uses the Remote MCP URL and API key in its workspace config. Follow the setup instructions for your client; no custom integration code is needed.