search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Astrology MCP Server: Connect Divine API to Any AI Platform

Connect Divine API to any AI platform. 193 astrology, numerology & horoscope tools available via the Model Context Protocol. Works with Claude, ChatGPT, Gemini, VS Code, and any MCP client.

Get Your API Keys: divineapi.com/api-keys — You will need these for every integration below.


MCP Server Endpoints

Three specialized servers covering Indian astrology, Western astrology, and horoscope & numerology services.

ServerEndpointTools
Indian / Vedic Astrologyhttps://mcp.divineapi.com/indian/mcp78
Western Astrologyhttps://mcp.divineapi.com/western/mcp53
Horoscope, Tarot & Numerologyhttps://mcp.divineapi.com/horoscope/mcp62

Available Tools by Server

Each MCP server exposes categorized tools. Here are the highlights:

Indian / Vedic Astrology — 81 Tools

CategoryExample Tools
Birth ChartPlanetary Positions, Basic Astro Details, Bhava Kundli, Horoscope Chart
Dasha SystemsVimshottari, Yogini, Jaimini Chara, Kaal Chakra
CompatibilityAshtakoot Milan, Dashakoot Milan, Manglik Dosha
Panchang & CalendarPanchang, Tithi, Nakshatra, Choghadiya, Festivals
TransitsGrah Gochar, Sadhe Sati, Planet Retrograde, Combustion
KP SystemKP Cuspal, KP Planetary Positions, KP Significator

Horoscope, Tarot & Numerology — 61 Tools

CategoryExample Tools
HoroscopesDaily, Weekly, Monthly, Yearly, Chinese
Tarot & ReadingsYes/No Tarot, Coffee Cup, Angel, Fortune Cookie
Love & RelationshipsLove Calculator, Compatibility, In-Depth Love Reading
NumerologyCore Numbers, Name Number, Lo Shu Grid, Missing Numbers
PDF ReportsKundali Sampoorna, Match Making, Vedic 5/10/15 Year

Western Astrology — 53 Tools

CategoryExample Tools
Natal ChartsPlanetary Positions, House Cusps, Aspect Table, Natal Wheel
SynastryEmotional, Physical, Sexual, Spiritual Compatibility
TransitsDaily, Weekly, Monthly Transit, Secondary Progressions
AdvancedMidpoints, Arc Directions, Fixed Stars, Eclipses
CompositeComposite Aspect Table, Planetary Positions, Natal Wheel

Setup Guide

Select your platform below for copy-paste-ready configuration.

VS Code (Copilot, Cline, Continue)

Add to .vscode/mcp.json:

{
  "servers": {
    "divineapi-indian-astrology": {
      "type": "http",
      "url": "https://mcp.divineapi.com/indian/mcp",
      "headers": {
        "X-Divine-Api-Key": "your_api_key_here",
        "X-Divine-Auth-Token": "your_auth_token_here"
      }
    }
  }
}

Note: Replace indian with western or horoscope for other servers. Works with GitHub Copilot (VS Code 1.102+), Cline, Continue, Roo Code. Reload VS Code after saving.


Claude Code

Run in terminal:

claude mcp add divineapi-indian '{"type":"http","url":"https://mcp.divineapi.com/indian/mcp","headers":{"X-Divine-Api-Key":"your_api_key_here","X-Divine-Auth-Token":"your_auth_token_here"}}'

Add --scope user to make it available across all projects. Run claude mcp list to verify.


Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "divineapi-indian-astrology": {
      "url": "https://mcp.divineapi.com/indian/mcp",
      "headers": {
        "X-Divine-Api-Key": "your_api_key_here",
        "X-Divine-Auth-Token": "your_auth_token_here"
      }
    }
  }
}

Config location:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving.


Claude Messages API

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://mcp.divineapi.com/indian/mcp",
    name: "divineapi-indian-astrology",
    authorization_token: "your_api_key_here"
  }],
  tools: [{ type: "mcp_toolset", mcp_server_name: "divineapi-indian-astrology" }],
  messages: [{ role: "user", content: "Your prompt here" }]
}, {
  headers: { "anthropic-beta": "mcp-client-2025-11-20" }
});

Pass your Divine API key as authorization_token. No OAuth required.


OpenAI Agents SDK

import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async def main():
    async with MCPServerStreamableHttp(
        name="DivineAPI",
        params={
            "url": "https://mcp.divineapi.com/indian/mcp",
            "headers": {
                "X-Divine-Api-Key": "your_api_key_here",
                "X-Divine-Auth-Token": "your_auth_token_here"
            }
        }
    ) as server:
        agent = Agent(
            name="Astrologer",
            instructions="Use Divine API 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())

Gemini / Python MCP Client

import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    async with streamablehttp_client(
        "https://mcp.divineapi.com/indian/mcp",
        headers={
            "X-Divine-Api-Key": "your_api_key_here",
            "X-Divine-Auth-Token": "your_auth_token_here"
        }
    ) as (read_stream, write_stream, _):
        async with ClientSession(read_stream, write_stream) as session:
            await session.initialize()
            tools = await session.list_tools()
            print(f"Available tools: {[t.name for t in tools.tools]}")

asyncio.run(main())

Custom MCP Client (TypeScript)

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';

const client = new Client({ name: 'my-app', version: '1.0.0' });
const transport = new StreamableHTTPClientTransport(
  new URL('https://mcp.divineapi.com/indian/mcp'),
  { requestInit: { headers: {
    'X-Divine-Api-Key': 'your_api_key_here',
    'X-Divine-Auth-Token': 'your_auth_token_here'
  }}}
);
await client.connect(transport);
const tools = await client.listTools();
console.log(tools);

How It Works

The Model Context Protocol connects AI assistants to Divine API in four steps.

StepDescription
1. DiscoveryYour AI client connects to the MCP endpoint and discovers all available astrology tools — their names, parameters, and descriptions.
2. User PromptYou ask a question in natural language: "What's today's Panchang for Delhi?" or "Generate my natal chart."
3. Tool ExecutionThe AI selects the right tool(s), sends the request to Divine API via MCP, and receives structured astrological data.
4. ResponseThe AI formats the raw data into a clear, natural-language response — complete with interpretations and insights.

Authentication

Two ways to authenticate with Divine API MCP servers. Both use your credentials from divineapi.com/api-keys.

Header-Based Auth (Recommended)

Pass your API key and auth token as HTTP headers with every request. Works with VS Code, Claude Code, Claude Desktop, OpenAI, Gemini, and custom clients.

X-Divine-Api-Key: your_api_key
X-Divine-Auth-Token: your_auth_token

OAuth 2.0 (Claude.ai)

For Claude.ai web connectors, OAuth is used automatically. Just enter the MCP URL in Settings → Connectors, and you'll be redirected to a login page to enter your credentials.

// Claude.ai Settings → Connectors
URL: https://mcp.divineapi.com/indian/mcp
// No Client ID needed — just click Add

What is MCP?

The Model Context Protocol is an open standard that lets AI assistants connect to external tools and data sources. Think of it as a universal adapter — instead of building separate plugins for every AI platform, one MCP server works everywhere.

Divine API's MCP servers expose 193 astrology, numerology, and horoscope tools that any AI assistant can discover and call. Your users ask questions in plain language, and the AI handles the rest.

Available Servers

ServerEndpoint URLTools
Indian / Vedic Astrologyhttps://mcp.divineapi.com/indian/mcp78 tools
Western Astrologyhttps://mcp.divineapi.com/western/mcp53 tools
Horoscope, Tarot & Numerologyhttps://mcp.divineapi.com/horoscope/mcp62 tools