root-mcp
MCP server for ROOT CERN files
ROOT-MCP: LLM Powered HEP Analysis
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 Mass)
- Visualize results (Plot 1D/2D histograms directly)
- 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.
Architecture
ROOT-MCP features a dual-mode architecture:
- Core Mode: File I/O, data reading, and basic statistics
- Extended Mode: Full analysis capabilities including fitting, kinematics, and correlations
The mode is controlled via configuration, and the server automatically loads only the components you need. Runtime mode switching is also available.
Quick Start
1. Install
pip install root-mcp
Optional: For remote file access via XRootD protocol:
pip install "root-mcp[xrootd]"
2. Configure
Create a config.yaml and set your preferred mode:
# Server settings
server:
name: "root-mcp"
mode: "extended" # Options: "core" or "extended"
# Data resources
resources:
- name: "my_analysis"
uri: "file:///Users/me/data"
allowed_patterns: ["*.root"]
# Security
security:
allowed_roots:
- "/Users/me/data"
# Output directory for exports
output:
export_base_path: "/Users/me/exports"
Mode Selection:
mode: "core"- Lightweight mode for file operations and basic statisticsmode: "extended"- Full analysis features (histograms, fitting, kinematics, correlations)
You can switch modes at runtime using the switch_mode tool without restarting the server.
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
- Full Documentation: The complete guide.
- Tool Reference: Detailed API definition for all tools.
- LLM Integration Guide: How to prompt and work with the agent.
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.
Related Servers
MCP Goodnews
An MCP application that delivers curated positive and uplifting news stories using NewsAPI and Cohere LLM.
Bazi Calculation
A professional Bazi (Chinese astrology) calculation server providing full analysis including four pillars, five elements, zodiac, and lunar dates with timezone support.
Draw-it MCP
An AI-powered drawing application for your browser. Draw, save, and get AI-powered insights.
3D Cartoon Generator & File System Tools
Generates 3D-style cartoon images using Google's Gemini AI and provides secure file system operations.
Universal Image MCP
Universal MCP server for AI image generation supporting AWS Bedrock (Nova Canvas), OpenAI (GPT Image, DALL-E), and Google Gemini (Imagen 4). Generate, transform, and edit images using multiple AI models through a single Model Context Protocol interface.
Send247 Human Logistics
Human Logistics in the AI Layer
MCP HUB
The Ultimate Control Plane for MCP Unlock the full power of Model Context Protocol with zero friction. One-Click GPT Integration: Bridge the gap between MCP servers and ChatGPT/LLMs instantly. No more manual config hunting. Pro-Level Orchestration: Manage, monitor, and toggle multiple MCP tools from a single, intuitive dashboard. Secure by Design: Built-in support for complex auth flows and 2FA, making enterprise-grade tool integration seamless. Streamlined Debugging: Test queries and inspect tool responses in real-time without leaving the hub. Stop wrestling with JSON configs. Start building agentic workflows that actually work.
UFO MCP Server
Control a Dynatrace UFO device on your local network using MCP-compatible clients.
Loxone MCP Server
An MCP server for Loxone home automation systems, allowing AI assistants to control lights, blinds, sensors, and weather.
Web-Algebra
Suite of generic Linked Data/SPARQL as well as LinkedDataHub-specific MCP tools