Search INSPIRE-HEP papers, authors, experiments, HEPData records; get citation metrics and BibTeX.
Search INSPIRE-HEP papers, authors, experiments, HEPData records; get citation metrics and BibTeX via MCP. STDIO or Streamable HTTP.
High-energy-physics literature from INSPIRE-HEP, including its index of HEPData measurement records. Search papers, authors, and experiments, read a paper's full record, compute citation summaries and h-indices, export BibTeX or LaTeX entries, and find the HEPData record that holds a paper's numerical tables. Runs as a stdio process or a local Streamable HTTP server.
| Tool | Description |
|---|---|
cern_inspire_search_literature | Search papers with INSPIRE query syntax or free text, filtered by document type, subject, and year |
cern_inspire_get_paper | Fetch one paper's full record by recid, arXiv ID, or DOI, with its HEPData availability |
cern_inspire_export_citations | Export INSPIRE's BibTeX or LaTeX \bibitem entries for the papers a query selects |
cern_inspire_search_authors | Find physicist profiles by name, BAI, ORCID, INSPIRE ID, or author recid |
cern_inspire_get_citation_summary | h-index, citation totals, and citation buckets for one author or any literature query |
cern_inspire_search_experiments | Find experiments, collaborations, and facilities, with a query that selects their papers |
cern_inspire_search_hepdata | Find HEPData measurement records by process, observable, energy, or collaboration |
cern_inspire_list_reference | Decode query syntax, identifier forms, filter values, citation buckets, and HEPData DOIs |
| Resource | Description |
|---|---|
inspire://literature/{recid} | One literature record as the cern_inspire_get_paper dossier in JSON |
The same record is reachable through cern_inspire_get_paper for clients that don't surface resources.
cern_inspire_search_literature toolsort (relevance, mostrecent, mostcited), document_types and subjects (up to 4 values each, all of which must hold), and year_from / year_to; size 1–100 (default 10), paged by pagepage × size beyond that fails as beyond_result_window, and a reversed year range as invalid_year_rangerecid, title, first author, date, citation counts, arXiv ID, DOI, publication, and a 300-character abstract snippet; totalCount, nextPage, and appliedFilters come back with the page, and a notice flags any query matching over 100,000 recordscern_inspire_get_paper toolpaper takes a recid, arXiv ID, DOI, inspirehep.net literature URL, or HEPData ins<recid> / hepdata.net record URL; resolvedAs names the form that matched, and a miss fails as paper_not_foundmax_authors 0–500 (default 25) caps the author list; authorCount always gives the full numberhepdata.status is available, none, or lookup_failed, with recordDoi, latestVersion, tableCount, and hepdataUrl when available; citingQuery and referencesQuery feed cern_inspire_search_literaturecern_inspire_export_citations toolrecid:451647 or arxiv:1207.7214 for named papers); format is bibtex (default), latex-eu, or latex-us; size 1–50 (default 10)texkey; truncated is set when more papers matched than sizecern_inspire_search_authors toollimit 1–25 (default 5)matchedAs reports the route: orcid, inspire_id, bai, and recid match exactly, while name runs a free-text search whose ranked candidates are returned for the caller to choose fromrecid, bai, ORCID, positions, advisors, arXiv categories, awards, and a literatureQuery selecting the person's paperscern_inspire_get_citation_summary toolauthor (BAI, ORCID, INSPIRE ID, or author recid) or query (any literature query); otherwise missing_target, and a name passed as author fails as author_not_identifierdocument_types, subjects, and year_from / year_to narrow every figure; exclude_self_citations recounts without self-citations0, 1–9, 10–49, 50–99, 100–249, 250–499, 500+, each for all citeable and for published paperscern_inspire_search_experiments toolCERN-LHC-CMS), or an experiment recid (digits only); limit 1–25 (default 5)ongoing (omitted when INSPIRE records neither state), INSPIRE's paper count, and a literatureQuery for cern_inspire_search_literature or cern_inspire_get_citation_summarycern_inspire_search_hepdata toolcollaborations.value:LHCb, literature.control_number:<recid>); sort is relevance or mostrecent; size 1–50 (default 10), within the same 10,000-result windowpaperRecids, collaborations, keywords (reactions, observables, centre-of-mass energies), recordDoi, latestVersion, tableCount, and hepdataUrl; table values are not returnedcern_inspire_list_reference tooltopic: search_syntax, identifiers, document_types, subjects, citation_buckets, or hepdataterm / meaning / example entries with no upstream callinspire://literature/{recid} resourcecern_inspire_get_paper dossier for one recid as application/json, listing the first 25 authorsBuilt 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:
pacer_shed with a retryAfterarXiv: or doi: prefix, a version suffix, an arxiv.org, doi.org, or inspirehep.net URL, and HEPData's ins<recid>; author identifiers accept an orcid.org URL; document_types and subjects take an array or a comma-joined string in any caseAgent-friendly output:
recid, author profiles and experiments carry a ready literatureQuery, and cern_inspire_get_paper returns citingQuery and referencesQuery, so the next call needs no query buildingtotalCount, truncated / shown / cap, nextPage, appliedFilters, and effectiveQuery, plus a notice with next-step text on empty, capped, or suspiciously broad resultshepdata.status, resolvedAs, matchedAs, and target.kind let callers branch on data, and typed failure reasons (paper_not_found, author_not_found, beyond_result_window, inspire_rate_limited) each carry a recovery hintstructuredContentrecordDoi) when you reuse the data.cern_inspire_get_paper and cern_inspire_search_hepdata return the record DOI and the hepdata.net page where the values are read.totalCount usually means a syntax slip (cern_inspire_list_reference topic search_syntax)./mcp, and should run one replica per egress IP, since INSPIRE counts requests per address; a per-caller share inside the server waits on the framework (cyanheads/mcp-ts-core#618).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/mcp
git clone https://github.com/cyanheads/cern-inspire-mcp-server.git
cd cern-inspire-mcp-server
bun install
cp .env.example .env
# edit .env to change the transport, logging, or session settings
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 |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_SESSION_MODE | HTTP session mode: stateless, stateful, or auto. .env.example and the Docker image set stateless. | auto |
MCP_AUTH_MODE | Authentication: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, notice, warning, error, etc.). The Docker image sets info. | debug |
LOGS_DIR | Directory for log files (Node.js only). | <app-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry. | false |
See .env.example for the full list of framework overrides.
Build and run the production version:
# One-time build
bun run rebuild
# Run the built server
bun run start:http
# or
bun run start:stdio
Run checks and tests:
bun run devcheck # Lints, formats, type-checks, and more
bun run test # Runs the test suite
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point: registers the tools and resource, sets the server instructions, starts and disposes the INSPIRE service. |
src/mcp-server/tools | Tool definitions (*.tool.ts), eight tools, plus shared input schemas (inputs.ts). |
src/mcp-server/resources | Resource definitions. The literature record resource. |
src/services/inspire | INSPIRE service: request pacer, per-call budget, retries, identifier routing, normalization, and the controlled vocabularies. |
src/services/http | Bounded fetch: per-attempt timeout and response byte ceiling. |
src/utils | Escaping for upstream text in tool output and error messages (render.ts). |
tests/ | Vitest suites for the tools, resource, services, and shared helpers, with INSPIRE response fixtures. |
docs/design.md | Tool surface, verified INSPIRE behavior, design decisions, and the deferred HEPData-direct tools. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicInspireService, with the call opened by beginCall(ctx); handlers never fetch directlysrc/mcp-server/tools/definitions/index.ts and src/mcp-server/resources/definitions/index.tsIssues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/cern-inspire-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-cern-inspire-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/cern-inspire-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencecern-inspire-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.