Skip to content

A Model Context Protocol Server for Astrophysical RAG: Unified Access to HI, Dwarf, Globular Cluster, IntZ, and ALPINE Kinematic Corpora with FAISS Semantic Search

Source: arXiv:2607.03946 · Published 2026-07-04 · By David C. Flynn

TL;DR

This paper presents the EPS Research Astro-RAG MCP Server v2.3.0, a unified data access platform enabling deterministic and semantic retrieval across five astrophysical kinematic corpora spanning redshift z = 0 to 5.68, covering local galaxies, dwarf systems, Milky Way globular clusters, intermediate redshift kinematics, and high-z ALPINE survey data. The key innovation is the integration of a Model Context Protocol (MCP) server compliant with Anthropic's open LLM-native API standard, exposing retrieval through a REST API, browser UI, and MCP endpoint. Version 2.3.0 adds FAISS-accelerated natural-language semantic search over pre-built MiniLM-L6-v2 embeddings, enabling cross-corpus similarity queries without requiring entity-specific query syntax or API keys.

The server consolidates 2,064 objects into a unified JSON schema with consistent field naming and embedded survey provenance, allowing natural-language filters and semantic discovery queries across heterogeneous data sources, which historically have required custom tooling and non-uniform query methods. Experiments show sub-100 ms latency on numeric filters and semantic searches return physically coherent astrophysical objects in top results. The platform is fully reproducible from Zenodo datasets and open-source on GitHub, with a deployed live endpoint on HuggingFace Spaces. To the authors’ knowledge, this is the first MCP-compliant astrophysical data server providing cross-epoch kinematic access with semantic search capability.

Key findings

  • Unified MCP server provides access to 5 astrophysical corpora totaling 2,064 objects spanning redshift 0 to 5.68.
  • FAISS semantic search uses 384-dimensional MiniLM-L6-v2 embeddings to perform natural-language queries corpus-wide without fine-tuning or API keys.
  • Semantic search returns top-3 objects per corpus that align with astrophysical expectations, e.g., 'dwarf irregular low mass' query in v7 returns CVnIdwA, DDO 210, IC 1613.
  • Numeric filters on fields such as distance (Mpc) and redshift complete in under 100 ms, returning subsets like 119 of 438 v7 galaxies between 1 and 10 Mpc.
  • Cold-start latency on HuggingFace Spaces free tier is 30–90 seconds due to model and index loading; subsequent queries have sub-millisecond latency.
  • Semantic search is most reliable for discovery and reconnaissance rather than precise physical parameter matching due to embedding space using natural-language distance.
  • The server exposes 7 typed MCP tools, enabling LLM-native invocation without prior schema knowledge, e.g., filtering by rotation velocity or finding similar galaxies.
  • All data, search indexes, and code are publicly released with citable Zenodo DOIs, supporting fully reproducible research.

Threat model

n/a — The paper is focused on making heterogeneous astrophysical data programmatically accessible via LLM-native interfaces rather than security or adversarial defense.

Methodology — deep read

The core methodology centers on building an MCP (Model Context Protocol) compliant server to unify heterogeneous astrophysical datasets for LLM-native access.

  1. Threat Model & Assumptions: The paper does not address adversarial threats; the focus is on data accessibility for scientific use. The adversary model is n/a.

  2. Data: The server unifies five curated astrophysical kinematic corpora: Unified HI Rotation Curve (438 galaxies), Dwarf/Irregular HI (129 galaxies), Milky Way Globular Clusters (174 clusters), IntZ Kinematic Corpus (1,292 galaxies at z ~0.4–2.7), and High-z ALPINE Kinematic Corpus (31 galaxies at z = 4.26–5.68). The data are represented in a common JSON schema with native typed fields and embedded survey provenance, allowing cross-epoch queries.

  3. Architecture / Algorithm: The server is implemented in Python using the FastMCP framework, exposing three concurrent interfaces: an MCP endpoint compliant with Anthropic's 2024 MCP spec (with Server-Sent Events and Streamable HTTP), a FastAPI-backed REST API, and a single-page browser UI. Data is loaded from JSONL files and cached in process.

Semantic search is built on pre-computed FAISS indexes using faiss.IndexFlatL2 for exact nearest neighbor search on 384-dim dense embeddings generated offline by a MiniLM-L6-v2 model trained on sentence-transformers. Embeddings are created from curated summary strings constructed from astrophysically meaningful metadata fields for each object, focusing the vector representation on discovery-relevant information.

The MCP toolset exposes 7 typed tools (list corpora, list objects, get object, search metadata, filter objects, get corpus schema, semantic search), enabling LLMs to select tools based on natural-language queries without explicit schema knowledge.

  1. Training Regime: The embedding model MiniLM-L6-v2 is pre-trained externally; no fine-tuning was performed on the astrophysics data. Index construction is offline. Server runtime executes embedding of queries on CPU (~10–50 ms), followed by FAISS search.

  2. Evaluation Protocol: The authors validate semantic search by providing representative natural language queries and showing their top-3 semantic search hits align with expected astrophysical object classes and properties across all corpora (Table 3). Quantitative latency benchmarks show sub-100 ms query times for filters and search. Qualitative examples illustrate cross-epoch and cross-corpus retrieval use cases.

  3. Reproducibility: All data corpora and FAISS indexes have public Zenodo DOIs; the server code is open-source on GitHub. The server can be run locally or accessed via a public HuggingFace Spaces deployment. The entire platform is versioned to support reproducibility.

Technical innovations

  • First MCP-compliant astrophysical data server providing unified cross-epoch kinematic corpus access spanning z=0 to 5.68.
  • Integration of FAISS semantic search using 384-dimensional MiniLM-L6-v2 embeddings into an MCP server for natural-language similarity queries without fine-tuning or API keys.
  • Unified JSON schema with embedded provenance allowing deterministic retrieval, metadata filtering, and semantic similarity exploration across heterogeneous astrophysical surveys.
  • Exposing a typed MCP toolset that allows LLM-native invocation to select retrieval, filter, and semantic search tools without schema knowledge.

Datasets

  • Unified HI Rotation Curve Corpus v7.0 — 438 galaxies — Zenodo DOI: 10.5281/zenodo.19563417
  • Dwarf/Irregular HI Corpus v1.0 — 129 galaxies — Zenodo DOI: 10.5281/zenodo.20320362
  • Milky Way Globular Cluster Corpus v1.3.2 — 174 clusters — Zenodo DOI: 10.5281/zenodo.19907766
  • IntZ Kinematic Corpus v1b — 1,292 galaxies (z≈0.4–2.7) — Zenodo DOI: 10.5281/zenodo.20453189
  • High-z ALPINE Kinematic Corpus Z1 — 31 galaxies (z=4.26–5.68) — Zenodo DOI: 10.5281/zenodo.20369286
  • FAISS Semantic Search Indexes v1.0 — 5 indexes covering all above corpora — Zenodo DOI: 10.5281/zenodo.21147895

Baselines vs proposed

  • Comparison to astroquery: Astro-RAG MCP server provides semantic search and unified corpus access complementary to astroquery’s database-targeted API calls.
  • Semantic search query latency: Embedding step ∼10–50 ms on CPU plus negligible FAISS search overhead vs filter objects queries completing <100 ms.
  • Semantic search top results validate physical coherence across queries and corpora, e.g., 'metal poor outer halo cluster' returns ESO-SC06, 2MS-GC02a, ESO 93-8.

Limitations

  • FAISS L2 distance on MiniLM embeddings captures semantic natural-language similarity but does not encode physical parameter proximity; numeric similarity queries should use filters.
  • intz corpus contains some records with missing identifiers.name fields, leading to numeric index IDs in semantic search outputs; to be fixed in future versions.
  • Cold-start latency on public HuggingFace Spaces deployment is 30–90 seconds due to model and index loading, although mitigated by keepalive pings.
  • Semantic search relies on summary string embeddings, which may omit detailed or numerical astrophysical nuances.
  • There is no adversarial robustness evaluation or distribution shift testing beyond the included five corpora.

Open questions / follow-ons

  • Can semantic search be extended to encode physical parameter distances or hybrid numeric-semantic embeddings for astrophysical queries?
  • How well does the MCP server generalize to future or larger astrophysical surveys beyond the current five corpora?
  • Could fine-tuning or domain adaptation of the embedding model improve semantic search precision on astrophysical metadata?
  • Can the server support near real-time updates or federated queries combining MCP with live astronomical archives?

Why it matters for bot defense

For bot-defense engineers and CAPTCHA practitioners, this paper illustrates how unified data access through LLM-native APIs with semantic search can transform domain-specific data retrieval complexity into straightforward natural-language queries. While the astrophysical domain is distinct, the principles of exposing typed toolsets via MCP, caching corpora in-memory for low latency, and deploying FAISS vector similarity search could inform strategies for enabling robust, user-friendly backend data systems supporting LLM-based threat intelligence or anomaly detection. The semantic search approach demonstrates the tradeoff between discovery power and strict parameter matching, highlighting the need to combine semantic and numeric filtering in high-assurance retrieval contexts.

Additionally, the MCP paradigm as a standardized LLM tooling interface might inspire more modular and deterministic AI assistance architectures in security applications, where minimal bespoke integration and consistent schema usage are critical. The emphasis on open reproducibility and composable query tools is another positive pattern for security engineering teams working with layered, multi-source data streams.

Cite

bibtex
@article{arxiv2607_03946,
  title={ A Model Context Protocol Server for Astrophysical RAG: Unified Access to HI, Dwarf, Globular Cluster, IntZ, and ALPINE Kinematic Corpora with FAISS Semantic Search },
  author={ David C. Flynn },
  journal={arXiv preprint arXiv:2607.03946},
  year={ 2026 },
  url={https://arxiv.org/abs/2607.03946}
}

Read the full paper

Articles are CC BY 4.0 — feel free to quote with attribution