ads_mcp.server — MCP Server¶
FastMCP server exposing SAO/NASA Astrophysics Data System (ADS) tools.
This module defines the mcp FastMCP application and registers every
ADS tool as an MCP tool handler. Each tool is a thin wrapper around
ADSClient.
The server is configured via environment variables (see
Configuration Reference). The most important is ADS_API_TOKEN, which must
be set to a valid ADS API token.
Running the server¶
Start the server directly:
python -m ads_mcp.server
or via the installed script:
ads-mcp
Both use stdio transport by default (suitable for MCP hosts such as Claude Desktop, Cursor, or VS Code Copilot).
Available tools¶
Tool name |
Description |
|---|---|
Full-text / keyword / author search |
|
Full metadata + abstract for a bibcode |
|
Reference list of a paper |
|
Papers that cite a given paper |
|
BibTeX export for one or more bibcodes |
|
RIS export for one or more bibcodes |
|
Export in any supported ADS format |
|
Look up a paper by arXiv identifier |
|
Look up a paper by DOI |
|
Citation & usage metrics |
|
Papers similar to a given bibcode |
|
Search papers by author name |
|
Retrieve a specific set of fields for a paper |
- async ads_mcp.server.search_ads(query, rows=10, start=0, sort='date desc', fields='')[source]¶
Search the ADS bibliographic database.
Performs a full Solr/ADS query and returns formatted results. The query syntax follows the ADS search syntax, supporting field operators such as
author:,title:,abstract:,year:,property:refereed, etc.- Parameters:
query (
str) –ADS/Solr query string. Examples:
"dark matter annihilation""author:Einstein AND title:relativity""abs:exoplanet AND year:2020-2024""bibcode:2023ApJ...946...29W"
rows (
int) – Number of results to return (1–2000). Defaults to10.start (
int) – Zero-based offset for pagination. Defaults to0.sort (
str) – Sort order, e.g."citation_count desc","date asc". Defaults to"date desc".fields (
str) – Comma-separated list of ADS fields to return. If empty, a sensible default set is used.
- Return type:
- Returns:
Human-readable summary of matching papers including title, authors, year, bibcode, publication venue, DOI, citation count, and an abstract snippet.
- async ads_mcp.server.get_abstract(bibcode)[source]¶
Retrieve full metadata and abstract for an ADS paper.
- async ads_mcp.server.get_references(bibcode, rows=50)[source]¶
Retrieve the reference list of an ADS paper.
- async ads_mcp.server.get_citations(bibcode, rows=50)[source]¶
Retrieve papers that cite a given ADS paper.
- async ads_mcp.server.export_bibtex(bibcodes)[source]¶
Export one or more ADS papers as a BibTeX bibliography.
- async ads_mcp.server.export_ris(bibcodes)[source]¶
Export one or more ADS papers in RIS (EndNote/Mendeley) format.
- async ads_mcp.server.export_citation(bibcodes, fmt)[source]¶
Export ADS papers in a specified bibliographic format.
- Parameters:
- Return type:
- Returns:
Formatted bibliography string in the requested format.
- async ads_mcp.server.find_arxiv(arxiv_id)[source]¶
Look up an ADS paper by its arXiv identifier.
Accepts both the short form (e.g.
2301.07688) and the full form with category prefix (e.g.astro-ph/0612138).
- async ads_mcp.server.get_metrics(bibcodes)[source]¶
Retrieve citation and usage metrics for one or more ADS papers.
Returns basic publication stats, citation counts, and bibliometric indicators (h-index, g-index, etc.).
- async ads_mcp.server.get_similar(bibcode, rows=10)[source]¶
Find papers similar to a given ADS paper.
Uses ADS’s
similar()operator which performs more-like-this matching based on the paper’s text.
- async ads_mcp.server.author_search(author, rows=20, sort='citation_count desc', refereed_only=False)[source]¶
Search for papers by a specific author.
The author name is matched using ADS’s
author:field operator which handles last-name-first and initials variations.- Parameters:
author (
str) – Author name, e.g."Einstein, A"or"van der Hulst, J.M.".rows (
int) – Maximum number of results. Defaults to20.sort (
str) – Sort order. Defaults to"citation_count desc"to show the author’s most-cited papers first.refereed_only (
bool) – IfTrue, restrict results to refereed journals. Defaults toFalse.
- Return type:
- Returns:
Formatted list of papers matching the author query.
- async ads_mcp.server.get_paper_details(bibcode, fields='')[source]¶
Retrieve detailed metadata fields for an ADS paper.
Returns a JSON-like representation of all available metadata for the requested paper, useful when specific fields beyond the default set are needed.
- Parameters:
- Return type:
- Returns:
Human-readable key-value summary of all requested metadata fields.