aqc-mcp

aqc-mcp

MCP server that provides tools to query 17+ astronomical databases (e.g., SIMBAD, VizieR, Gaia) via HTTP/TAP APIs, enabling AI applications to access astronomical data through natural language.

Category
Visit Server

README

Astroquery MCP Server šŸš€

A Model Context Protocol (MCP) server for astroquery-cli, providing HTTP and SSE (Server-Sent Events) transport options.


Overview ✨

The aqc-mcp server provides direct HTTP/TAP API access to 17+ astronomical databases as MCP tools, allowing AI applications and other services to query astronomical data through standardized MCP protocols. Supports both HTTP and SSE transports.


Features 🌟

  • ⚔ MCP Protocol: Full implementation of MCP specification
  • 🌐 Multiple Transports:
    • HTTP (default)
    • SSE (Server-Sent Events)
    • Stdio (for Claude Desktop)
  • šŸ”Œ 17 Databases: Direct TAP/REST API access to major astronomical archives
  • šŸŒ Language Support: Multi-language output (English, Chinese)
  • šŸ“Š Rich Output: Formatted tables and structured results
  • šŸ”‘ ADS API Token Support: Environment variable injection for authenticated queries
  • ⚔ No Python Required: Pure Node.js/TypeScript implementation

Supported Modules 🧩

Currently implemented tools (17 astronomical databases):

General Astronomy

  • SIMBAD: Query SIMBAD astronomical database
  • VizieR: Query VizieR catalog database
  • NED: NASA/IPAC Extragalactic Database
  • ADS: NASA Astrophysics Data System queries (requires API token)

Radio & Millimeter

  • ALMA: Query ALMA observations archive
  • ESO: European Southern Observatory science archive

High Energy & X-ray

  • Fermi LAT: Fermi Large Area Telescope gamma-ray source catalog
  • HEASARC: High Energy Astrophysics Science Archive (multiple missions)

Infrared & Submillimeter

  • IRSA: NASA/IPAC Infrared Science Archive

Space Observatories

  • MAST: Barbara A. Mikulski Archive for Space Telescopes
  • ESASky: Multi-mission all-sky archive

Solar System

  • JPL Horizons: Solar system body ephemerides and state vectors
  • JPL SBDB: Small-Body Database for asteroids and comets

Exoplanets & Stars

  • Exoplanet: NASA Exoplanet Archive
  • AAVSO: Variable Star Index (VSX catalog)
  • NIST: Atomic Spectra Database for spectral lines

Optical Surveys

  • Gaia: Gaia DR3 catalog cone search and ADQL queries
  • SDSS: Sloan Digital Sky Survey (DR18)
  • Splatalogue: Spectral line database

Total: 17 databases, 30+ tools


Installation šŸ› ļø

Quick Start

Prerequisites:

  • Node.js ≄ 18.0.0

No Python dependency required - aqc-mcp uses direct HTTP/TAP APIs to astronomical services.

MCP Server Configuration

Add to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "aqc-mcp": {
      "command": "npx",
      "args": ["-y", "aqc-mcp"],
      "env": {
        "ADS_API_KEY": "your-ads-api-token-here"
      }
    }
  }
}

Without ADS token:

{
  "mcpServers": {
    "aqc-mcp": {
      "command": "npx",
      "args": ["-y", "aqc-mcp"]
    }
  }
}

Alternative: Global Install

npm install -g aqc-mcp

Then use in config:

{
  "mcpServers": {
    "aqc-mcp": {
      "command": "aqc-mcp"
    }
  }
}

Usage šŸš€

1. Start Server

HTTP Mode (default)

npm start
# or
npm run dev

Server will start on http://localhost:3000

With ADS API Token

ADS_API_KEY="your-token" npm start

Custom Port

PORT=8080 npm start

SSE Mode

MCP_TRANSPORT=http npm start

Stdio Mode (for Claude Desktop)

MCP_TRANSPORT=stdio npm run dev

2. API Endpoints

Health Check

curl http://localhost:3000/health

Server Info

curl http://localhost:3000/

SSE Connection

curl http://localhost:3000/sse

MCP Tools šŸ”§

simbad_query

Query SIMBAD astronomical database.

Parameters:

  • object_name (string, required): Object name (e.g., "M31", "NGC 1234")
  • lang (string, optional): Output language ("en", "zh", "ja")

Example:

{
  "name": "simbad_query",
  "arguments": {
    "object_name": "M31",
    "lang": "en"
  }
}

vizier_query

Query VizieR catalog database.

Parameters:

  • target (string, required): Target name or coordinates
  • radius (string, required): Search radius (e.g., "10arcsec", "0.5deg")
  • catalog (string, optional): Specific catalog name
  • lang (string, optional): Output language

Example:

{
  "name": "vizier_query",
  "arguments": {
    "target": "M31",
    "radius": "10arcsec",
    "catalog": "I/345/gaia2"
  }
}

alma_query

Query ALMA observations archive.

Parameters:

  • object_name (string, required): Object name
  • lang (string, optional): Output language

Example:

{
  "name": "alma_query",
  "arguments": {
    "object_name": "Orion KL"
  }
}

ads_query

Query NASA Astrophysics Data System.

Parameters:

  • query (string, optional): Search query string
  • latest (boolean, optional): Get latest papers
  • review (boolean, optional): Get review articles only
  • lang (string, optional): Output language

Requirements:

  • Set ADS_API_KEY environment variable before starting the server

Example:

{
  "name": "ads_query",
  "arguments": {
    "latest": true,
    "lang": "en"
  }
}

gaia_cone_search

Query Gaia archive via cone search.

Parameters:

  • target (string, required): Target name or coordinates
  • radius (string, optional): Search radius (default: "10arcsec")
  • lang (string, optional): Output language

Example:

{
  "name": "gaia_cone_search",
  "arguments": {
    "target": "M31",
    "radius": "1arcmin"
  }
}

HTTP API Examples šŸ“”

Call a Single Tool

curl -X POST http://localhost:3000/tools/call \
  -H "Content-Type: application/json" \
  -d '{
    "name": "simbad_query",
    "arguments": {
      "object_name": "M31"
    }
  }'

Batch Call Multiple Tools

curl -X POST http://localhost:3000/tools/batch \
  -H "Content-Type: application/json" \
  -d '{
    "tools": [
      {
        "name": "simbad_query",
        "arguments": {"object_name": "M31"}
      },
      {
        "name": "gaia_cone_search",
        "arguments": {"target": "M31", "radius": "10arcsec"}
      }
    ]
  }'

Claude Desktop Integration šŸ–„ļø

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "astroquery": {
      "command": "node",
      "args": ["/path/to/astroquery-cli/astroquery-mcp/dist/index.js"],
      "env": {
        "MCP_TRANSPORT": "stdio",
        "ADS_API_KEY": "your-ads-api-token-here"
      }
    }
  }
}

Development šŸ”Ø

Watch Mode

npm run watch

Project Structure

aqc-mcp/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts           # Main server entry
│   ā”œā”€ā”€ tools/             # MCP tool definitions (17 databases)
│   │   ā”œā”€ā”€ index.ts       # Tool registration
│   │   ā”œā”€ā”€ simbad.ts      # SIMBAD queries
│   │   ā”œā”€ā”€ vizier.ts      # VizieR catalog queries
│   │   ā”œā”€ā”€ alma.ts        # ALMA archive queries
│   │   ā”œā”€ā”€ ads.ts         # ADS bibliographic queries
│   │   ā”œā”€ā”€ gaia.ts        # Gaia DR3 queries
│   │   ā”œā”€ā”€ aavso.ts       # AAVSO VSX variable stars
│   │   ā”œā”€ā”€ fermi.ts       # Fermi LAT gamma-ray sources
│   │   ā”œā”€ā”€ heasarc.ts     # HEASARC queries
│   │   ā”œā”€ā”€ esasky.ts      # ESASky multi-mission archive
│   │   ā”œā”€ā”€ eso.ts         # ESO science archive
│   │   ā”œā”€ā”€ exoplanet.ts   # NASA Exoplanet Archive
│   │   ā”œā”€ā”€ irsa.ts        # IRSA infrared archive
│   │   ā”œā”€ā”€ jpl.ts         # JPL Horizons & SBDB
│   │   ā”œā”€ā”€ mast.ts        # MAST space telescopes
│   │   ā”œā”€ā”€ ned.ts         # NED extragalactic DB
│   │   ā”œā”€ā”€ nist.ts        # NIST atomic spectra
│   │   ā”œā”€ā”€ sdss.ts        # SDSS optical survey
│   │   └── splatalogue.ts # Spectral line database
│   └── utils/
│       └── http.ts        # HTTP/TAP client utilities
ā”œā”€ā”€ dist/                  # Compiled JavaScript
ā”œā”€ā”€ package.json
└── tsconfig.json

Environment Variables šŸ”§

Variable Description Default Required
MCP_TRANSPORT Transport mode (http, stdio) stdio No
PORT HTTP server port 3000 No
ADS_API_KEY NASA ADS API token - For ADS queries

Troubleshooting šŸ”

ADS queries fail

Set the ADS_API_KEY environment variable:

export ADS_API_KEY="your-token"
npm start

Port already in use

Change the port:

PORT=8080 npm start

Query timeouts

Some astronomical databases (e.g., Fermi LAT, HEASARC) may take longer to respond. The server uses reasonable timeout values, but you can adjust them if needed by modifying the timeout parameter in the HTTP client.


License šŸ“„

BSD-3-Clause


Contributing šŸ¤

Contributions welcome! Please open an issue or PR.


Links šŸ”—

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured