- Home
- MCP servers
- Root
Root
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"omazapa-root_mcp_server": {
"command": "root_mcp_server",
"args": []
}
}
}You can run Python and C++ code directly inside ROOT using the MCP server, providing low-latency execution and interactive graphics without external APIs. It exposes two in-process tools for executing Python and C++ with PyROOT and ROOT’s cling interpreter respectively, making it ideal for rapid experimentation and analysis workflows.
How to use
You use the MCP server by connecting a client (such as an MCP-enabled editor or a CLI client) and sending execution requests for Python or C++ code. The server runs code in the same process and returns stdout, stderr, and error information. When graphics are enabled, ROOT canvases and graphics objects can be interacted with through an embedded web-based canvas server.
To run Python code, send a request to the root_python tool. To run C++ code, send a request to the root_cpp tool. Each tool returns a structured result including a success flag, captured stdout, and any error details. All code execution is logged to the MCP console for easy auditing.
How to install
Prerequisites you need before installing are ROOT (6.x or later) with PyROOT enabled and Python 3.10 or newer.
Install the MCP server package from your project root with Python’s package installer in editable mode so you can modify the code if needed.
pip install -e .
Additional notes
There are multiple ways to start and use the server. You can start it directly from the command line or run it via a programmatic wrapper that launches Python’s module interface. The available configurations shown below represent the explicit methods described for running the server.
Configuration and startup methods
Direct command line startup: run the MCP server directly from the shell.
root_mcp_server
Programmatic startup option
You can also start the server via a programmatic approach that executes the server’s CLI module after sourcing ROOT’s environment setup.
bash -lc 'source /path/to/thisroot.sh && python3 -m root_mcp_server.cli'
Available tools
root_python
Executes Python code with ROOT available in the Python environment. Returns stdout, stderr, and error information.
root_cpp
Executes C++ code through ROOT's cling interpreter, with automatic error detection and return metadata.