cern-opendata-mcp-server

v0.3.0 pre-1.0

Search CERN Open Data, fetch records, files, analysis environments, CMS good-run lists, HLT paths via MCP. STDIO or Streamable HTTP.

cern-opendata.caseyjhand.com/mcp
claude mcp add --transport http cern-opendata-mcp-server https://cern-opendata.caseyjhand.com/mcp
codex mcp add cern-opendata-mcp-server --url https://cern-opendata.caseyjhand.com/mcp
{
  "mcpServers": {
    "cern-opendata-mcp-server": {
      "url": "https://cern-opendata.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http cern-opendata-mcp-server https://cern-opendata.caseyjhand.com/mcp
{
  "mcpServers": {
    "cern-opendata-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://cern-opendata.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "cern-opendata-mcp-server": {
      "type": "http",
      "url": "https://cern-opendata.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://cern-opendata.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

7

cern_opendata_search_records

open-world

Search the CERN Open Data Portal's datasets, software, environments, documentation and supplementary records with exact-vocabulary filters and an optional full-text query. The filters are experiment, record type, physics category, keyword, collision energy and type, file format, data-taking year, event count, availability, collection, and LHCb magnet polarity, stripping stream and stripping version. Returns compact hits with recids plus live facet counts. Each facet ignores its own filter, so its counts show the alternatives under the other filters. Filter values are exact upstream; common spellings are normalized, and cern_opendata_list_reference lists the vocabulary. Paging reaches the first 10,000 matches.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cern_opendata_search_records",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "Verbatim OpenSearch query_string: AND between terms, double weight for title matches. Supports title:\"…\", recid:(1 OR 2), run_period:(\"Run2012B\"); cern_opendata_list_reference topic query_syntax lists forms. Omit for filters alone.",
      "type": "string",
      "maxLength": 500
    },
    "type": {
      "description": "Up to 7 types (OR): Dataset, Documentation, Environment, Software, Supplementaries, News, or Primary::Secondary (Dataset::Collision, Dataset::Simulated). Omit for all six primaries; Glossary is excluded.",
      "maxItems": 7,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One type value."
      }
    },
    "experiment": {
      "description": "Up to 9 experiments (OR): ALICE, ATLAS, CMS, DELPHI, JADE, LHCb, OPERA, PHENIX, TOTEM. Case normalized.",
      "maxItems": 9,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One experiment value."
      }
    },
    "collision_energy": {
      "description": "Up to 15 energies (OR), e.g. 7TeV, 8TeV, 13TeV, 5.02TeV. \"13TeV, 13.6TeV\" is one value/item.",
      "maxItems": 15,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One collision_energy value."
      }
    },
    "collision_type": {
      "description": "Up to 6 collision types (OR): pp, PbPb, pPb, e+e-, Interfill. PbPb also matches Pb-Pb.",
      "maxItems": 6,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One collision_type value."
      }
    },
    "file_type": {
      "description": "Up to 20 formats/data tiers (OR): nanoaod, miniaod, aod, root, DAOD_PHYSLITE, csv, etc. Known-value case normalized.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One file_type value."
      }
    },
    "year_from": {
      "description": "Inclusive earliest data-taking year; alone means onward. For one year, set both year bounds to it.",
      "type": "integer",
      "minimum": 1900,
      "maximum": 2100
    },
    "year_to": {
      "description": "Inclusive latest data-taking year; alone means through this year.",
      "type": "integer",
      "minimum": 1900,
      "maximum": 2100
    },
    "min_events": {
      "description": "Minimum number of events, inclusive.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "max_events": {
      "description": "Maximum number of events, inclusive.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "availability": {
      "description": "Up to 4 availability states (OR): online, partial, ondemand (tape; request before download), requested.",
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One availability value."
      }
    },
    "collection": {
      "description": "Up to 10 exact, case-sensitive collections (OR), e.g. CMS-Validated-Runs; copy a record's collections spellings.",
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One collection name, exact and case-sensitive."
      }
    },
    "category": {
      "description": "Up to 20 simulated-dataset categories (OR): primary (Exotica, Higgs Physics, Standard Model Physics, Supersymmetry) or Primary::Secondary (Higgs Physics::Standard Model). Case/separator normalized. Commas stay within an item (Exotica::Heavy Fermions, Heavy Righ-Handed Neutrinos). Heavy-Ion Physics also matches its leading-space spelling. cern_opendata_list_reference topic categories lists all values.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One category value."
      }
    },
    "keywords": {
      "description": "Up to 10 verbatim, case-sensitive keywords (OR); Education differs from education. A comma within a keyword stays in one item.",
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One keyword, exact and case-sensitive."
      }
    },
    "magnet_polarity": {
      "description": "Up to 2 LHCb collision-dataset polarities (OR): MagDown, MagUp. Case normalized.",
      "maxItems": 2,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One magnet_polarity value."
      }
    },
    "stripping_stream": {
      "description": "Up to 11 LHCb stripping streams (OR), e.g. BHADRON, CHARM, DIMUON, EW, LEPTONIC; also matches stripping docs. Case normalized. cern_opendata_list_reference topic lhcb lists them.",
      "maxItems": 11,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One stripping_stream value."
      }
    },
    "stripping_version": {
      "description": "Up to 12 LHCb stripping versions (OR), e.g. stripping21, stripping21r1p2. Case normalized.",
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "description": "One stripping_version value."
      }
    },
    "sort": {
      "description": "bestmatch (relevance), mostrecent (by date_published, newest first), title (A-Z) or title_desc (Z-A). Omitted: bestmatch with a query, mostrecent (newest first) without.",
      "type": "string",
      "enum": [
        "bestmatch",
        "mostrecent",
        "title",
        "title_desc"
      ]
    },
    "limit": {
      "description": "Hits per page, 1-50. A value above 50 is served at 50.",
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "page": {
      "description": "Page number, from 1, counting pages of the limit applied. page × limit may not exceed 10,000.",
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

cern_opendata_get_records

open-world

Fetch full metadata for 1-20 records in one call, by recid, DOI, CMS dataset path (/Primary/Era/TIER) or documentation slug. Returns the description, run periods, collision and distribution details, related records, a software-environment summary, the license and a ready citation, plus what a record states of its variable dictionary, physics category, pile-up, keywords, and LHCb magnet polarity and stripping. Documentation and news pages include their markdown body in slices of at most 30,000 characters; body_offset with that one id reads on from where a slice stops. Each response holds to 64,000 bytes, except that the first record always comes back whole: records past the budget, and ids past the first 20, are listed under deferred, to pass back as ids. File lists are not included; use cern_opendata_list_files. Identifiers that do not resolve come back under missing with guidance; they do not fail the call.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cern_opendata_get_records",
    "arguments": {
      "ids": "<ids>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ids": {
      "description": "Identifiers to resolve: up to 100, of which the first 20 distinct are looked up and the rest returned under deferred. Forms may be mixed; exact duplicates collapse.",
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 500,
        "description": "One identifier: a recid (6004 or atlas-160006, recid:6004 or a portal record URL), a DOI (10.7483/OPENDATA.CMS.YLIC.86ZZ, doi:… or a doi.org URL), a CMS dataset path (/DoubleMuParked/Run2012B-22Jan2013-v1/AOD) or a documentation slug (cms-guide-docker or its portal URL)."
      }
    },
    "body_offset": {
      "description": "With exactly one documentation or news id: where its body slice starts, in characters (UTF-16 code units), usually the body_next_offset an earlier call returned. 0 (the default) is the body's start and is accepted with any ids; above 0 needs exactly one id.",
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "ids",
    "body_offset"
  ],
  "additionalProperties": false
}
view source ↗

cern_opendata_list_files

open-world

List one record's files: its file indexes (groups of up to ~1,500 files) with their XRootD URI-list URLs, and per file the XRootD URI, HTTPS download URL, size, adler32 checksum and availability. Without index, returns the record's indexes and its regular files; with index, reads only that index and pages through its files. Files marked on demand sit on tape and must be requested on the record's portal page before download.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cern_opendata_list_files",
    "arguments": {
      "recid": "<recid>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "recid": {
      "description": "Record id: up to 12 digits (6004), optionally after a lowercase experiment prefix (atlas-160006). cern_opendata_search_records and cern_opendata_get_records return it.",
      "type": "string",
      "pattern": "^(?:[a-z]{1,16}-)?\\d{1,12}$"
    },
    "index": {
      "description": "A file index key from the indexes list, matched exactly (a .txt ending is read as .json). Omit to list the record's indexes and regular files.",
      "type": "string",
      "maxLength": 300
    },
    "cursor": {
      "description": "next_cursor from the previous page, unchanged, with the same recid and index. Omit for the first page.",
      "type": "string",
      "maxLength": 500
    },
    "limit": {
      "description": "Files per page, 1-500. A value above 500 is served at 500.",
      "default": 50,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    }
  },
  "required": [
    "recid",
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

cern_opendata_get_analysis_env

open-world

Assemble what is needed to analyse a record: its container images, CMSSW release and global tag; the condition-data, VM and validated-run records for its run periods; example software that declares it works with the record; and quoted sections of the guides the record links (the first two are fetched). Container images, software and guide code are licensed separately from the CC0 data. Use cern_opendata_list_files for the record's files.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cern_opendata_get_analysis_env",
    "arguments": {
      "recid": "<recid>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "recid": {
      "description": "Record id: up to 12 digits (6004), optionally after a lowercase experiment prefix (cms-93956). cern_opendata_search_records and cern_opendata_get_records return it.",
      "type": "string",
      "pattern": "^(?:[a-z]{1,16}-)?\\d{1,12}$"
    }
  },
  "required": [
    "recid"
  ],
  "additionalProperties": false
}
view source ↗

cern_opendata_get_validated_runs

open-world

Get a CMS validated-run (good-run) list, which certifies the luminosity sections that are good for physics in each run. Select it by a CMS collision dataset recid, a validated-run list recid, or a run period such as Run2012B (give exactly one of recid and run_period). Choose the full validation or the muons-only variant, and narrow to a run range; a dataset recid defaults the range to the first and last run the dataset lists. Returns the runs with their luminosity-section ranges and the list file download URL. CMS only.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cern_opendata_get_validated_runs",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "recid": {
      "description": "A CMS collision dataset recid (its linked list is used) or a validated-run list recid (used as named): up to 12 digits, optionally after a lowercase experiment prefix (cms-93956). Give this or run_period.",
      "type": "string",
      "pattern": "^(?:[a-z]{1,16}-)?\\d{1,12}$"
    },
    "run_period": {
      "description": "A CMS run period such as Run2012B, matched case-insensitively; 2012B also matches Run2012B. Give this or recid. cern_opendata_list_reference with topic run_periods lists them.",
      "type": "string",
      "maxLength": 40
    },
    "variant": {
      "description": "full (every detector certified) or muons_only (certified for muon physics). Omitted: a list recid is used as named; a dataset recid or run_period selects full.",
      "type": "string",
      "enum": [
        "full",
        "muons_only"
      ]
    },
    "run_min": {
      "description": "Lowest run to return, inclusive. With a dataset recid and neither bound set, run_min and run_max default to the first and last run the dataset lists; run_bounds echoes the range applied.",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "run_max": {
      "description": "Highest run to return, inclusive. Defaults with run_min for a dataset recid.",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Runs to return, 1-2000. A value above 2000 is served at 2000.",
      "default": 200,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    }
  },
  "required": [
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

cern_opendata_search_trigger_paths

open-world

Look up CMS High-Level Trigger paths by exact name (HLT_IsoMu24) or prefix pattern (HLT_IsoMu*), optionally for one data-taking year. Paths outside the HLT_ family, such as AlCa_EcalPi0, DST_ and DQM_ paths, output modules and HLTriggerFinalPath, are found by their own names, in the case given. Each match is a per-year path record parsed into the primary datasets its title names, the first and last run the path was seen online, per-version run ranges, the L1 seed, and links to the HLT menu records. Covers CMS open data from 2011-2016. Prescale factors are not returned: each HLT menu record holds a configuration file (cern_opendata_list_files with a menu_recid) whose PrescaleService block lists the prescale in each column of every path it prescales (a path it leaves out has prescale 1), and the CMS luminosity records (collection CMS-Luminosity-Information) hold prescale files that log which column applied by run and luminosity section.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cern_opendata_search_trigger_paths",
    "arguments": {
      "path": "<path>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "path": {
      "description": "Trigger path name (HLT_IsoMu24, AlCa_EcalPi0) or prefix with one trailing wildcard (HLT_IsoMu*): a letter or digit, then letters, digits and underscores. A path starting HLT_ in any case is searched as given, with the prefix case fixed, and matches path names in any case. Any other path is matched against record path names in the case given, the whole name or, with a trailing *, its start (AlCa_EcalPi0, AlCa_*), and is also searched with HLT_ prepended (IsoMu24 finds HLT_IsoMu24, 60Jet10 finds HLT_60Jet10). A trailing version suffix (_v3 or _v*) is dropped, since records list versions as V<n>.",
      "type": "string",
      "maxLength": 200,
      "pattern": "^(?:HLT_[A-Za-z0-9_]+|[0-9A-GI-Za-z][A-Za-z0-9_]*|H(?:[A-KM-Za-z0-9_][A-Za-z0-9_]*)?|HL(?:[A-SU-Za-z0-9_][A-Za-z0-9_]*)?|HLT(?:[A-Za-z0-9][A-Za-z0-9_]*)?)\\*?$"
    },
    "year": {
      "description": "Data-taking year, such as 2012. Trigger records cover 2011-2016.",
      "type": "integer",
      "minimum": 2000,
      "maximum": 2100
    },
    "limit": {
      "description": "Records per page, 1-50. A value above 50 is served at 50.",
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "page": {
      "description": "Page number, from 1, counting pages of the limit applied. page × limit may not exceed 10,000.",
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "path",
    "limit",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

cern_opendata_list_reference

Decode the vocabulary the other cern_opendata tools accept: experiments, record types, collision energies and types, file formats and data tiers, availability states, physics categories, LHCb magnet polarities and stripping streams and versions, identifier forms, query syntax, licensing, and the CMS run periods that have validated-run lists. Static and offline; omit topic for every table.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "cern_opendata_list_reference",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "topic": {
      "description": "One table to return: experiments, record_types, collision_energies, collision_types, file_types, availability, categories, lhcb, identifiers, query_syntax, licensing or run_periods. Omit for every table.",
      "type": "string",
      "enum": [
        "experiments",
        "record_types",
        "collision_energies",
        "collision_types",
        "file_types",
        "availability",
        "categories",
        "lhcb",
        "identifiers",
        "query_syntax",
        "licensing",
        "run_periods"
      ]
    }
  },
  "additionalProperties": false
}
view source ↗

Resources

1

One CERN Open Data Portal record's metadata by recid: description, run periods, collision and distribution details, related records, software-environment summary, license and citation, plus any variable dictionary, physics category, pile-up, keywords, and LHCb magnet polarity and stripping. File lists are not included. Tool coverage: cern_opendata_get_records.

uri cern-opendata://record/{recid} mime application/json

Extensions

1

io.modelcontextprotocol/skills

{
  "directoryRead": true
}