Pythia MCP
Pythia MCP lets you constrain BSM Higgs physics via Lilith likelihoods, parameter scans, and experimental data retrieval from Claude.
Compute Higgs likelihood (-2 log L) for reduced couplings or signal strengths against LHC data.
Compute Standard Model reference likelihood and p-values for model comparison.
Run 1D/2D parameter scans (e.g., CV–CF plane) for likelihood profiles and contour plots.
Browse, filter, and inspect Lilith experimental datasets (ATLAS, CMS, Tevatron; Run1/Run2).
Search HEPData, fetch records by INSPIRE ID or record number, and check/update the local database.
Fetch latest Higgs measurements from HEPData and CERN Open Data.
Get SM predictions for Higgs cross sections and branching ratios at 7–14 TeV.
Convert reduced couplings to signal strengths.
Validate Lilith XML input without running the full calculation.
Analyze 2HDM (Types I, II, L, F) and Higgs singlet extension models.
Search CERN Open Data portal, retrieve record metadata, and list downloadable files.
Get Lilith library and database version information.
Allows fetching and analyzing particle physics experimental data and records from the HEPData repository using INSPIRE identifiers.
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., "@Pythia MCP What constraints does LHC data place on a two-Higgs doublet model?"
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.
Constrain beyond-Standard-Model physics from LHC Higgs measurements, directly from Claude.
Pythia wraps the Lilith library as an MCP server, giving AI assistants access to 24 particle physics analysis tools.
⚸   ☽   ✦   ☾   ⚸
the oracle speaks for the Higgs; the night-engine does the math
The Oracle & the Night  •  Getting Started  •  Tools  •  Examples  •  Architecture  •  Citations
Lilith Attribution — All physics calculations are performed by Lilith-2, developed by Sabine Kraml and collaborators at LPSC Grenoble. Pythia is an MCP interface layer. Please star the original repo and cite the Lilith papers in any research output.
Overview
The 125 GeV Higgs boson, discovered at CERN in 2012, is the cornerstone of electroweak symmetry breaking. Precision measurements of its couplings to other particles provide one of the most powerful probes for physics beyond the Standard Model (BSM).
Pythia bridges this frontier physics with conversational AI. Instead of manually running Python scripts and parsing XML, you ask Claude:
"What constraints does LHC data place on a Type-II two-Higgs-doublet model with tan(beta) = 2?"
Under the hood, Pythia generates validated XML input, invokes Lilith's likelihood engine against the full ATLAS + CMS dataset, and returns structured results, all through the Model Context Protocol.
Related MCP server: axiomatic-mcp
Interactive 3D Collider Digital Twin & Engineering Blueprints
Physical Explainer: The Pythia LHC Higgs Calorimeter Bench
An interactive isometric precision instrument built with wheresryan22/anatomy embodying Higgs decay branching ratio calorimetry:
Launch Interactive Physical Explainer · (Local:
docs/figures/pythia-collider.html)
Figure: The Pythia LHC Higgs Calorimeter Bench. An optical decay carriage stepping six Higgs decay channels beneath a quadrupole collision chamber, dual coupling verniers (CV, CF), and a signal strength dial. Feeler plunger measures branching fraction step height while dials register gauge boson and fermion reduced couplings.
Launch Interactive 3D WebGL Digital Twin (LHC Detector & Event Display) (Interactive Three.js digital twin featuring cutaway 4-layer particle detector, Golden Channel H -> ZZ -> 4μ event with reconstructed invariant mass m_4μ = 125.09 GeV, Diphoton H -> γγ, VBF forward jet tags, and 3D Lilith likelihood surface).*
Sheet 1: Higgs Boson Production & Decay Phenomenology Blueprint
Full vector Feynman diagrams for all 5 LHC production modes (ggF, VBF, WH, ZH, ttH), precision decay branching ratios, SMEFT dimension-6 operators, and electroweak coupling modifiers (κ-framework).
Figure 1: Standard ISO Drawing PYTHIA-HEP-DWG-001 (Rev 2.1). Vector SVG available at results/higgs_feynman_phenomenology_blueprint.svg.
Sheet 2: Lilith-2 Experimental Likelihood & BSM Constraints Blueprint
Signal strength likelihood contours (μ_ggF+ttH vs μ_VBF+VH) with 68% and 95% CL ellipses from ATLAS + CMS Run 2/3 datasets, Two-Higgs-Doublet Model (2HDM) alignment limit constraints, and profile likelihood evaluation architecture.
Figure 2: Standard ISO Drawing PYTHIA-BSM-DWG-002 (Rev 1.9). Vector SVG available at results/lilith_likelihood_constraints_blueprint.svg.
⚸  •  ☽  •  ✦  •  ☾  •  ⚸
⚸ The Oracle and the Night
Two names sit at the heart of this project, and both were chosen on purpose.
Pythia, here, is not the event generator but the Pythia herself: the priestess of the Oracle at Delphi. She breathed the vapors that rose from the cleft in the rock and gave answers to the questions mortals feared to ask. This server is her modern tripod. You put a question to the Higgs sector in plain language, and the oracle answers from the data.
Lilith ⚸ is the engine beneath the floor. Its authors named it Light Likelihood Fit for the Higgs, and also, knowingly, after the lady of the night from the older stories. Pythia keeps the double meaning. The ⚸ glyph is the Black Moon, Lilith's own sigil: the empty focus of the Moon's orbit, the point you find only by where everything else turns around it. Fitting, for a hunt after new physics in the places the Standard Model leaves dark.
The sigils are a lens for thinking, never evidence. Every number Pythia returns comes from ATLAS and CMS, not from omens. The Higgs, so far, is stubbornly Standard-Model-like, and saying so honestly is the whole point of a likelihood fit.
☾  •  ✦  •  ⚸  •  ✦  •  ☽
Getting Started
Prerequisites
Requirement | Version |
Node.js | >= 18.0 |
Python | >= 3.6 |
NumPy + SciPy | latest |
Install
git clone https://github.com/consigcody94/pythia-mcp.git
cd pythia-mcp
npm install
npm run build
pip install numpy scipyConfigure Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pythia": {
"command": "node",
"args": ["/path/to/pythia-mcp/dist/index.js"],
"env": {
"LILITH_DIR": "/path/to/pythia-mcp/lilith",
"PYTHON_CMD": "python3"
}
}
}
}Verify
cd lilith
python run_lilith.py userinput/example_couplings.xmlYou should see a -2log(likelihood) value printed to stdout.
Tools
Pythia exposes 24 tools organized into five categories.
Core Analysis
Tool | Description |
| Compute -2 log(L) for any BSM coupling or signal-strength scenario |
| Standard Model reference likelihood |
| P-value for model comparison against SM or best-fit |
| 1D parameter scan with likelihood profile (parallel execution) |
| 2D parameter scan for contour plots (parallel execution) |
Data Management
Tool | Description |
| Browse Lilith's built-in ATLAS/CMS/Tevatron datasets |
| Inspect a specific experimental XML measurement file |
| Query the HEPData repository for new results |
| Download a HEPData record by INSPIRE ID or record number |
| Check HEPData for new signal-strength publications |
| Aggregate latest measurements from HEPData + CERN Open Data |
Data Ingestion
Turn external measurements into the Lilith <expmu> format the engine actually consumes.
Tool | Description |
| Discover Higgs papers via the INSPIRE-HEP API (works when HEPData's own search is blocked) |
| Convert a HEPData record (by id) or a downloaded table JSON into Lilith |
| Parse an existing |
| Build a valid |
Live HEPData access. HEPData's /search/ and table-download endpoints sit behind a Cloudflare bot challenge, so they are not reliably reachable from automated/server requests. Pythia handles this gracefully: discovery falls back to INSPIRE-HEP, and the ingest pipeline accepts a downloaded table JSON (tableJson) so conversion works fully offline. Generated files are written to the user data directory (LILITH_USER_DATA_DIR), never into the bundled Lilith database.
Physics Models
Tool | Description |
| Two-Higgs-Doublet Model (Types I, II, Lepton-specific, Flipped) |
| Higgs singlet extension with mixing angle |
| SM cross sections and branching ratios at 7-14 TeV |
| Convert reduced couplings to signal-strength values |
| Validate Lilith XML input without running the full calculation |
| Library and database version information |
CERN Open Data
Tool | Description |
| Search the CERN Open Data portal |
| Retrieve record metadata by ID |
| List downloadable files for a record |
Examples
Check SM Consistency
"Compute the Standard Model likelihood and tell me if the Higgs data is consistent with the SM."
Test Modified Couplings
"Calculate the likelihood for C_t = 0.9, C_V = 1.1"
{ "mode": "couplings", "Ct": 0.9, "CV": 1.1 }Two-Higgs-Doublet Model
"Analyze a Type-II 2HDM with tan(beta) = 2 and sin(beta - alpha) = 0.99"
{ "type": "II", "tanBeta": 2, "sinBetaMinusAlpha": 0.99 }Parameter Scan
"Scan the C_V–C_F plane from 0.8 to 1.2"
{
"param1": { "name": "CV", "min": 0.8, "max": 1.2, "steps": 50 },
"param2": { "name": "CF", "min": 0.8, "max": 1.2, "steps": 50 }
}Physics Reference
Reduced Couplings (kappa-framework)
The kappa-framework parameterizes deviations from SM Higgs couplings as multiplicative modifiers:
Parameter | Description | SM Value |
C_V | Vector boson coupling (W, Z) | 1.0 |
C_t | Top quark coupling | 1.0 |
C_b | Bottom quark coupling | 1.0 |
C_c | Charm quark coupling | 1.0 |
C_tau | Tau lepton coupling | 1.0 |
C_mu | Muon coupling | 1.0 |
C_g | Effective gluon coupling (loop-induced) | 1.0 |
C_gamma | Effective photon coupling (loop-induced) | 1.0 |
Signal strength: μ = σ_obs / σ_SM. A value of μ = 1 is consistent with the Standard Model.
Supported Production & Decay Modes
Production: ggH, VBF, WH, ZH, ttH, tH, bbH
Decay: γγ, ZZ, WW, bb, ττ, μμ, cc, Zγ, gg, invisible
Architecture
pythia-mcp/
├── src/
│ ├── index.ts # MCP server, request handlers, tool dispatch
│ ├── utils.ts # Validation, XML generation, physics models
│ ├── ingest.ts # Data ingestion: HEPData -> Lilith <expmu>, parser, builder
│ ├── utils.test.ts # Unit tests (116 tests via Vitest)
│ └── ingest.test.ts # Ingestion tests (16 tests; round-trips all 87 real files)
├── lilith/ # Bundled Lilith-2 library
│ ├── run_lilith.py # CLI entry point
│ ├── lilith/ # Core Python package
│ │ ├── main.py # Lilith class — likelihood engine
│ │ └── internal/ # Couplings, BRs, likelihood computation
│ ├── data/ # Experimental database (ATLAS, CMS, Tevatron)
│ └── userinput/ # Example XML input files
├── .github/workflows/ # CI: build (Node 18/20/22) + test
├── package.json
├── tsconfig.json
└── vitest.config.tsSecurity
Input validation — All coupling, mass, and branching-ratio parameters are range-checked before use.
XML injection prevention — All user-supplied values are escaped before embedding in XML.
Path traversal protection — Dataset paths are resolved and verified against a base directory.
ReDoS prevention — User-supplied regex patterns are length-limited and checked for dangerous constructs.
API safety — HTTP requests enforce 30s timeouts, redirect depth limits, and response caching with TTL. Redirects are only followed to an allowlist of physics-data hosts over HTTPS, so an open-redirect upstream cannot be used for SSRF.
XXE prevention — XML submitted to
validate_inputis rejected if it declares a DOCTYPE or ENTITY, since the underlying parser resolves entities.Subprocess limits — Python process output is capped at 1 MB to prevent memory exhaustion.
Development
npm install # Install dependencies
npm run build # Compile TypeScript
npm test # Run unit tests
npm run test:watch # Run tests in watch mode
npm run dev # Run with ts-node (development)Environment Variables
Variable | Default | Description |
|
| Path to Lilith installation |
|
| Python interpreter command |
|
| Where ingested |
Citations
If you use Pythia in research, you must cite the Lilith papers:
@article{Bernon:2015hsa,
author = "Bernon, J\'er\'emy and Dumont, B\'eranger",
title = "{Lilith: a tool for constraining new physics from Higgs measurements}",
journal = "Eur. Phys. J. C",
volume = "75",
pages = "440",
year = "2015",
doi = "10.1140/epjc/s10052-015-3645-9",
eprint = "1502.04138",
archivePrefix = "arXiv"
}
@article{Kraml:2019sis,
author = "Kraml, Sabine and others",
title = "{Lilith-2: improved constraints on new physics from Higgs measurements}",
year = "2019",
eprint = "1908.03952",
archivePrefix = "arXiv"
}⚸ Dedication
For Sabine Kraml (@sabinekraml) and the Lilith team, who built the engine that does all the physics here. A small dedication, in the old tongue:
Nescio num vere Lilith, Sabina, voces, an iocus iste tuus, noctis an umbra redit. Quidquid agis, faveo tibi plaudoque libenter; si iuvet ulla manus, tu modo, diva, voca.
I do not know whether you are truly calling Lilith, Sabine, or whether this is your jest, or whether night's own shadow returns. Whatever you are doing, I favor it and applaud it gladly; if any hand may help, you, illustrious one, need only call. ⚸
Acknowledgments
Sabine Kraml & Lilith Team | LPSC Grenoble — physics engine |
ATLAS & CMS Collaborations | Higgs boson measurements |
HEPData | Durham / CERN — data archive |
Anthropic | Model Context Protocol |
References
Resource | Link |
Lilith-2 source | |
Lilith paper | |
HEPData | |
CERN Open Data | |
LHC Higgs XS WG | |
Model Context Protocol |
License
GNU General Public License v3.0 — Pythia and the bundled Lilith library are both GPL-3.0 licensed.
⚸   ☽   ✦   ☾   ⚸
"The Higgs boson is the key to understanding the origin of mass in the universe." — Peter Higgs
The oracle answers only from the data. Built for open science and particle physics research.
Available Tools
20 toolsanalyze_2hdmC
Analyze Two-Higgs-Doublet Model (2HDM) parameters in terms of Higgs couplings. Supports Type-I, Type-II, Lepton-specific, and Flipped variants.
Inputs: type (required), tanBeta (required), sinBetaMinusAlpha (required), mass.
analyze_singlet_extensionC
Analyze Higgs singlet extension model with mixing between SM Higgs and singlet.
Inputs: mixingAngle (required), BRinv.
compute_likelihoodB
Compute the Higgs likelihood (-2 log L) for a given set of reduced couplings or signal strengths. This is the primary analysis function that compares theoretical predictions against LHC experimental data.
Inputs: mode (required), mass, CV, CF, +13 more.
compute_pvalueC
Compute the p-value for a given model compared to the Standard Model or best-fit point.
Inputs: likelihood (required), ndf (required), reference.
compute_sm_likelihoodB
Compute the Standard Model likelihood as a reference point. Returns -2 log L for SM couplings (all C = 1).
Inputs: expInput.
convert_to_signal_strengthC
Convert reduced couplings to signal strength values for all production and decay modes.
Inputs: mass, CV, CF, Ct, +5 more.
fetch_hepdata_recordB
Fetch detailed data from a specific HEPData record by its INSPIRE ID or record number.
Inputs: inspireId, recordId, table, format.
get_cern_opendata_recordA
Retrieve detailed metadata for a specific CERN Open Data record by its record ID.
Inputs: recid (required).
get_dataset_infoB
Get detailed information about a specific experimental dataset including best-fit values, uncertainties, and correlations.
Inputs: datasetPath (required).
get_latest_higgs_dataC
Fetch the latest Higgs boson measurement data from both HEPData and CERN Open Data portals. Returns recent signal strength measurements, coupling measurements, and analysis results.
Inputs: channel, collaboration, since.
get_sm_predictionsB
Get Standard Model predictions for Higgs cross sections and branching ratios at specified mass and energy.
Inputs: mass, sqrts.
get_version_infoB
Get version information for Lilith library and experimental database.
Inputs: no named parameters.
list_cern_opendata_filesB
List files available for download from a specific CERN Open Data record.
Inputs: recid (required), filterPattern.
list_experimental_dataB
List available experimental datasets in the Lilith database, organized by experiment and run period.
Inputs: experiment, runPeriod.
scan_1dC
Perform a 1D parameter scan and return likelihood profile.
Inputs: param (required), fixedParams.
scan_2dC
Perform a 2D parameter scan (e.g., CV-CF plane) and return likelihood values for contour plotting.
Inputs: param1 (required), param2 (required), fixedParams.
search_cern_opendataC
Search the CERN Open Data portal for Higgs-related datasets, analysis code, and documentation.
Inputs: query, experiment, type.
search_hepdataC
Search HEPData repository for new Higgs measurement data from ATLAS and CMS.
Inputs: collaboration, year, decay, production, +1 more.
update_databaseC
Check for and optionally download new experimental data from HEPData to update the local Lilith database.
Inputs: checkOnly, collaboration, since.
validate_inputA
Validate XML input format for Lilith without running the full calculation.
Inputs: xml (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools have distinct purposes, with clear separation between data retrieval (e.g., fetch_hepdata_record, get_cern_opendata_record), analysis (e.g., compute_likelihood, scan_1d), and utility functions (e.g., validate_input, update_database). However, some overlap exists between list_experimental_data and search_hepdata/search_cern_opendata, which could cause minor confusion in selection.
Tool names follow a highly consistent verb_noun pattern throughout, such as analyze_2hdm, compute_likelihood, fetch_hepdata_record, and scan_1d. All tools use snake_case with clear, descriptive verbs, making the naming predictable and easy to understand.
With 20 tools, the count is slightly high but reasonable for a specialized Higgs physics analysis server. It covers a broad range of operations from data access to statistical analysis, though it might feel heavy for general use. The tools are well-scoped within the domain, with each serving a specific function.
The tool set provides comprehensive coverage for Higgs model analysis, including data fetching (from HEPData and CERN Open Data), likelihood computation, parameter scanning, model validation, and database management. It supports full CRUD-like operations for experimental data and analysis workflows, with no obvious gaps that would hinder agent performance.
Maintenance
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for building and testing AI agents with multi-model experimentation and insights.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that connects LLMs to CERN GitLab to discover and analyze High Energy Physics code, documentation, and analysis examples. It provides 14 tools for repository browsing, dependency parsing, and CI/CD configuration analysis.15150 PyPI4AGPL 3.0

axiomatic-mcpofficial
AlicenseBqualityBmaintenanceMCP server enabling AI assistants to access the Axiomatic_AI Platform for scientific computing, document processing, and photonic circuit design.57478 PyPI24MIT- AlicenseAqualityCmaintenanceAn MCP server and CLI tool that allow LLMs to interact with CERN ROOT files.9125 PyPI4MIT
- AlicenseAqualityBmaintenanceAn MCP server that integrates InspireHEP high-energy physics literature with LLMs. Search papers, explore citations, retrieve author metrics, and generate formatted references.9247 PyPI8AGPL 3.0