hepdata-mcp

hepdata-mcp

Enables discovery of HEPData records, tables, and data access with read-only operations and export links.

Category
访问服务器

README

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.

Run From PyPI

HEPData MCP is published on PyPI as hepdata-mcp. The easiest way to run it is with uvx:

uvx hepdata-mcp

If you want to avoid package resolution during MCP client startup, install the tool once:

uv tool install hepdata-mcp
hepdata-mcp

Upgrade that installed tool with uv tool upgrade hepdata-mcp. For MCP client configs in this mode, use hepdata-mcp as the command with no arguments.

Install From Source

For development, install this checkout in editable mode:

git clone https://github.com/HEPData/hepdata-mcp ~/.local/uv/hepdata-mcp-src
cd ~/.local/uv/hepdata-mcp-src
uv sync --all-groups

For development checks:

uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy

Docker

The Docker image is published on Docker Hub as hepdata/hepdata-mcp. Pull the latest release:

docker pull hepdata/hepdata-mcp:latest

For reproducible deployments, pin a release tag such as hepdata/hepdata-mcp:0.1.0.

Run over stdio for clients that can launch Docker commands:

docker run --rm -i hepdata/hepdata-mcp:latest

Example stdio client command:

{
  "mcpServers": {
    "hepdata": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "hepdata/hepdata-mcp:latest"]
    }
  }
}

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/hepdata-mcp:latest \
  --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.

Build the image from this checkout for local development:

docker build -t hepdata-mcp:local .

Tools

  • search_records
  • get_record
  • list_tables
  • describe_table
  • get_table
  • get_record_exports
  • get_record_versions
  • get_jsonld
  • server_info

Resources:

  • hepdata://record/{identifier}
  • hepdata://record/{identifier}/tables

Local MCP Client Setup

Most MCP clients launch commands directly, without a shell. Use uvx as the command and pass the package name as an argument.

Warm the uvx cache once before configuring a client, especially on machines with slow or restricted network access:

uvx hepdata-mcp --help

Useful variants:

uvx hepdata-mcp==0.1.0
uvx --refresh hepdata-mcp

If a GUI-launched client cannot find uvx, check where uvx is installed with command -v uvx and use that path as the command. On macOS this is commonly needed for clients such as Claude Code; Homebrew installs often use /opt/homebrew/bin/uvx, while standalone uv installs may use /Users/<you>/.local/bin/uvx. Use the expanded absolute path because MCP clients usually do not expand ~ or $HOME.

GitHub Copilot In VS Code

Create or edit .vscode/mcp.json:

{
  "servers": {
    "hepdata": {
      "command": "uvx",
      "args": ["hepdata-mcp"]
    }
  }
}

Then run MCP: List Servers from the VS Code command palette and start hepdata.

For GitHub Copilot CLI:

copilot mcp add hepdata --type stdio -- uvx hepdata-mcp

Codex

Add to ~/.codex/config.toml:

[mcp_servers.hepdata]
command = "uvx"
args = ["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": "uvx",
      "args": ["hepdata-mcp"]
    }
  }
}

On macOS, if Claude Code cannot find uvx, expand the command:

{
  "mcpServers": {
    "hepdata": {
      "type": "stdio",
      "command": "/opt/homebrew/bin/uvx",
      "args": ["hepdata-mcp"]
    }
  }
}

CLI alternative:

claude mcp add-json hepdata '{"type":"stdio","command":"uvx","args":["hepdata-mcp"]}'

Qwen Code

Add to ~/.qwen/settings.json or .qwen/settings.json:

{
  "mcpServers": {
    "hepdata": {
      "command": "uvx",
      "args": ["hepdata-mcp"],
      "timeout": 30000,
      "trust": false
    }
  }
}

Other MCP Clients

Most stdio MCP clients support a similar shape:

{
  "mcpServers": {
    "hepdata": {
      "command": "uvx",
      "args": ["hepdata-mcp"]
    }
  }
}

HTTP Mode

Start local streamable HTTP:

uvx 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 \
uvx 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选