Skip to main content
Glama

LunarGarden MCP

A public Model Context Protocol (MCP) server for astrology-aware garden care planning.

LunarGarden combines real external astrology data (lunar phase + Vedic panchang), hourly weather + soil forecasts, and static soil profiles into a structured 24-72 hour care plan with rationales and confidence scores.

Stack

  • Cloudflare Worker (src/worker.js)

  • Model Context Protocol server (JSON-RPC 2.0 over HTTP at /mcp)

  • Same-origin frontend (index.html, styles.css, app.js) served from the Worker

  • Caching via Cloudflare KV with in-memory fallback for local development

Related MCP server: mcp-indian-astrology

External APIs

Source

Auth

Used for

AstrologyAPI.com

HTTP Basic (ASTROLOGY_API_USER_ID + ASTROLOGY_API_KEY)

moon_phase_report, basic_panchang

Open-Meteo Forecast

None

Hourly weather + soil temp/moisture

Open-Meteo Air Quality

None

Hourly UV index

SoilGrids ISRIC

None (optional, fail-soft)

Static soil properties

MCP Tools

Tool

Purpose

get_lunar_garden_signal

Lunar phase + moon sign + Vedic panchang

get_weather_soil_forecast

Hourly weather + soil forecast (24-72h)

get_soil_profile

Static SoilGrids baseline (fail-soft)

get_air_quality_uv

Hourly UV index (24-72h)

find_garden_care_windows

Optimal outdoor work windows

plan_garden_care

Composite 24-72h structured care plan

explain_care_decision

Explainability for one plan item

generate_agent_brief

Inter-agent handoff brief

Full schemas, input/output contracts, and example calls are documented in /agents-guide.md (served at the same origin).

Endpoints

Method

Path

Purpose

GET

/

Frontend HTML

GET

/styles.css

Frontend stylesheet

GET

/app.js

Frontend logic + MCP client

GET

/healthz

Liveness probe

GET

/agents-guide.md

Public MCP agent documentation

POST

/mcp

JSON-RPC 2.0 MCP endpoint

Development

# Install
npm install

# Local dev server (memory cache, no real AstrologyAPI calls)
npx wrangler dev

# Production deploy (after explicit approval only)
npx wrangler deploy

Secrets (production)

wrangler secret put ASTROLOGY_API_USER_ID
wrangler secret put ASTROLOGY_API_KEY

Real AstrologyAPI calls are disabled unless both env vars are present AND the LIVE_ASTROLOGY environment variable is explicitly set to "true".

Safety

  • All secrets live in Cloudflare Worker secrets, never in source.

  • Same-origin only: the browser never calls upstream APIs directly.

  • Cache TTL: lunar 1h, weather 15min, soil 24h, UV 15min.

  • SoilGrids is fail-soft: empty profile does not block composite output.

  • Invalid input returns HTTP 400 with a clear error.message.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables querying a plant knowledge graph for companion planting, climate suitability, and landscape design recommendations via natural language.
      19
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables AI assistants to access Indian Vedic astrology services including Panchang, Kundli, matchmaking, and festivals through natural language.
      128
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Vedic and Western astrology for AI agents: 103 read-only tools for natal charts, dasha, kundali matching with Rajju and Vedha vetoes, panchanga, numerology and tarot, backed by Swiss Ephemeris and verified against NASA JPL Horizons.
      103
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude to set up and manage a local garden journal by searching places, saving garden setup, logging and updating plantings, retrieving forecasts, checking frost risk, and finding planting windows.
      MIT