Skip to main content

Production-grade MCP server for CERN ROOT file analysis

Project description

ROOT-MCP: AI-Powered HEP Analysis

CI PyPI License Language

ROOT-MCP empowers Large Language Models (LLMs) to natively understand and analyze CERN ROOT files.

By exposing a set of specialized tools via the Model Context Protocol (MCP), it turns Claude (and other MCP-compliant agents) into capable physics research assistants that can:

  • Inspect ROOT file structures (Trees, Branches, Histograms)
  • Analyze data distributions (Compute Histograms, Statistics)
  • Compute kinematic quantities (invariant masses, angular correlations for Dalitz plots)
  • Visualize results directly in the chat
  • Filter data using physics cuts ("selections")

Why this matters: Instead of asking an LLM to "write a script" that you have to debug and run, you can ask the LLM to "Check the muon pT distribution in this file" and it will just do it.


Quick Start

1. Install

pip install root-mcp
# Optional: pip install "root-mcp[xrootd]" for remote file support

2. Configure

Create a config.yaml to tell the server where your data is:

resources:
  - name: "my_analysis"
    uri: "file:///Users/me/data"
    allowed_patterns: ["*.root"]

security:
  allowed_roots:
    - "/Users/me/data"

3. Run with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "root-mcp": {
      "command": "root-mcp",
      "env": {
        "ROOT_MCP_CONFIG": "/path/to/config.yaml"
      }
    }
  }
}

Documentation

Citation

If you use ROOT-MCP in your research, please cite:

@software{root_mcp,
  title = {ROOT-MCP: Production-Grade MCP Server for CERN ROOT Files},
  author = {Mohamed Elashri},
  year = {2025},
  url = {https://github.com/MohamedElashri/root-mcp}
}

License

MIT License - see LICENSE 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

root_mcp-0.1.2.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

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

root_mcp-0.1.2-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

Details for the file root_mcp-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for root_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5e570f1787458d93135736643bc47b52cceffb8f2f2a6e29767e0da9aabe593b
MD5 34342c6a7b7f2536b148c9151477b147
BLAKE2b-256 651ecbbb329d178baddec7cfb55de85b5cc508f4f373d4cc9fc8001d5543d229

See more details on using hashes here.

Provenance

The following attestation bundles were made for root_mcp-0.1.2.tar.gz:

Publisher: release.yml on MohamedElashri/root-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 root_mcp-0.1.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for root_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 56af92e0983b60c75946d37e775c7383e1eedf39c51680c5c4ed380a463a19b4
MD5 0606b29582578871515c36d9f68f22d0
BLAKE2b-256 f0c36496df664e2b6e171dea032834e28df3cad2613ee82553f12d218628c812

See more details on using hashes here.

Provenance

The following attestation bundles were made for root_mcp-0.1.2-py3-none-any.whl:

Publisher: release.yml on MohamedElashri/root-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