A Model Context Protocol (MCP) server providing astrological chart functionality for AI assistants.
- Clone the repository
- Install dependencies:
bun install
- Start the server:
bun run start
- Generate detailed astrological charts based on date, time, and location
- Seamless integration with AI assistants via Model Context Protocol
- Powered by chart2txt for natural language chart interpretations
- Uses Photon geocoding API for location lookups
- Outputs planetary positions, house placements, and major aspects
AstroMCP/
โโโ src/
โ โโโ tools/
โ โ โโโ getChart/ # Astrological chart functionality
โ โ โโโ ... # Other tools
โ โโโ utils/ # Shared utilities
โ โโโ main.ts # Server entry point
โ โโโ types.ts # Shared type definitions
โโโ tests/ # Test files
โโโ biome.json # Linting configuration
โโโ tsconfig.json # TypeScript configuration
โโโ package.json # Project dependencies
The get_chart tool accepts three parameters:
date: Date in YYYY-MM-DD formattime: Time in 24-hour format (HH:MM:SS)location: Location in "city, country" format
Example response:
Astrology Chart (location: New York, USA, at: 1/1/2001, 1:01:00 AM):
Ascendant is at 21ยฐ Libra. Sun is at 10ยฐ Capricorn. Moon is at 21ยฐ Pisces. Mercury is at 14ยฐ Capricorn. Venus is at 27ยฐ Aquarius. Mars is at 5ยฐ Scorpio. Jupiter is at 2ยฐ Gemini. Saturn is at 24ยฐ Taurus. Uranus is at 18ยฐ Aquarius. Neptune is at 5ยฐ Aquarius. Pluto is at 13ยฐ Sagittarius.
Sun is in house 4. Moon is in house 6. Mercury is in house 4. Venus is in house 5. Mars is in house 2. Jupiter is in house 9. Saturn is in house 8. Uranus is in house 5. Neptune is in house 5. Pluto is in house 3.
Sun is in conjunction with Mercury (orb: 3.8ยฐ). Moon is in sextile with Saturn (orb: 2.8ยฐ). Venus is in square with Jupiter (orb: 4.9ยฐ). Venus is in square with Saturn (orb: 2.7ยฐ). Mars is in square with Neptune (orb: 0.3ยฐ). Jupiter is in trine with Neptune (orb: 3.2ยฐ).
The server uses the following API endpoints:
- Photon API (photon.komoot.io) for geocoding locations
- Simple Astro API for planetary calculations (currently using hosted version)
The project includes a script to help create new MCP tools:
bun run scripts/create-tool.ts <tool-name>- Run tests:
bun test - Format code:
bun run format - Lint code:
bun run lint - Build project:
bun run build
To add your AstroMCP server to Claude Desktop:
- Build the project:
bun run build
- Add to your Claude Desktop config:
{ "mcpServers": { "astrology-mcp-server": { "command": "/path/to/node", "args": ["/path/to/AstroMCP/dist/main.js"] } } }
- Ensure you're logged in to npm:
npm login
- Build the project:
bun run build
- Publish the package:
npm publish
Add to your Claude Desktop config:
{
"mcpServers": {
"astro-server": {
"command": "npx",
"args": ["-y", "astrology-mcp-server"]
}
}
}