cern-inspire-mcp-server
Provides tools for searching and retrieving INSPIRE-HEP high-energy-physics literature, authors, experiments, and indexed HEPData measurement records. Supports fetching paper records by recid, arXiv ID, DOI, or URL; computing citation summaries and h-indices; exporting BibTeX or LaTeX citations; and decoding INSPIRE query syntax, identifiers, filters, and citation buckets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cern-inspire-mcp-serverfind recent papers on dark matter and export BibTeX for the top 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://cern-inspire.caseyjhand.com/mcp
Overview
High-energy-physics literature from INSPIRE-HEP and the HEPData tables behind it. Search papers, authors, and experiments, compute citation summaries and h-indices, export BibTeX or LaTeX, and find the record holding a paper's numerical data.
Tools
Tool | Description |
| Search papers with INSPIRE query syntax or free text, filtered by document type, subject, and year |
| Fetch one paper's full record by recid, arXiv ID, or DOI, with its HEPData availability |
| Export INSPIRE's BibTeX or LaTeX |
| Find physicist profiles by name, BAI, ORCID, INSPIRE ID, or author recid |
| h-index, citation totals, citation buckets, and citations per year for one author or any literature query |
| Find experiments, collaborations, and facilities, with a query that selects their papers |
| Find HEPData measurement records by process, observable, energy, or collaboration |
| Decode query syntax, identifier forms, filter values, citation buckets, and HEPData DOIs |
Resources
Resource | Description |
| One literature record as the |
The same record is reachable through cern_inspire_get_paper for clients that don't surface resources.
Related MCP server: cern-opendata-mcp-server
Capability reference
cern_inspire_search_literature tool
INSPIRE query syntax or free text, with
sort(relevance,mostrecent,mostcited),document_typesandsubjects(up to 4 values each, all must hold), andyear_from/year_to;size1–100 (default 10), paged bypageOnly the first 10,000 results of a query are reachable:
page × sizebeyond that fails asbeyond_result_window; a reversed year range fails asinvalid_year_rangeHits carry
recid, title, first author, date, citation counts, arXiv ID, DOI, publication, and a 300-character abstract snippet; the page also returnstotalCount,nextPage, andappliedFilters, and anoticeflags queries matching over 100,000 records
cern_inspire_get_paper tool
papertakes a recid, arXiv ID, DOI, inspirehep.net literature URL, or HEPDatains<recid>/ hepdata.netrecord/ins<recid>URL;resolvedAsnames the form that matched, and a miss fails aspaper_not_found. A merged recid returns the surviving record, withmergedFromnaming the recid asked formax_authors(default 25, capped at 500) andauthor_offset(default 0) page through authors; passnextAuthorOffsetto continue.authorCountis INSPIRE's full counthepdata.statusisavailable,none, orlookup_failed, withrecordDoi,latestVersion,tableCount, andhepdataUrlwhen available; extra HEPData records appear inhepdata.otherRecords.citingQueryandreferencesQueryfeedcern_inspire_search_literature
cern_inspire_export_citations tool
Any literature query (
recid:451647 or arxiv:1207.7214for named papers), with the samedocument_types,subjects,year_from,year_to, andsortas search; reversed years fail asinvalid_year_rangeformatisbibtex(default),latex-eu, orlatex-us;size1–50 (default 10), paged bypagewithin the first 10,000 matches (beyond that,beyond_result_window)Entries arrive verbatim from INSPIRE, each with its
texkey;truncatedandnextPagesignal more results, andappliedFiltersechoes the selection
cern_inspire_search_authors tool
A name or one identifier (BAI, ORCID, INSPIRE ID, author recid);
limit1–25 (default 5)matchedAsisorcid,inspire_id,bai, orrecid(exact match), orname(free-text search returning ranked candidates to choose from)Profiles carry
recid,bai, ORCID, positions (with aninstitutionRecidthataffid:Ntakes for the institution's papers), advisors, arXiv categories, awards, and aliteratureQueryselecting the person's papers
cern_inspire_get_citation_summary tool
Exactly one of
author(BAI, ORCID, INSPIRE ID, or author recid) orquery(any literature query, such asaffid:902725for an institution's papers); otherwisemissing_target, and a name passed asauthorfails asauthor_not_identifierNarrow with
document_types,subjects,year_from,year_to, andexclude_self_citationsReturns h-index, citation totals and averages, and paper counts in the buckets
0,1–9,10–49,50–99,100–249,250–499,500+, each for all citeable and for published paperscitationsByYearis omitted, with a notice, whenyear_from,year_to, orexclude_self_citationsis set, when INSPIRE does not return it, or for queries matching more than about 150,000 records
cern_inspire_search_experiments tool
An experiment, collaboration, accelerator, or facility name, an INSPIRE legacy name (
CERN-LHC-CMS), or an experiment recid (digits only);limit1–25 (default 5)Records carry the accelerator, host institutions, collaboration, lifecycle dates,
ongoing(omitted when INSPIRE records neither state), INSPIRE's paper count, and aliteratureQueryforcern_inspire_search_literatureorcern_inspire_get_citation_summary
cern_inspire_search_hepdata tool
Free text or INSPIRE syntax over HEPData submissions (
collaborations.value:LHCb,literature.control_number:<recid>);sortisrelevanceormostrecent;size1–50 (default 10), within the same 10,000-result windowRecords carry
paperRecids, collaborations, keywords (reactions, observables, centre-of-mass energies),recordDoi,latestVersion,tableCount, andhepdataUrl(each record's own hepdata.net page); table values are not returned
cern_inspire_list_reference tool
topic:search_syntax,identifiers,document_types,subjects,citation_buckets, orhepdataStatic
term/meaning/exampleentries; no upstream call
inspire://literature/{recid} resource
The
cern_inspire_get_paperdossier asapplication/json, with the first 25 authorsTakes a recid only; use the tool for arXiv IDs, DOIs, or further author pages. A merged recid serves the surviving record, with
mergedFrom
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
INSPIRE-specific:
Paces requests to 12 per 5 s, under INSPIRE's limit of 15, with a cooldown after a 429; a call that can't start in time fails as
pacer_shedwith aretryAfter55 s budget per tool call, including queue wait and up to 2 retries
Requests select only the fields a tool returns; author email addresses are never requested
Forgiving inputs: paper identifiers accept
arXiv:/doi:prefixes, version suffixes, and arxiv.org, doi.org, or inspirehep.net URLs; author identifiers accept an orcid.org URL
Agent-friendly output:
Chainable identifiers: hits carry
recid, author profiles and experiments carry a readyliteratureQuery, andcern_inspire_get_paperreturnscitingQueryandreferencesQueryQuery echo and paging state:
totalCount,truncated/shown/cap,nextPage,appliedFilters, andeffectiveQuery, plus anoticewith next-step text on empty, capped, or suspiciously broad resultsDiscriminated fields:
hepdata.status,resolvedAs,matchedAs, andtarget.kindlet callers branch on data; typed failure reasons (paper_not_found,author_not_found,beyond_result_window,inspire_rate_limited) each carry a recovery hintNo fabrication: a field INSPIRE leaves out stays absent and prints as "Not available" or "not recorded"
Titles and abstracts as text: publisher HTML, JATS, and MathML become plain text (
σ_γ,^{23}Na(n,γ)), with LaTeX left as published and citation export entries verbatim
Data and licensing
INSPIRE-HEP metadata is mostly CC0 under INSPIRE's terms of use; credit INSPIRE when you reuse it.
HEPData records are CC0; cite the HEPData record DOI (
recordDoi) when you reuse the data.This is an independent project, not affiliated with or endorsed by INSPIRE-HEP, HEPData, or CERN.
Known limitations
No HEPData table values. hepdata.net's bot challenge refuses the server's User-Agent, so the server never calls it.
cern_inspire_get_paperandcern_inspire_search_hepdatareturn the record DOI and the hepdata.net page where the values are read.Malformed INSPIRE syntax mostly doesn't fail. Literature search, citation summaries, and citation export reject only empty field clauses (
a:ora: not) asinvalid_query; give each field a value (a Witten). Otherwise an unparsed operator widens or empties the match; zero hits or a very largetotalCountusually means a syntax slip (cern_inspire_list_referencetopicsearch_syntax).10,000-result window. Only the first 10,000 results of a query are reachable; narrow the query to reach the rest.
Shared request queue. All callers of one server process share one queue under INSPIRE's 15 requests per 5 s per address, so a burst can delay or shed other calls with a retryable rate-limit error.
Getting started
Public Hosted Instance
A public instance is available at https://cern-inspire.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"cern-inspire-mcp-server": {
"type": "streamable-http",
"url": "https://cern-inspire.caseyjhand.com/mcp"
}
}
}Every caller of the hosted instance shares one INSPIRE request budget of 12 request starts per 5 seconds. For sustained use, run your own instance.
Self-Hosted / Local
Add the following to your MCP client configuration file. No API key is needed.
{
"mcpServers": {
"cern-inspire-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/cern-inspire-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"cern-inspire-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/cern-inspire-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"cern-inspire-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/cern-inspire-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
Nothing else: INSPIRE-HEP's API is public and keyless.
Installation
Clone the repository:
git clone https://github.com/cyanheads/cern-inspire-mcp-server.gitNavigate into the directory:
cd cern-inspire-mcp-serverInstall dependencies:
bun installConfigure environment (optional):
cp .env.example .env
# edit .env to change the transport, logging, or session settingsConfiguration
The server has no settings of its own: INSPIRE needs no key, and the request pacing is fixed in code. These framework variables cover most deployments.
Variable | Description | Default |
| Transport: |
|
| HTTP server port. |
|
| HTTP session mode: |
|
| Authentication: |
|
| Log level ( |
|
| Directory for log files (Node.js only). |
|
| Storage backend: |
|
| Enable OpenTelemetry. |
|
See .env.example for the full list of framework overrides.
Running the server
Local development
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdioRun checks and tests:
bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite
Project structure
Directory | Purpose |
|
|
| Tool definitions ( |
| The literature record resource. |
| INSPIRE service: pacer, per-call budget, retries, identifier routing, normalization, controlled vocabularies. |
| Bounded fetch: per-attempt timeout and response byte ceiling. |
| Escaping for upstream text in tool output and error messages ( |
| Vitest suites with INSPIRE response fixtures. |
| Tool surface, verified INSPIRE behavior, design decisions, and the deferred HEPData-direct tools. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicEvery INSPIRE request goes through
InspireService, with the call opened bybeginCall(ctx); handlers neverfetchdirectlyRegister new tools and resources in the barrels at
src/mcp-server/tools/definitions/index.tsandsrc/mcp-server/resources/definitions/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Search DataCite datasets and software, fetch DOI metadata, trace relations, format citations.
Multi-engine scholarly research server for search, traversal, full text, and reading lists.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Search CERN Open Data, fetch records, files, analysis environments, CMS good-run lists, HLT paths.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables searching and retrieving high-energy physics literature, authors, institutions, and conferences from INSPIRE-HEP.15 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables searching and exploring CERN Open Data records, files, analysis environments, CMS validated-run (good-run) lists, and HLT trigger paths through MCP tools. Supports exact-vocabulary filtering with live facet counts, license and citation retrieval, and runs over stdio or Streamable HTTP.66 npm1Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables searching biomedical literature across PubMed, PubMed Central, and Europe PMC, fetching article metadata and full text, resolving citations and identifiers, and grounding queries in MeSH vocabulary. Runs over stdio or Streamable HTTP, exposing 11 tools, a database-info resource, and a research-plan prompt.9 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables searching PubMed and Europe PMC, fetching article metadata and full text through PMC, Europe PMC, or Unpaywall, formatting citations in several styles, resolving identifiers and partial references, and grounding queries in MeSH vocabulary. Runs over stdio or Streamable HTTP.9 npmMIT