CelestialMCP
Provides altitude-azimuth coordinates for celestial objects including planets, over 117,000 stars, and 14,000 deep sky objects based on system time and configurable location.
Provides altitude-azimuth coordinates for celestial objects including planets, over 117,000 stars, and 14,000 deep sky objects based on system time and configurable location.
A Model Context Protocol (MCP) server for Claude AI that provides tools for calculating celestial object positions, rise/set times, and other astronomical data.
CelestialMCP is built with the mcp-framework and leverages the astronomy-engine library to provide accurate astronomical calculations. It offers several tools for determining positions of celestial objects, calculating their rise and set times, and listing available objects from star and deep sky object catalogs.
The package contains three main tools:
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm start
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%/Claude/claude_desktop_config.json
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"CelestialMCP": {
"command": "node",
"args":["/absolute/path/to/CelestialMCP/dist/index.js"]
}
}
}
This project includes a script to fetch astronomy catalog data:
# Fetch star and deep sky object catalogs
npm run fetch-catalogs
This will download the HYG star database and NGC deep sky object catalog to the data/
directory.
Here are some examples of using the tools with Claude:
Ask Claude: "What is the current position of Jupiter in the sky from Vancouver?"
Ask Claude: "When does the Moon rise and set today in Vancouver?"
Ask Claude: "Show me a list of stars I can look up."
CelestialMCP/
├── src/
│ ├── tools/ # MCP Tools
│ │ ├── CelestialPositionTool.ts
│ │ ├── CelestialDetailsTool.ts
│ │ └── ListCelestialObjectsTool.ts
│ ├── utils/
│ │ └── astronomy.ts # Core astronomy calculations
│ ├── config.ts # Observer configuration
│ └── index.ts # Server entry point
├── scripts/
│ └── fetch-catalogs.js # Script to download star catalogs
├── data/ # Catalog data files
│ ├── hygdata_v41.csv # HYG star database
│ └── ngc.csv # New General Catalogue
├── package.json
└── tsconfig.json
By default, the observer's location is set to Vancouver, Canada. You can change this in src/config.ts
:
export const OBSERVER_CONFIG = {
latitude: 49.2827, // Observer latitude
longitude: -123.1207, // Observer longitude
altitude: 30, // Observer altitude in meters
temperature: 15, // Default temperature in Celsius
pressure: 1013.25 // Default pressure in hPa
};
MIT