Skip to main content

ami-mcp v0.2.2

Actions Status Documentation Status

PyPI version PyPI platforms

GitHub Discussion

Coverage

An MCP server that wraps ATLAS AMI (ATLAS Metadata Interface) and the PMG cross-section database, exposing them as tools for LLMs. Designed for ATLAS physicists who need to discover MC samples, look up cross-sections and filter efficiencies, and validate PMG hashtag classifications.

What it does

ami-mcp lets Claude (or any MCP-compatible LLM) query ATLAS metadata directly:

  • Discover samples: search for MC datasets by PMG hashtag classification (WeakBoson/Vjets/Baseline), by name pattern, or by arbitrary AMI query
  • Look up metadata: retrieve cross-sections, filter efficiencies, k-factors, dataset provenance, and AMI processing tag info
  • Query cross-section DB: look up DSID entries in the PMG xsec database files (PMGxsecDB_mc16.txt, etc.)
  • Validate samples: check hashtag classifications and compare metadata against the PMG cross-section database
  • General queries: execute arbitrary AMI command strings formulated by the LLM using the ami://query-language resource as a guide

Installation

pip install ami-mcp

Or with pixi (recommended for ATLAS facilities):

pixi add ami-mcp

Requirements

  • Python 3.10 or 3.11 (pyAMI requires <3.12)
  • A valid VOMS proxy (voms-proxy-init -voms atlas)
  • Grid CA certificates (available on CVMFS at ATLAS sites)

Quick start

1. Set up authentication

voms-proxy-init -voms atlas

When installed via pip (not pixi/conda-forge), also set X509_CERT_DIR. On CVMFS-based facilities (e.g. UChicago Analysis Facility, CERN lxplus):

export X509_CERT_DIR=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/etc/grid-security-emi/certificates

When installed via pixi or conda-forge, ca-policy-lcg is included and sets X509_CERT_DIR automatically — no extra step needed.

2. Test the server

ami-mcp serve

The server speaks MCP over stdio. Configure your MCP client to launch it.

3. Configure Claude Code

With pixi (recommended — X509_CERT_DIR is set automatically):

{
  "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"
      }
    }
  }
}

With pip (must set X509_CERT_DIR manually):

{
  "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. Configure Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %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"
      }
    }
  }
}

Available tools

AMI queries

Tool Description
ami_execute Execute any AMI command string (primary power tool)
ami_get_dataset_info Get metadata for a dataset (nFiles, nEvents, status, etc.)
ami_get_dataset_prov Get provenance chain with lineage summary; filter by data type
ami_list_datasets Search for datasets by name pattern (supports % wildcards)

PMG hashtags

Tool Description
ami_search_by_hashtags Find datasets by hashtag combination (e.g. WeakBoson/Vjets/Baseline)
ami_get_dataset_hashtags Look up PMGL1–PMGL4 classification for a dataset

Physics metadata

Tool Description
ami_get_physics_params Get cross-section (nb→pb converted), filter efficiency, k-factor from AMI
ami_get_ami_tag Get AMI processing tag info; accepts tag chains like e8351_s3681_r13144

Cross-section database

Tool Description
ami_list_xsec_databases List available PMGxsecDB_*.txt files
ami_lookup_xsec Look up DSID cross-section, filter eff, k-factor in xsec DB

Validation

Tool Description
ami_validate_sample Check hashtag classification and compare metadata to xsec DB

Example prompts

Once configured, you can ask Claude things like:

  • "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?"

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ami_mcp-0.2.2.tar.gz (134.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ami_mcp-0.2.2-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

Details for the file ami_mcp-0.2.2.tar.gz.

File metadata

  • Download URL: ami_mcp-0.2.2.tar.gz
  • Upload date:
  • Size: 134.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ami_mcp-0.2.2.tar.gz
Algorithm Hash digest
SHA256 8de10c563cfcbe8505631ba5812bda97d0ac82f9739b4ff71aa6cddda40716d2
MD5 c7b9827593ac1ebb9fd795ecba10add5
BLAKE2b-256 e6ddb71ece6c46a401f4f6d8b33351e1ab6ee4b1b70f0351bb8925ff2452081a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ami_mcp-0.2.2.tar.gz:

Publisher: cd.yml on kratsg/ami-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ami_mcp-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: ami_mcp-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ami_mcp-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b17c69b91c3c63616c65e920f8111542b35ad68954ac5ee7852237b45648b856
MD5 ce6961027b96aed58bfb95ca31071612
BLAKE2b-256 70193a6ee98761fa3813a5a360fea3af2fd62397bfbc35864cb130f8e13c5bda

See more details on using hashes here.

Provenance

The following attestation bundles were made for ami_mcp-0.2.2-py3-none-any.whl:

Publisher: cd.yml on kratsg/ami-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page