Astro-MCP is a Python MCP server that consumes ephemeris-mcp:get_sky_state through MCP-over-SSE and provides structured astrological calculations backed by a SQLite persons database.
Version 0.2.0 adds the finalized delivery boundary for rendered charts:
astro://charts/natal/{person_id}./charts/natal/{person_id}.{format}.render_* MCP tools are removed.The server listens on port 7016 by default. ASTRO_PORT controls the port.
src/astro_mcp/
├── server.py # FastAPI app, MCP server, resources, HTTP route
├── tools.py # Tool registration facade
├── chart_tools.py # Direct calculation tools
├── by_id_tools.py # Database-backed calculation tools
├── chart_resources.py # Natal chart artifact delivery
├── chart_renderer.py # Stable chart drawing and format conversion
├── chart_helpers.py # Renderer output helpers
├── chart_styles.py # Renderer styles and proportions
├── storage.py # SQLite persistence
├── dashboard.py # Person-management routes
└── ephemeris_client.py # Upstream MCP client
chart_renderer.py, chart_helpers.py, and chart_styles.py are the chart production implementation. v0.2.0 changes delivery only; those files are not part of the delivery redesign.
The server exposes tools for planetary positions, natal charts, transit charts, synastry, composite and Davison calculations, transit previews, relationship summaries, person management, and house-system listing. Direct tools accept birth data. _by_id variants resolve persons from the database.
The implemented v0.2.0 resource template is:
astro://charts/natal/{person_id}
A resource read resolves the person, calls the existing calculate_natal_chart_by_id path, calls the existing render_natal_wheel function, and returns the resulting chart artifact with its MIME type.
No render_* MCP tool exists in v0.2.0.
/charts/natal/{person_id}.{format}
The supported format suffixes are those already supported by the renderer: svg, png, jpg, and jpeg. The existing size query parameter may also be supplied.
The route returns the rendered bytes/text with the corresponding image content type. It reuses the same artifact path as the MCP resource.
The persons database stores:
birth_datetime: naive local time with no UTC offsettimezone: IANA timezone namelatitude, longitude, and optional elevationThe conversion from stored local time to UTC occurs in _get_person_birth_data() and must not be duplicated by delivery code.
Implemented:
render_* MCP toolsNot implemented in v0.2.0:
These are explicit non-goals, not unfinished items within the v0.2.0 delivery change.
Run:
pytest
The v0.2.0 verification must confirm that calculation tools remain available, render_* tools are absent, the natal resource template is registered, and the HTTP chart route returns the existing rendered artifact.
The detailed delivery plan is IMPLEMENTATION_PLAN_v0.2.0.md.