# AI Agents & MCP

Building an AI agent that needs real astrology calculations instead of hallucinations? AstroWay plugs into **Claude (Anthropic), ChatGPT-4 (OpenAI), Llama 3.3 (Groq), DeepSeek, Google Gemini, Mistral** — via MCP, llms.txt, or direct HTTP. Two integration paths: **MCP server** (zero-code for Claude Desktop, Cursor IDE, Windsurf, VS Code llm CLI, and any MCP-compatible client — including GPT with MCP via OpenAI Realtime API) or **HTTP API** (for any agent framework — LangChain, LlamaIndex, AutoGen, CrewAI).

## Path 1: MCP server (recommended)

Model Context Protocol (MCP) is an open standard for connecting tools to AI models. The AstroWay MCP server provides 25 tools for calculations and interpretations.

### Claude Desktop setup

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "astroway": {
      "command": "npx",
      "args": ["@astroway/mcp"],
      "env": {
        "ASTROWAY_API_KEY": "aw_live_your_key_here"
      }
    }
  }
}
```

After restarting Claude Desktop, it will see 25 astrology tools.

### What the MCP server can do

| Tool | What it does |
|---|---|
| `natal_chart` | Calculate natal chart |
| `synastry` | Two-person synastry |
| `daily_horoscope` | Daily horoscope |
| `interpret_natal` | AI interpretation of natal chart |
| `human_design` | Full HD chart |
| `transits` | Current transits |

Full list — 25 tools covering core calculations and AI interpretations.

### Example dialog with Claude

> **User:** Build a natal chart for someone born July 14, 1990 at 14:30 in Kyiv. What does Sun in Cancer in the 10th house mean?
>
> **Claude:** *Uses `natal_chart` to calculate, then `interpret_placement` for interpretation. Returns planet positions with real data and a meaningful interpretation.*

## Path 2: HTTP API

For AI agents without MCP support — use HTTP API directly.

### For content generation

```ts
// AI agent calls /interpret/natal for interpretation
const interpretation = await fetch('https://api.astroway.info/v1/interpret/natal', {
  method: 'POST',
  headers: {
    'X-Api-Key': process.env.ASTROWAY_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    date: '1990-07-14',
    time: '14:30:00',
    timezoneOffset: 3,
    latitude: 50.4501,
    longitude: 30.5234,
  }),
});

const result = await interpretation.json();
// result.text — ready AI interpretation
// result.disclaimer — disclaimer for display
```

### For calculations + your own LLM

```ts
// 1. Get raw data via /chart (cheaper — 20 credits)
const chart = await fetch('https://api.astroway.info/v1/chart', { ... });
const data = await chart.json();

// 2. Pass data to your LLM
const prompt = `Interpret this natal chart: ${JSON.stringify(data.planets)}`;
const llmResponse = await myLLM.generate(prompt);
```

<Aside type="tip">
If you only need the interpretation — use `/interpret/*` (50 credits, text ready). If you want to control the prompt — use `/chart` (20 credits) and pass the data to your LLM.
</Aside>

## Use cases

### Personal astrology assistant

MCP server + Claude/ChatGPT. User asks — agent calculates and interprets. Budget: Free tier for personal use.

### Social media content bot

Daily horoscope generation for 12 signs via `/horoscope/daily`. 12 requests per day = 240 credits. Free tier with plenty of headroom.

### AI coaching platform

`/interpret/natal` + `/interpret/transits` per client. 100 clients/day = 10,000 credits/day. Pro plan.

<CardGrid>
  <LinkCard title="Quick start →" href="/en/getting-started/" description="First request in 5 minutes" />
  <LinkCard title="Horoscope API" href="/en/products/horoscope-api/" description="AI interpretations & horoscopes" />
  <LinkCard title="Pricing" href="/en/pricing/" description="From Free to Enterprise" />
</CardGrid>
