Hi everyone,
I built an open-source MCP (Model Context Protocol) server that connects Claude AI to Allpix Squared and Geant4. It lets you generate simulation configs by describing the detector in plain English from the terminal.
For example, typing:
“Generate an Allpix2 config for a 1mm silicon detector, 100um pitch, 20um gap, 50V bias, 10 keV gammas, 100 events”
generates a complete working configuration (main.conf, detector model, geometry) and runs the simulation.
Tested with Allpix Squared v3.0.0 and Geant4 11.2.2 on Ubuntu 24.04.
The server includes 9 tools:
Allpix Squared config generation
Geant4 macro generation
Material database (CdZnTe, CdTe, Si, Ge, CsI, BGO, LYSO, GaAs)
Physics calculators (Hecht equation, Fano resolution, charge sharing)
X-ray spectrum generator
It is a single Python file. Setup takes about 10 minutes with Claude Code.
GitHub: GitHub - egguliyev/geant4-mcp-server · GitHub
Happy to hear feedback or suggestions from the community.
Elmaddin Guliyev