lifeastroapi-mcp

module
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: MIT

README

lifeastro-mcp

Go Reference Release

Model Context Protocol (MCP) server for LifeAstroAPI — exposes 320 Vedic & Western astrology tools to AI assistants like Claude Desktop, Cursor, Continue.dev, and Codex CLI.

LifeAstroAPI is a REST astrology API for Vedic astrology, panchang, Hindu festivals, kundli, muhurat, numerology and Western charts. Free tier: 1,500 credits a month, no card — get a key.

Covers panchang, the Hindu festival and vrat calendar (Ekadashi, Pradosh, Purnima, Sankranti and more, for any city, verified against printed panchangs of 14 cities), kundli, dashas, kundli matching, muhurat, horoscopes, numerology, tarot and Western astrology.

End users don't write code, copy curl commands, or read API docs. They just chat with their AI assistant naturally and the assistant invokes the right tool when an astrology question comes up:

User: Mera lagna kya hai? Birth: 15 Jan 1990, 10:30 AM, Mumbai.

Claude: (calls chart_ascendant) Aapka lagna Capricorn (Makara) hai, 12°34′ par. Lagna lord Saturn 10th house mein sthit hai...

Architecture

┌─────────────────────────┐
│  USER LAPTOP            │
│  Claude Desktop / Cursor│
│        ↓ stdio          │
│  lifeastro-mcp (this)   │
│        ↓ HTTPS          │
└────────│────────────────┘
         ↓ public internet
  api.lifeastroapi.com

lifeastro-mcp runs as a subprocess of the AI client on your laptop — not on any server. It forwards tool calls as authenticated HTTPS requests to api.lifeastroapi.com. Every call costs the same number of credits as a direct curl; there's no MCP surcharge.

Installation

brew tap ayanshulife/lifeastroapi-mcp https://github.com/ayanshulife/lifeastroapi-mcp
brew install lifeastro-mcp

# Verify (no key set yet, so it warns and exits when stdin closes)
lifeastro-mcp </dev/null 2>&1 | head -1
# → "lifeastro-mcp: LIFEASTRO_API_KEY is not set — tools are listed but every call will fail until it is."
Any platform — pre-built binary
  1. Visit the Releases page

  2. Download the lifeastro-mcp-<os>-<arch> binary matching your machine

  3. Make it executable and put it on your PATH:

    # macOS / Linux
    chmod +x lifeastro-mcp-darwin-arm64
    sudo mv lifeastro-mcp-darwin-arm64 /usr/local/bin/lifeastro-mcp
    
    # Windows: rename to lifeastro-mcp.exe and add the folder to PATH
    
Docker
docker run -i --rm -e LIFEASTRO_API_KEY=dv_live_... ghcr.io/ayanshulife/lifeastroapi-mcp:latest

In an MCP client config, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "LIFEASTRO_API_KEY", "ghcr.io/ayanshulife/lifeastroapi-mcp:latest"] and set LIFEASTRO_API_KEY in "env".

Go developers — go install
go install github.com/ayanshulife/lifeastroapi-mcp/cmd/lifeastro-mcp@latest

The binary lands in $GOBIN (or $GOPATH/bin).

Build from source
git clone https://github.com/ayanshulife/lifeastroapi-mcp.git
cd lifeastroapi-mcp
make build
# Binary: ./lifeastro-mcp

Get an API key

Sign up at lifeastroapi.com and create a key from your dashboard. The MCP server uses the same dv_live_<hex> keys as direct API access — there's no separate "MCP key".

The free plan (1,500 credits a month, up to 500 a day) is enough to try most tools. Every tool call costs exactly what the same API request costs — see meta_endpoints for the per-route credit cost.

Configuring your AI client

The MCP server reads its credentials from environment variables that the AI client injects at subprocess spawn. Add the config block below to your client's MCP config file.

Claude Desktop

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add (or merge with existing mcpServers):

{
  "mcpServers": {
    "lifeastro": {
      "command": "/usr/local/bin/lifeastro-mcp",
      "env": {
        "LIFEASTRO_API_KEY": "dv_live_REPLACE_WITH_YOUR_KEY"
      }
    }
  }
}

Quit and reopen Claude Desktop. The tools will appear in the tool list at the bottom of the chat window.

Cursor

Cursor reads ~/.cursor/mcp.json:

{
  "mcpServers": {
    "lifeastro": {
      "command": "/usr/local/bin/lifeastro-mcp",
      "env": {
        "LIFEASTRO_API_KEY": "dv_live_REPLACE_WITH_YOUR_KEY"
      }
    }
  }
}

Restart Cursor (Cmd-Shift-P → Reload Window).

OpenAI Codex CLI

Codex CLI reads ~/.codex/config.toml:

[mcp_servers.lifeastro]
command = "/usr/local/bin/lifeastro-mcp"
env = { LIFEASTRO_API_KEY = "dv_live_REPLACE_WITH_YOUR_KEY" }

Restart Codex and the tools become available in your session.

Continue.dev / Windsurf / other MCP clients

Any MCP-aware client supports the same shape — command + env with the absolute path to the binary and the API key. Refer to your client's docs for the config-file location.

Tools

The server exposes 320 tools across Vedic and Western astrology. The full list with descriptions is at lifeastroapi.com/mcp.

Domain Tools Examples
Panchang 29 panchang_abhijit, panchang_advanced, panchang_amrit_kalam, panchang_basic
Birth chart (Vedic) 26 chart_kundli_facts, chart_yogas, chart_doshas, chart_sensitivity, chart_ascendant
Ashtakavarga 4 ashtakavarga_bhinna, ashtakavarga_kaksha, ashtakavarga_sarva, ashtakavarga_transit_score
Dasha 14 dasha_char_antardashas, dasha_char_current, dasha_char_full, dasha_char_major
Compatibility (Milan) 16 milan_summary, milan_overlay, milan_dasha_sync, match_making_score, ashtakoota_breakdown
Muhurta 11 muhurta_best_time, muhurta_chandra_bala, muhurta_graha_pravesh, muhurta_naamkaran
Transits & Sade Sati 10 sade_sati, transit_sade_sati_windows, transit_windows, transit_double_transit, transit_small_panoti
Calendar, festivals & eclipses 9 calendar_adhik_maas, calendar_month, calendar_ritu, calendar_samvatsara
Planet moments 4 planet_combustion_window, planet_ingress, planet_retrograde_window, planet_speed
Prashna (horary) 5 prashna_answer, prashna_arudha, prashna_chart, prashna_lagna_lord
Numerology 9 numerology_advanced, numerology_challenges, numerology_conductor, numerology_destiny
Varshaphal 7 varshaphal_chart, varshaphal_harsha_bala, varshaphal_lord, varshaphal_mudda_dasha
Lal Kitab 3 lalkitab_chart, lalkitab_dasha, lalkitab_dasha_current
Remedies 11 remedy_for_graha, remedy_by_rule_id, remedy_daan_by_id, remedy_lalkitab_for_placement
Narrative interpretations 37 narrative_career_outlook, narrative_dasha_phal, narrative_dasha_tree_phal, narrative_divisional
Horoscopes 3 horoscope_daily, horoscope_monthly, horoscope_weekly
Reports 12 report_dasha_analysis, report_horoscope_daily, report_horoscope_monthly, report_horoscope_weekly
Tarot 5 tarot_card, tarot_cards, tarot_daily, tarot_spread
Geo 4 geo_place, geo_reverse, geo_search, geo_timezone
Western astrology 92 western_astrocartography_local_space, western_astrocartography_planet_lines, western_compatibility_sun_sign, western_composite_aspects
Catalogs & discovery 6 meta_ayanamsas, meta_endpoints, meta_vedic_doshas, meta_vedic_locales

The data tools (chart_kundli_facts, chart_yogas, chart_doshas, chart_sensitivity, transit_sade_sati_windows, transit_windows, remedy_for_graha, milan_overlay, milan_summary) return ids and numbers rather than prose, so the assistant can reason over the chart itself: planet ids sun … ketu, sign_index 0-based (0 = Aries), house 1-based whole-sign from the lagna, nakshatra index 0-based (0 = Ashwini), every instant as *_local plus *_jd, and a skipped object for anything that could not be computed.

How dates work
  • Tools about "today" (panchang, transits, prashna, planet moments, calendar) take an optional date. Leave it out and the server sends today's date in the timezone you gave.
  • Tools that need a birth chart and a moment to evaluate (transits to a chart, Sade Sati, tara bala, personalised horoscopes) take the birth data as date/time/tz and the moment as the optional on_date.
  • The per-purpose muhurta tools (muhurta_vivah, muhurta_graha_pravesh, …) score one date per call. To search a range for the best dates, use muhurta_best_time.
Languages

The Vedic tools answer in the language you ask for: English (default), Hindi, Marathi, Telugu, Tamil, Kannada, Malayalam, Gujarati and Bengali. Names (planets, signs, nakshatras, tithis, festivals), labels, notes and the interpretation text all come back in that language. Punjabi returns names and terms in the language; longer text is still English.

  • 188 Vedic tools take an optional language input — locale on the data tools (panchang, calendar, festivals, eclipses, chart, dasha, milan, muhurta, transits, prashna, varshaphal, ashtakavarga, Lal Kitab) and lang on the horoscope, numerology, report and narrative tools. Values: en, hi, mr, te, ta, kn, ml, gu, bn, pa. The assistant normally sets it from the language of the conversation.
  • 25 Vedic tools have no language input because their answer is only numbers, times and ids (for example panchang_rahu_kaal, panchang_sunrise_sunset, ashtakavarga_sarva, transit_windows, chart_yogas).
  • Ids stay in English in every language (sun … ketu, rule ids, sign_index, classical source citations), so code that reads them does not change.
  • Western astrology, Tarot, geo and catalog tools are English. The seven western_narrative_* tools also answer in Hindi and Marathi (lang: hi, mr).
  • Leave the language out and the API default applies: English, or the language configured for your API key.

Troubleshooting

The tools don't appear in Claude Desktop. Check the Claude Desktop logs at ~/Library/Logs/Claude/mcp*.log. The most common errors:

  • command not found — the path in command is wrong. Use which lifeastro-mcp to find the absolute path and paste that.
  • LIFEASTRO_API_KEY is not set — the env block is missing or misspelt. The server still starts and lists its tools, but every tool call returns this message until the key is set.

A tool call returns API 401: Unauthorized. Your API key is invalid, revoked, or expired. Generate a new one in the dashboard.

A tool call returns API 429. You've hit your plan's rate limit or daily cap. Either upgrade or wait for the next reset window (free tier resets at midnight UTC).

A tool call returns context deadline exceeded. The upstream API took longer than 60s — usually a network blip. Retry once. If it persists, check api.lifeastroapi.com/healthz.

Privacy

lifeastro-mcp runs entirely on your local machine. It only sends data to api.lifeastroapi.com (HTTPS) when an AI tool calls one of the registered tools. It does not phone home, collect telemetry, or log requests anywhere. The binary is statically linked Go — you can audit the source in this repository.

Development

# Run tests
make test

# Format + vet
make fmt vet

# Build for current platform
make build

# Cross-compile for all release platforms
make build-all VERSION=0.12.0

# Call every tool against the real API (needs a key; spends credits).
# Reports cost 500-8000 credits each, so they are skipped unless asked for.
LIFEASTRO_API_KEY=dv_live_... make live
LIFEASTRO_API_KEY=dv_live_... make live LIVE_SKIP=        # include reports
# Also pass a language to every tool that takes one and list the tools
# that answered without text in it.
LIFEASTRO_API_KEY=dv_live_... LIFEASTRO_LIVE_LOCALE=gu make live

Roadmap

  • v0.12 (current): Local stdio MCP server, 320 tools, 188 of them answer in 8 languages, every tool verified against the live API (make live)
  • v1.0 (planned): Stable tool surface; semantic versioning kicks in
  • Remote HTTP MCP (separate project): Hosted MCP endpoint at mcp.lifeastroapi.com for ChatGPT and web/mobile MCP clients — tracked separately from this repo

License

MIT — Copyright (c) 2026 Ayanshu Life. You may use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of this software.

The MIT license applies to the MCP client code in this repository only. The LifeAstroAPI service it talks to (api.lifeastroapi.com) is a separate commercial product governed by its own Terms of Service.

Support

Directories

Path Synopsis
cmd
lifeastro-mcp command
Command lifeastro-mcp is the Model Context Protocol (MCP) server for LifeAstroAPI.
Command lifeastro-mcp is the Model Context Protocol (MCP) server for LifeAstroAPI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL