Celestial Position MCP Server

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.

Category
访问服务器

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

  1. Make sure you have Node.js and npm installed
  2. Clone this repository
  3. Install dependencies:
    npm install
    

Catalog Setup

The server exclusively uses astronomical catalogs from the /data directory. The catalog loading process follows this order:

  1. Use downloaded catalogs from /data directory:

    npm run fetch-catalogs
    

    This downloads catalog files directly to the data directory:

    • ngc.csv - OpenNGC Catalog (14,069 objects)
    • hygdata_v41.csv - HYG Database v41 (117,949 stars)
  2. Automatic download: If no catalogs are found when starting the server, it will attempt to download them automatically.

  3. 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

  1. Build the project:

    npm run build
    
  2. Start the server:

    npm start
    
  3. The server will start at http://localhost:3005/mcp

  4. 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 time
  • dateTime (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

  1. Start the server using npm start or npm run dev
  2. Enable developer mode in Claude Desktop
  3. Add your MCP server: http://localhost:3005/mcp
  4. Ask Claude to get celestial positions

Auto-Start Configuration

To have Claude automatically start the celestial position server:

  1. Build the project first:

    npm run build
    
  2. 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"
          ]
        }
      }
    }
    
  3. Adjust the path in the args array 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 point
  • src/server.ts - MCP server implementation
  • src/config.ts - Location and server configuration
  • src/fetch-catalogs.ts - Script to download catalog files
  • src/utils/astronomy.ts - Star and DSO catalog handling and coordinate calculations
  • src/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

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选