An MCP server for discovering and retrieving HEPData records.
Project description
HEPData MCP
This is an MCP server for discovering HEPData records, listing tables, fetching table data, and exposing HEPData export links. This is an early MVP implementation, focused on read-only access to public HEPData content.
Local stdio is the default and recommended mode. HTTP support exists for local testing and hardened central deployments, but remote HTTP is also supported for multiple clients support.
Install From This Checkout
This package is not published to PyPI yet. Install it into a local virtual environment with uv:
mkdir -p ~/.local/uv
git clone https://github.com/HEPData/hepdata-mcp ~/.local/uv/hepdata-mcp
cd ~/.local/uv/hepdata-mcp
uv venv .venv
uv pip install -e .
The examples below install into ~/.local/uv/hepdata-mcp. You can install the checkout somewhere else; just replace that path with your chosen directory.
MCP client config files should use the full absolute path to the executable. Do not use ~ in JSON or TOML command fields, because many clients launch commands directly without shell expansion.
For development checks:
uv sync --all-groups
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy
Run the server locally over stdio:
.venv/bin/hepdata-mcp
Docker
Build the image from this checkout:
docker build -t hepdata-mcp:local .
Run over stdio for clients that can launch Docker commands:
docker run --rm -i hepdata-mcp:local
Example stdio client command:
{
"mcpServers": {
"hepdata": {
"command": "docker",
"args": ["run", "--rm", "-i", "hepdata-mcp:local"]
}
}
}
Run local streamable HTTP:
docker run --rm \
-p 127.0.0.1:8000:8000 \
-e HEPDATA_MCP_ALLOW_REMOTE_HTTP=1 \
-e HEPDATA_MCP_TRUST_PROXY_AUTH=1 \
hepdata-mcp:local \
--transport streamable-http --host 0.0.0.0 --port 8000
The container runs as a non-root user. For remote HTTP deployment, keep the same reverse-proxy, TLS, authentication, and rate-limit requirements described below.
Tools
search_recordsget_recordlist_tablesdescribe_tableget_tableget_record_exportsget_record_versionsget_jsonldserver_info
Resources:
hepdata://record/{identifier}hepdata://record/{identifier}/tables
Local MCP Client Setup
Use the absolute path to the installed executable:
/home/<your-user>/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp
On Linux/macOS, print the exact path with:
realpath ~/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp
GitHub Copilot In VS Code
Create or edit .vscode/mcp.json:
{
"servers": {
"hepdata": {
"command": "/home/<your-user>/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp",
"args": []
}
}
}
Then run MCP: List Servers from the VS Code command palette and start hepdata.
For GitHub Copilot CLI:
copilot mcp add hepdata --type stdio -- ~/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp
Codex
Add to ~/.codex/config.toml:
[mcp_servers.hepdata]
command = "/home/<your-user>/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp"
supports_parallel_tool_calls = true
Or, if using a local HTTP server:
codex mcp add hepdata --url http://127.0.0.1:8000/mcp
Claude Code
Project .mcp.json example:
{
"mcpServers": {
"hepdata": {
"type": "stdio",
"command": "/home/<your-user>/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp",
"args": []
}
}
}
CLI alternative:
claude mcp add-json hepdata '{"type":"stdio","command":"/home/<your-user>/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp","args":[]}'
Qwen Code
Add to ~/.qwen/settings.json or .qwen/settings.json:
{
"mcpServers": {
"hepdata": {
"command": "/home/<your-user>/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp",
"args": [],
"timeout": 30000,
"trust": false
}
}
}
Other MCP Clients
Most stdio MCP clients support a similar shape:
{
"mcpServers": {
"hepdata": {
"command": "/home/<your-user>/.local/uv/hepdata-mcp/.venv/bin/hepdata-mcp",
"args": []
}
}
}
HTTP Mode
First create a new .venv like
uv venv .venv-http
uv pip install -e .
Start local streamable HTTP:
.venv-http/bin/hepdata-mcp --transport streamable-http --host 127.0.0.1 --port 8000
Local URL:
http://127.0.0.1:8000/mcp
Example VS Code / GitHub Copilot HTTP config:
{
"servers": {
"hepdata": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}
Example Qwen Code HTTP config:
{
"mcpServers": {
"hepdata": {
"httpUrl": "http://127.0.0.1:8000/mcp",
"timeout": 30000
}
}
}
Central Deployment
Remote HTTP binds are intentionally blocked unless both deployment opt-ins are set:
HEPDATA_MCP_ALLOW_REMOTE_HTTP=1 \
HEPDATA_MCP_TRUST_PROXY_AUTH=1 \
.venv/bin/hepdata-mcp --transport streamable-http --host 0.0.0.0 --port 8000
Only use this behind hardened ingress:
- TLS at the edge.
- Authentication and authorization before requests reach this process.
- Per-user or per-token rate limits.
- No request-body or table-payload logging.
Notes
- HEPData upstream access is public and read-only.
- Large tool payloads are truncated before being returned to agents.
- Whole-record download exports are returned as HEPData URLs, not downloaded by default.
- Live integration tests are opt-in:
HEPDATA_MCP_LIVE_TESTS=1 uv run pytest tests/test_live_client.py
License
This project follows the main HEPData project license: GNU General Public License version 2 or later (GPL-2.0-or-later). See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hepdata_mcp-0.1.0.tar.gz.
File metadata
- Download URL: hepdata_mcp-0.1.0.tar.gz
- Upload date:
- Size: 83.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fd6e3943dd5a05ef3fef0ab0ce5f43c1cb6114e00f15e489e1616b5a913d7c4
|
|
| MD5 |
9bf56eb61ad189ca2126b730987cde7f
|
|
| BLAKE2b-256 |
f2440ee97f115e51f5b2fe38fa85cfd0ef10695ca8ca8bea36a50f63ebe08b01
|
Provenance
The following attestation bundles were made for hepdata_mcp-0.1.0.tar.gz:
Publisher:
release.yml on HEPData/hepdata-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hepdata_mcp-0.1.0.tar.gz -
Subject digest:
6fd6e3943dd5a05ef3fef0ab0ce5f43c1cb6114e00f15e489e1616b5a913d7c4 - Sigstore transparency entry: 1437208809
- Sigstore integration time:
-
Permalink:
HEPData/hepdata-mcp@a4a09c3273266f66ae80e7ac223d47265d26fc0e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HEPData
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a4a09c3273266f66ae80e7ac223d47265d26fc0e -
Trigger Event:
push
-
Statement type:
File details
Details for the file hepdata_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hepdata_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f5aba12094e65af0517396ad180831825ceae5c1ed1e120b88f91e8c18bf5eb
|
|
| MD5 |
5c68fe140e15456fd8772595060bc754
|
|
| BLAKE2b-256 |
d34730332e9c566d3d801dfb17e10f8ab6d4a30f764be42e337540a0b0233783
|
Provenance
The following attestation bundles were made for hepdata_mcp-0.1.0-py3-none-any.whl:
Publisher:
release.yml on HEPData/hepdata-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hepdata_mcp-0.1.0-py3-none-any.whl -
Subject digest:
9f5aba12094e65af0517396ad180831825ceae5c1ed1e120b88f91e8c18bf5eb - Sigstore transparency entry: 1437208813
- Sigstore integration time:
-
Permalink:
HEPData/hepdata-mcp@a4a09c3273266f66ae80e7ac223d47265d26fc0e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HEPData
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a4a09c3273266f66ae80e7ac223d47265d26fc0e -
Trigger Event:
push
-
Statement type: