Connect Gemini

MCP via the Gemini CLI (~/.gemini/settings.json).

Connecting AstroCodex to your AI assistant links it to the Account MCP — so it can access your saved charts, run techniques, fetch transits, and compute synastry, all within your normal AI conversation.

What you need

1

An AstroCodex account on a plan that includes Account API/MCP. Many assistants connect by signing in via OAuth — no key to create; an Account API key (from /api-keys) is only needed for clients you configure by hand.

2

The Gemini CLI installed (npm i -g @google/gemini-cli), signed in with a Google account.

Do you need an API key?

Often not. When you paste the MCP URL, many assistants (Claude, ChatGPT) show a "Sign in / Connect" button — approve access to your AstroCodex account and you are done, with no key to manage. The steps below describe the manual API-key method, for clients you configure with an X-API-Key header instead.

Account MCP URL

Account MCP URL
https://api.astrocodex.ai/api/v1/mcp

Setup steps

  1. 1

    Obtain an AstroCodex Account API key at astrocodex.ai/api-keys.

  2. 2

    Install the Gemini CLI (npm i -g @google/gemini-cli) and sign in with your Google account.

  3. 3

    Add AstroCodex in one command: gemini mcp add --transport http -H "X-API-Key: acx_YOUR_KEY" astrocodex https://api.astrocodex.ai/api/v1/mcp (or edit ~/.gemini/settings.json by hand — see the snippet below).

  4. 4

    Restart the Gemini CLI and run /mcp — "astrocodex" should show as connected.

  5. 5

    Ask: "Show my AstroCodex birth charts." Gemini calls the AstroCodex tools.

Config snippet

Config
{
  "mcpServers": {
    "astrocodex": {
      "httpUrl": "https://api.astrocodex.ai/api/v1/mcp",
      "headers": {
        "X-API-Key": "acx_YOUR_KEY_HERE"
      }
    }
  }
}

Gemini connects to MCP servers through the Gemini CLI and Gemini Code Assist agent mode — config lives in ~/.gemini/settings.json (global) or .gemini/settings.json (per project). Use the "httpUrl" key (not "url") for streamable-HTTP servers like AstroCodex. The gemini.google.com chat web app does not take custom MCP servers.

What you get — and what it costs

Once connected, your AI assistant can create and edit charts in your AstroCodex account, pull their calculated data (planets, houses, yogas, dashas, transits, synastry…), and interpret it for you — all inside your normal chat. The analysis runs on the model you already pay for (Claude, GPT-4o, Gemini, Grok…), so it does NOT spend AstroCodex tokens. Only your plan's request limit and monthly quota apply: fetching chart data counts as requests, never tokens.