Skip to main content

MCP server for InspireHEP - integrate high-energy physics literature resources with LLMs

Project description

InspireHEP MCP Server

An MCP server that integrates InspireHEP high-energy physics literature with LLMs. Search papers, explore citations, retrieve author metrics, and generate formatted references.

Installation

# Using pip
pip install inspirehep-mcp

# Or run directly with uvx (no install needed)
uvx inspirehep-mcp
Install from source
git clone https://github.com/MohamedElashri/inspirehep-mcp.git
cd inspirehep-mcp
uv sync
uv run inspirehep-mcp

Integration

Claude Desktop / Cursor / Windsurf

Add to your MCP client config:

{
  "mcpServers": {
    "inspirehep": {
      "command": "uvx",
      "args": ["inspirehep-mcp"]
    }
  }
}

Claude Code

Option A: Using the CLI

# Global scope (available across all projects)
claude mcp add --scope user inspirehep -- uvx inspirehep-mcp

# Project scope (shared via .mcp.json, checked into source control)
claude mcp add --scope project inspirehep -- uvx inspirehep-mcp

Option B: Manual configuration

For global scope, add to ~/.claude.json:

{
  "mcpServers": {
    "inspirehep": {
      "command": "uvx",
      "args": ["inspirehep-mcp"]
    }
  }
}

For project scope, create .mcp.json in your project root:

{
  "mcpServers": {
    "inspirehep": {
      "command": "uvx",
      "args": ["inspirehep-mcp"]
    }
  }
}

Gemini CLI

Option A: Using the CLI

# Project scope (default)
gemini mcp add inspirehep uvx inspirehep-mcp

# User/global scope
gemini mcp add -s user inspirehep uvx inspirehep-mcp

Option B: Manual configuration

Add to ~/.gemini/settings.json (user scope) or .gemini/settings.json (project scope):

{
  "mcpServers": {
    "inspirehep": {
      "command": "uvx",
      "args": ["inspirehep-mcp"]
    }
  }
}

Tools

Tool Description
search_papers Search papers by topic, author, collaboration, or free text
get_paper_details Get full metadata for a paper by Inspire ID, arXiv ID, or DOI
get_author_papers Retrieve an author's publications and citation metrics
get_citations Explore citation graph — who cites a paper, or what it cites
search_by_collaboration Find publications from ATLAS, CMS, LHCb, etc.
get_references Generate BibTeX, LaTeX, or JSON reference lists
server_stats Monitor cache hit rates and API performance

Configuration

All settings via environment variables (prefix INSPIREHEP_):

Variable Default Description
INSPIREHEP_REQUESTS_PER_SECOND 1.5 API rate limit
INSPIREHEP_CACHE_TTL 86400 Cache TTL in seconds (24h)
INSPIREHEP_CACHE_MAX_SIZE 512 Max cached entries
INSPIREHEP_CACHE_PERSISTENT false Enable SQLite persistent cache
INSPIREHEP_CACHE_DB_PATH inspirehep_cache.db SQLite cache file path
INSPIREHEP_API_TIMEOUT 30 HTTP request timeout (seconds)
INSPIREHEP_LOG_LEVEL INFO Logging level

Development

# Run tests
uv run pytest tests/ -v

# Run with coverage
uv run pytest tests/ --cov=inspirehep_mcp --cov-report=term-missing

# Unit tests only (no network)
uv run pytest tests/test_utils.py tests/test_cache.py tests/test_errors.py tests/test_config.py

LICENCE

This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inspirehep_mcp-0.1.0.tar.gz (74.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inspirehep_mcp-0.1.0-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file inspirehep_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: inspirehep_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 74.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for inspirehep_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f6075c51ca1dcf1352c0955993c8f0687bcbffaf244d8abf4b47f39ea8d5ac4e
MD5 fd3dd296d21a608bcc579f939c6b18bb
BLAKE2b-256 9f4740da8f25caf49b8fb3aa2f5b5fe37a732e652c41cb39664f9a542e7db9cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for inspirehep_mcp-0.1.0.tar.gz:

Publisher: release.yml on MohamedElashri/inspirehep-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inspirehep_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: inspirehep_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for inspirehep_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1932e6d77f2965597a5aa339b5545ceeb12feefeeaf95b48556b1962d76724d7
MD5 4530b0d082a8b5f230543fb866e143c9
BLAKE2b-256 47c4220b9b192eca709e0bb29ab9508aee25a813c4776d593759e88bec84da9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for inspirehep_mcp-0.1.0-py3-none-any.whl:

Publisher: release.yml on MohamedElashri/inspirehep-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page