Celestial Position MCP Server
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.
README
Celestial Position MCP Server
An MCP (Model Context Protocol) server that provides altitude-azimuth coordinates for celestial objects using the current system time and a configured location.
Features
- Get altitude and azimuth coordinates for various celestial objects
- Uses system time by default (with option to specify custom time)
- Uses configurable location settings
- Supports a wide range of celestial objects:
- Solar system objects (Sun, Moon, planets)
- Over 117,000 stars from the HYG Database
- Over 14,000 deep sky objects from the OpenNGC catalog
- Includes Messier, NGC, and IC objects
- Raw coordinates without atmospheric refraction correction
- Fast lookup with efficient database management
Installation
- Make sure you have Node.js and npm installed
- Clone this repository
- Install dependencies:
npm install
Catalog Setup
The server exclusively uses astronomical catalogs from the /data directory. The catalog loading process follows this order:
-
Use downloaded catalogs from
/datadirectory:npm run fetch-catalogsThis downloads catalog files directly to the
datadirectory:ngc.csv- OpenNGC Catalog (14,069 objects)hygdata_v41.csv- HYG Database v41 (117,949 stars)
-
Automatic download: If no catalogs are found when starting the server, it will attempt to download them automatically.
-
Fallback catalogs: If download fails, the server falls back to sample catalogs or hardcoded data.
Configuration
Before using the server, update your location in src/config.ts:
export const OBSERVER_CONFIG = {
latitude: 49.2827, // Vancouver latitude (replace with your latitude)
longitude: -123.1207, // Vancouver longitude (replace with your longitude)
altitude: 30, // Elevation in meters
temperature: 15, // Default temperature in Celsius
pressure: 1013.25 // Default pressure in hPa
};
export const SERVER_CONFIG = {
port: 3005, // The server port
host: 'localhost'
};
Usage
-
Build the project:
npm run build -
Start the server:
npm start -
The server will start at http://localhost:3005/mcp
-
Use the included test page at test.html to try out the APIs
Testing
Open test.html in your browser to access a simple interface for testing the server's functionality. You can:
- Look up the position of any celestial object
- List available objects by category
- Test with custom date/time settings
Available Tools
getCelestialPosition
Gets altitude and azimuth coordinates for a celestial object.
Parameters:
objectName(required): Name of the celestial object (e.g., "Jupiter", "Sirius", "M31")useSystemTime(optional, default: true): Whether to use the current system timedateTime(optional): Custom observation time in ISO format (only used if useSystemTime is false)- Use format like "2025-04-15T21:30:00Z" for UTC time
- Use format like "2025-04-15T21:30:00" for local time (system timezone)
listCelestialObjects
Lists available celestial objects by category.
Parameters:
category(optional, default: "all"): Filter by category ("planets", "stars", "dso", "all")
Using with Claude
Manual Connection
- Start the server using
npm startornpm run dev - Enable developer mode in Claude Desktop
- Add your MCP server: http://localhost:3005/mcp
- Ask Claude to get celestial positions
Auto-Start Configuration
To have Claude automatically start the celestial position server:
-
Build the project first:
npm run build -
Add the following to your Claude MCP configuration:
mcp_config = { "mcpServers": { // Your other servers here... "celestial-position": { "command": "node", "args": [ "C:\\Users\\ryu\\mcp_local\\celestialPosition\\dist\\index.js" ] } } } -
Adjust the path in the
argsarray to match the actual location of your project
Now you can ask Claude questions like:
- "Where is Jupiter in the sky right now?"
- "What's the position of Sirius?"
- "Can I see M31 from my location tonight?"
Adding to Existing MCP Configuration
If you already have an MCP configuration with other servers, simply add the celestial-position entry to your existing configuration:
mcp_config = {
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\\Users\\ryu\\Downloads",
"C:\\Users\\ryu\\Desktop",
"C:\\Users\\ryu\\mcp_local"
]
},
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY"
}
},
// Add the celestial-position server here:
"celestial-position": {
"command": "node",
"args": [
"C:\\Users\\ryu\\mcp_local\\celestialPosition\\dist\\index.js"
]
}
}
}
This will allow Claude to start multiple MCP servers, including your celestial position server.
Development
To run in development mode with automatic reloading:
npm run dev
Project Structure
src/index.ts- Entry pointsrc/server.ts- MCP server implementationsrc/config.ts- Location and server configurationsrc/fetch-catalogs.ts- Script to download catalog filessrc/utils/astronomy.ts- Star and DSO catalog handling and coordinate calculationssrc/tools/- Tool implementations (getCelestialPosition, listCelestialObjects)data/- Astronomical catalog files
Resources
- MCP Framework: https://github.com/QuantGeekDev/mcp-framework
- Astronomy Engine: https://github.com/cosinekitty/astronomy
- HYG Database v41: https://github.com/astronexus/HYG-Database/tree/master/hyg/CURRENT
- OpenNGC Catalog: https://github.com/mattiaverga/OpenNGC/tree/master/database_files
License
ISC
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。