Astro-MCP: Organized Themes and Action Plan
Theme 1: Foundation & Infrastructure
- Core Requirements: Follow MCP Server Manifest conventions (FastMCP + FastAPI, SSE transport, logging, health endpoint)
- Person Database: SQLite database for storing birth data (name, birth_datetime, lat/lon, nickname)
- Project Structure: Isolate app-specific code in
src/astro_mcp/ with server wiring in src/astro_mcp/server.py
- Housekeeping Scripts:
run.sh, killserver.sh, restart.sh, tests.sh
- Dashboard: Lightweight Jinja2 + vanilla JS dashboard for person management
- SVG Charts (Future): Optional SVG chart generation for visual representation
Theme 2: Astronomical Data Integration
- Primary Data Source:
ephemeris-mcp:get_sky_state via MCP client
- Data Transformation: Convert astronomical output to astrological basics (zodiac signs, degrees, retrograde)
- Calculations: Zodiac signs (12 signs, 30° each), house systems, aspects, angles (ASC, MC, DSC, IC)
- Standards: Use data directly from ephemeris-mcp (no external ephemeris libraries needed)
Theme 3: Core Chart Calculation Tools (with Optional Parameters)
- Natal Chart Tool: Complete birth chart with planets in signs/houses, aspects, angles
- Optional params: house_system (default Placidus), orb_limits (standard orbs)
- Transit Chart Tool: Current positions + aspects to natal chart
- Optional params: house_system (default Placidus), orb_limits (standard orbs)
- Synastry Chart Tool: Relationship analysis (interaspects, house overlays, composite/davison charts)
- Optional params: house_system (default Placidus), orb_limits (standard orbs)
- Chart Caching: Optional resource to avoid recalculating same charts
Theme 4: Transit & Timing Analysis
- Transit Preview: Given person + time range, return significant events (exact aspects, ingresses, stations)
- Event Types: Exact aspects (orb ≤ 0°01'), planet ingresses, retrograde stations, lunar phase changes
- Structured Output: Machine-readable descriptions for downstream interpretation
- Optional Parameters: house_system, orb_limits, event_types (filter which event types to include)
Theme 5: Person Management
- CRUD-lite Operations: Add, get, list persons (with optional update/delete)
- Birth Data Storage: UTC datetime, latitude, longitude, elevation, nickname
- Dashboard: Lightweight web interface for manual person management
- Efficiency: Avoid repeating birth data on every request
Theme 6: Configuration & Extensibility
- House Systems: Support multiple systems (Placidus default, Koch, Equal House, etc.)
- Aspect Configuration: Configurable orbs for different aspect types
- Chart Types: Design for adding progressions, solar returns, etc.
- Location Defaults: Optional tool to set default lat/lon for repeated calculations from same location
Theme 7: Manifest Compliance & Quality
- Health Endpoint: Lightweight
/health for liveness checks
- Landing Page: Minimal
GET / endpoint
- SSE Transport: Mount FastMCP at
/mcp with SSE at /mcp/sse
- Security: Use
TransportSecuritySettings(enable_dns_rebinding_protection=False)
- Logging/PID: Store under
./logs/ directory
- Testing: Comprehensive test suite via
tests.sh
Action Plan
Phase 1: Project Setup & Foundation
- Initialize project structure per MCP Server Manifest
- Create
.gitignore, requirements.txt, README.md, PROJECT.md
- Set up
src/astro_mcp/ directory with server.py
- Implement basic FastAPI app with health and landing endpoints
- Create dashboard template directory and basic Jinja2 template
- Create
run.sh, killserver.sh, restart.sh scripts
- Initialize git repository and make initial commit
Phase 2: Data Layer & Person Management
- Design SQLite schema for persons table
- Implement person_manage tool (add_person, get_person, list_persons)
- Create database initialization/connection handling
- Test person CRUD operations
- Create dashboard routes and templates for person management
- Document API for person management
Phase 3: Astronomical Data Integration
- Implement MCP client to call
ephemeris-mcp:get_sky_state
- Create
get_planetary_positions tool wrapper
- Add zodiac sign calculation (0-360° → sign + degree)
- Add retrograde flag detection from speed_lon
- Test with sample ephemeris-mcp output
- Verify structured output format
- Add optional
bodies parameter to filter planets
Phase 4: Core Chart Calculations
- Implement house system calculations (start with Placidus)
- Calculate planetary house placements
- Implement aspect detection (conjunction, sextile, square, trine, opposition)
- Calculate orbs and applying/separating
- Calculate angles (ASC, MC, DSC, IC) from lat/lon and sidereal time
- Assemble complete natal chart structure
- Add optional house_system parameter (default Placidus)
- Add optional orb_limits parameter (standard defaults)
- Test calculate_natal_chart tool with sample data
Phase 5: Transit & Relationship Charts
- Implement calculate_transit_chart tool
- Implement calculate_synastry_chart tool
- Add optional parameters (house_system, orb_limits) to both
- Verify chart caching mechanism (optional)
- Test all chart tools with various inputs and parameter combinations
Phase 6: Transit Preview & Events
- Implement transit preview algorithms (ingresses, retrograde stations, lunar phases)
- Implement exact aspect detection within time ranges
- Create get_transit_preview tool
- Add optional parameters: house_system, orb_limits, event_types
- Test with sample person data and date ranges
Phase 7: Integration & Compliance
- Mount all tools as MCP tools via FastMCP
- Ensure proper SSE transport at
/mcp/sse
- Verify health endpoint is lightweight
- Test dashboard functionality and routes
- Test housekeeping scripts (run/kill/restart)
- Verify logging and PID file handling
- Run full test suite via
tests.sh
Phase 8: Documentation & Examples
- Update README.md with usage examples
- Document API for downstream services (like astro_service)
- Provide example calls for transit previews ("What transits for Lukas next month?")
- Document optional parameters for all tools
- Document dashboard usage for person management
- Document configuration options (house systems, etc.)
- Finalize PROJECT.md with technical specifications
Phase 9: Optional Enhancements (Post-Core)
- Consider implementing
generate_svg_chart tool/resource for SVG chart visualization
- Evaluate SVG generation libraries (svgwrite, etc.)
- Implement SVG chart generation for natal, transit, and synastry charts
- Add SVG chart as optional MCP resource or tool
- Test SVG output with various chart types
Immediate Next Steps
- Create project structure and initialize git repo
- Implement basic server with health endpoint and dashboard routes
- Add person management SQLite layer
- Integrate with ephemeris-mcp:get_sky_state
- Build get_planetary_positions tool with optional bodies parameter
- Develop natal chart calculation with optional parameters