ami-mcp
ami-mcp v0.2.1
一个封装了 ATLAS AMI(ATLAS 元数据接口)和 PMG 横截面数据库的 MCP 服务器,将其作为工具暴露给 LLM。专为需要发现 MC 样本、查找横截面和过滤效率以及验证 PMG 标签分类的 ATLAS 物理学家而设计。
功能介绍
ami-mcp 让 Claude(或任何兼容 MCP 的 LLM)能够直接查询 ATLAS 元数据:
发现样本:通过 PMG 标签分类(WeakBoson/Vjets/Baseline)、名称模式或任意 AMI 查询来搜索 MC 数据集
查找元数据:检索横截面、过滤效率、k-因子、数据集来源和 AMI 处理标签信息
查询横截面数据库:在 PMG xsec 数据库文件(PMGxsecDB_mc16.txt 等)中查找 DSID 条目
验证样本:检查标签分类并将元数据与 PMG 横截面数据库进行比较
通用查询:使用
ami://query-language资源作为指南,执行由 LLM 构思的任意 AMI 命令字符串
Related MCP server: rucio-mcp
安装
pip install ami-mcp或者使用 pixi(推荐用于 ATLAS 设施):
pixi add ami-mcp要求
Python 3.10 或 3.11 (pyAMI 需要
<3.12)有效的 VOMS 代理 (
voms-proxy-init -voms atlas)网格 CA 证书(在 ATLAS 站点的 CVMFS 上可用)
快速入门
1. 设置身份验证
voms-proxy-init -voms atlas通过 pip 安装时(非 pixi/conda-forge),还需要设置 X509_CERT_DIR。在基于 CVMFS 的设施(例如 UChicago 分析设施、CERN lxplus)上:
export X509_CERT_DIR=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/etc/grid-security-emi/certificates通过 pixi 或 conda-forge 安装时,已包含 ca-policy-lcg 并会自动设置 X509_CERT_DIR — 无需额外步骤。
2. 测试服务器
ami-mcp serve服务器通过 stdio 使用 MCP 协议。配置您的 MCP 客户端以启动它。
3. 配置 Claude Code
使用 pixi(推荐 — X509_CERT_DIR 会自动设置):
{
"mcpServers": {
"ami": {
"type": "stdio",
"command": "pixi",
"args": ["run", "ami-mcp", "serve"],
"env": {
"ATLAS_PMGXSEC_PATH": "/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/dev/PMGTools"
}
}
}
}使用 pip(必须手动设置 X509_CERT_DIR):
{
"mcpServers": {
"ami": {
"command": "ami-mcp",
"args": ["serve"],
"env": {
"X509_CERT_DIR": "/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/etc/grid-security-emi/certificates",
"ATLAS_PMGXSEC_PATH": "/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/dev/PMGTools"
}
}
}
}4. 配置 Claude Desktop
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"ami": {
"command": "ami-mcp",
"args": ["serve"],
"env": {
"X509_CERT_DIR": "/path/to/ca-certificates",
"ATLAS_PMGXSEC_PATH": "/path/to/PMGTools"
}
}
}
}可用工具
AMI 查询
工具 | 描述 |
| 执行任何 AMI 命令字符串(主要功能工具) |
| 获取数据集的元数据(nFiles, nEvents, 状态等) |
| 获取包含谱系摘要的来源链;按数据类型过滤 |
| 按名称模式搜索数据集(支持 |
PMG 标签
工具 | 描述 |
| 通过标签组合查找数据集(例如 WeakBoson/Vjets/Baseline) |
| 查找数据集的 PMGL1–PMGL4 分类 |
物理元数据
工具 | 描述 |
| 从 AMI 获取横截面(nb→pb 转换)、过滤效率、k-因子 |
| 获取 AMI 处理标签信息;接受如 |
横截面数据库
工具 | 描述 |
| 列出可用的 PMGxsecDB_*.txt 文件 |
| 在 xsec 数据库中查找 DSID 横截面、过滤效率、k-因子 |
验证
工具 | 描述 |
| 检查标签分类并将元数据与 xsec 数据库进行比较 |
示例提示词
配置完成后,您可以询问 Claude 如下问题:
"Find all Baseline WeakBoson/Vjets samples in mc21_13TeV"
"What are the cross-section and filter efficiency for DSID 700320?"
"Look up the hashtag classification for this EVNT dataset"
"Validate these samples against the mc21 cross-section database"
"Show me the provenance chain for this DAOD dataset"
"What AMI tag e8351 corresponds to — which generator version?"
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for searching Airweave collections with natural language queries.
An MCP server that provides congressional transcripts
Related MCP Servers
- AlicenseAqualityAmaintenanceAn 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.154AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceAn MCP server that exposes Rucio distributed data management operations as tools for LLMs. Designed for ATLAS physicists working with grid data on analysis facilities, but usable with any Rucio instance.42 PyPI6Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for ATLAS Open Data that enables LLMs to discover, query, and retrieve public datasets and metadata from the ATLAS experiment at CERN.2Apache 2.0
- FlicenseNot gradedqualityDmaintenanceMCP server for the CMS File Integrity Checker. Enables users to submit and query file integrity jobs through natural language.-