A Model Context Protocol (MCP) server for astroquery-cli, providing HTTP and SSE (Server-Sent Events) transport options.
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.
- β‘ 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
Currently implemented tools (17 astronomical databases):
- SIMBAD: Query SIMBAD astronomical database
- VizieR: Query VizieR catalog database
- NED: NASA/IPAC Extragalactic Database
- ADS: NASA Astrophysics Data System queries (requires API token)
- ALMA: Query ALMA observations archive
- ESO: European Southern Observatory science archive
- Fermi LAT: Fermi Large Area Telescope gamma-ray source catalog
- HEASARC: High Energy Astrophysics Science Archive (multiple missions)
- IRSA: NASA/IPAC Infrared Science Archive
- MAST: Barbara A. Mikulski Archive for Space Telescopes
- ESASky: Multi-mission all-sky archive
- JPL Horizons: Solar system body ephemerides and state vectors
- JPL SBDB: Small-Body Database for asteroids and comets
- Exoplanet: NASA Exoplanet Archive
- AAVSO: Variable Star Index (VSX catalog)
- NIST: Atomic Spectra Database for spectral lines
- Gaia: Gaia DR3 catalog cone search and ADQL queries
- SDSS: Sloan Digital Sky Survey (DR18)
- Splatalogue: Spectral line database
Prerequisites:
- Node.js β₯ 18.0.0
No Python dependency required - aqc-mcp uses direct HTTP/TAP APIs to astronomical services.
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"]
}
}
}Get ADS token: https://ui.adsabs.harvard.edu/user/settings/token
npm install -g aqc-mcpThen use in config:
{
"mcpServers": {
"aqc-mcp": {
"command": "aqc-mcp"
}
}
}npm start
# or
npm run devServer will start on http://localhost:3000
ADS_API_KEY="your-token" npm startPORT=8080 npm startMCP_TRANSPORT=http npm startMCP_TRANSPORT=stdio npm run devcurl http://localhost:3000/healthcurl http://localhost:3000/curl http://localhost:3000/sseQuery 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"
}
}Query VizieR catalog database.
Parameters:
target(string, required): Target name or coordinatesradius(string, required): Search radius (e.g., "10arcsec", "0.5deg")catalog(string, optional): Specific catalog namelang(string, optional): Output language
Example:
{
"name": "vizier_query",
"arguments": {
"target": "M31",
"radius": "10arcsec",
"catalog": "I/345/gaia2"
}
}Query ALMA observations archive.
Parameters:
object_name(string, required): Object namelang(string, optional): Output language
Example:
{
"name": "alma_query",
"arguments": {
"object_name": "Orion KL"
}
}Query NASA Astrophysics Data System.
Parameters:
query(string, optional): Search query stringlatest(boolean, optional): Get latest papersreview(boolean, optional): Get review articles onlylang(string, optional): Output language
Requirements:
- Set
ADS_API_KEYenvironment variable before starting the server
Example:
{
"name": "ads_query",
"arguments": {
"latest": true,
"lang": "en"
}
}Query Gaia archive via cone search.
Parameters:
target(string, required): Target name or coordinatesradius(string, optional): Search radius (default: "10arcsec")lang(string, optional): Output language
Example:
{
"name": "gaia_cone_search",
"arguments": {
"target": "M31",
"radius": "1arcmin"
}
}curl -X POST http://localhost:3000/tools/call \
-H "Content-Type: application/json" \
-d '{
"name": "simbad_query",
"arguments": {
"object_name": "M31"
}
}'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"}
}
]
}'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"
}
}
}
}npm run watchaqc-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
| 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 |
Set the ADS_API_KEY environment variable:
export ADS_API_KEY="your-token"
npm startChange the port:
PORT=8080 npm startSome 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.
BSD-3-Clause
Contributions welcome! Please open an issue or PR.