@cyanheads/cern-opendata-mcp-server

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

7 Tools • 1 Record Resource • 1 Agent Skill

[![Version](https://img.shields.io/badge/Version-0.5.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/cern-opendata-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.4.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/cern-opendata-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/cern-opendata-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.4-blueviolet.svg?style=flat-square)](https://bun.sh/)
[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/cern-opendata-mcp-server/releases/latest/download/cern-opendata-mcp-server.mcpb) [![Install in Codex](https://img.shields.io/badge/Install_in-Codex-000000?style=for-the-badge&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU%2BT3BlbkFJPC90aXRsZT48cGF0aCBmaWxsPSJ3aGl0ZSIgZD0iTTIyLjI4MTkgOS44MjExYTUuOTg0NyA1Ljk4NDcgMCAwIDAtLjUxNTctNC45MTA4IDYuMDQ2MiA2LjA0NjIgMCAwIDAtNi41MDk4LTIuOUE2LjA2NTEgNi4wNjUxIDAgMCAwIDQuOTgwNyA0LjE4MThhNS45ODQ3IDUuOTg0NyAwIDAgMC0zLjk5NzcgMi45IDYuMDQ2MiA2LjA0NjIgMCAwIDAgLjc0MjcgNy4wOTY2IDUuOTggNS45OCAwIDAgMCAuNTExIDQuOTEwNyA2LjA1MSA2LjA1MSAwIDAgMCA2LjUxNDYgMi45MDAxQTUuOTg0NyA1Ljk4NDcgMCAwIDAgMTMuMjU5OSAyNGE2LjA1NTcgNi4wNTU3IDAgMCAwIDUuNzcxOC00LjIwNTggNS45ODk0IDUuOTg5NCAwIDAgMCAzLjk5NzctMi45MDAxIDYuMDU1NyA2LjA1NTcgMCAwIDAtLjc0NzUtNy4wNzI5em0tOS4wMjIgMTIuNjA4MWE0LjQ3NTUgNC40NzU1IDAgMCAxLTIuODc2NC0xLjA0MDhsLjE0MTktLjA4MDQgNC43NzgzLTIuNzU4MmEuNzk0OC43OTQ4IDAgMCAwIC4zOTI3LS42ODEzdi02LjczNjlsMi4wMiAxLjE2ODZhLjA3MS4wNzEgMCAwIDEgLjAzOC4wNTJ2NS41ODI2YTQuNTA0IDQuNTA0IDAgMCAxLTQuNDk0NSA0LjQ5NDR6bS05LjY2MDctNC4xMjU0YTQuNDcwOCA0LjQ3MDggMCAwIDEtLjUzNDYtMy4wMTM3bC4xNDIuMDg1MiA0Ljc4MyAyLjc1ODJhLjc3MTIuNzcxMiAwIDAgMCAuNzgwNiAwbDUuODQyOC0zLjM2ODV2Mi4zMzI0YS4wODA0LjA4MDQgMCAwIDEtLjAzMzIuMDYxNUw5Ljc0IDE5Ljk1MDJhNC40OTkyIDQuNDk5MiAwIDAgMS02LjE0MDgtMS42NDY0ek0yLjM0MDggNy44OTU2YTQuNDg1IDQuNDg1IDAgMCAxIDIuMzY1NS0xLjk3MjhWMTEuNmEuNzY2NC43NjY0IDAgMCAwIC4zODc5LjY3NjVsNS44MTQ0IDMuMzU0My0yLjAyMDEgMS4xNjg1YS4wNzU3LjA3NTcgMCAwIDEtLjA3MSAwbC00LjgzMDMtMi43ODY1QTQuNTA0IDQuNTA0IDAgMCAxIDIuMzQwOCA3Ljg3MnptMTYuNTk2MyAzLjg1NThMMTMuMTAzOCA4LjM2NCAxNS4xMTkyIDcuMmEuMDc1Ny4wNzU3IDAgMCAxIC4wNzEgMGw0LjgzMDMgMi43OTEzYTQuNDk0NCA0LjQ5NDQgMCAwIDEtLjY3NjUgOC4xMDQydi01LjY3NzJhLjc5Ljc5IDAgMCAwLS40MDctLjY2N3ptMi4wMTA3LTMuMDIzMWwtLjE0Mi0uMDg1Mi00Ljc3MzUtMi43ODE4YS43NzU5Ljc3NTkgMCAwIDAtLjc4NTQgMEw5LjQwOSA5LjIyOTdWNi44OTc0YS4wNjYyLjA2NjIgMCAwIDEgLjAyODQtLjA2MTVsNC44MzAzLTIuNzg2NmE0LjQ5OTIgNC40OTkyIDAgMCAxIDYuNjgwMiA0LjY2ek04LjMwNjUgMTIuODYzbC0yLjAyLTEuMTYzOGEuMDgwNC4wODA0IDAgMCAxLS4wMzgtLjA1NjdWNi4wNzQyYTQuNDk5MiA0LjQ5OTIgMCAwIDEgNy4zNzU3LTMuNDUzN2wtLjE0Mi4wODA1TDguNzA0IDUuNDU5YS43OTQ4Ljc5NDggMCAwIDAtLjM5MjcuNjgxM3ptMS4wOTc2LTIuMzY1NGwyLjYwMi0xLjQ5OTggMi42MDY5IDEuNDk5OHYyLjk5OTRsLTIuNTk3NCAxLjQ5OTctMi42MDY3LTEuNDk5N1oiLz48L3N2Zz4%3D)](https://developers.openai.com/codex/mcp) [![Install in GitHub Copilot](https://img.shields.io/badge/Install_in-GitHub_Copilot-000000?style=for-the-badge&logo=githubcopilot&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22cern-opendata-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fcern-opendata-mcp-server%22%5D%7D) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
**Public Hosted Server:** [https://cern-opendata.caseyjhand.com/mcp](https://cern-opendata.caseyjhand.com/mcp)
--- ## Overview Particle-physics data from the CERN Open Data Portal: collision and simulated datasets, analysis software, and documentation from ALICE, ATLAS, CMS, LHCb, and more. Search with live facet counts, open records with license and citation, list data files, assemble a record's analysis environment, and look up CMS good-run lists and trigger paths. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above. ### Tools | Tool | Description | |:---|:---| | `cern_opendata_search_records` | Search datasets, software, environments, documentation and supplementary records with exact-vocabulary filters and live facet counts | | `cern_opendata_get_records` | Fetch full metadata for up to 20 records a call by recid, DOI, CMS dataset path or documentation slug, with license and citation | | `cern_opendata_list_files` | Page through a record's file indexes and files: XRootD URIs, HTTPS URLs, sizes, checksums, tape availability | | `cern_opendata_get_analysis_env` | Assemble a record's analysis environment: container images, CMSSW release, global tag, linked environment and software records, guide sections | | `cern_opendata_get_validated_runs` | Get a CMS validated-run (good-run) list for a dataset, a list or a run period, with luminosity-section ranges | | `cern_opendata_search_trigger_paths` | Look up CMS High-Level Trigger paths by name or prefix, parsed into run ranges, versions and L1 seeds | | `cern_opendata_list_reference` | Decode the vocabulary the other tools accept: experiments, record types, energies, formats, physics categories, LHCb stripping, identifiers, query syntax, licensing, run periods | ### Resources | Resource | Description | |:---|:---| | `cern-opendata://record/{recid}` | One record's metadata, license and citation, in the `cern_opendata_get_records` record shape | Tool-only clients get the same data from `cern_opendata_get_records`. ### Agent skill [`cern-opendata-guide`](./skills/cern-opendata-guide/SKILL.md) connects dataset discovery, file indexes, analysis environments, CMS certification and trigger evidence. It covers identifier sources and checks to make before treating a result as complete. The guide ships with plugin installs, npm, Docker and the Claude Desktop bundle. MCP clients can discover it through the Skills extension and its SDK-generated skill resources, alongside the record resource above. No prompts are registered. ## Capability reference ### `cern_opendata_search_records` tool - Optional `query` (an OpenSearch `query_string`, up to 500 characters) plus OR-list filters `type`, `experiment`, `category` (physics category, `Higgs Physics::Standard Model`), `keywords`, `collision_energy`, `collision_type`, `file_type`, `availability`, `collection`, and the LHCb `magnet_polarity`, `stripping_stream` and `stripping_version`, each an array of values; `year_from`/`year_to` and `min_events`/`max_events` bound the data-taking year and event count - `sort` (`bestmatch`, `mostrecent` for newest `date_published` first, `title`, `title_desc`), `limit` up to 1,000 (default 10) and `page` from 1, counting pages of the limit applied. `page × limit` past 10,000 fails as `page_window_exceeded` - Compact `hits` with recids, plus thirteen live `facets` that each ignore their own filter (`type` and `category` with up to 10 secondary values each, and `subtypes_other_count` or `subcategories_other_count` when the portal cuts that list); `applied_filters` echoes what ran, and values outside the verified vocabulary appear under `unrecognized_values` --- ### `cern_opendata_get_records` tool - Mix up to 1,000 distinct recids, DOIs, CMS dataset paths or documentation slugs in `ids` (100 in strict mode). The first 20 are looked up. Pass `deferred` back as `ids` to continue. CMS paths accept either spelling of `/Primary/Era/TIER`. CERN record URLs and experiment-prefixed aliases resolve to the canonical recid. - Search hits and record distributions include `number_entries` when the deposit states it. Jet-training samples can report entries independently of collision events. - Each record carries a `license` with its `basis` (`record`, `cern_terms_default`, `not_stated`) and, when it has a DOI, a ready `citation` - Documentation and news bodies come in slices of up to 30,000 characters: `body_offset` with that one id reads on from the `body_next_offset` the last slice returned - Simulated datasets can include ordered `methodology_steps` and a `cross_section` with the portal’s values and units. Set `include_scripts: true` to retrieve inline production scripts as text. When scripts are omitted, the record gives their count and the call to retrieve them. - Records also return what they state of a `variables` dictionary (name, type, unit, description), a physics `category`, pile-up (`pileup_html`, with the pile-up datasets under `links`), `keywords`, and the LHCb `magnet_polarity` and `stripping` stream and version - Unresolved identifiers land in `missing` with `interpreted_as` and guidance instead of failing the call; file lists come from `cern_opendata_list_files` --- ### `cern_opendata_list_files` tool - Without `index`, a record page lists file indexes first, then regular files. With an index key, it pages through that index’s member files. - `limit` up to 2,000 (default 50), continued with `next_cursor`; each file carries `xrootd_uri`, `size_in_bytes`, `checksum` and `availability`, an `https_url` when one can be built from its key or EOS path, and `key` or `filename` as the portal states them, and each index a `uri_list_url` listing every XRootD URI in it - Files marked `on demand` sit on tape and must be requested on the record's portal page first; an umbrella record with no files of its own returns its child recids under `children` --- ### `cern_opendata_get_analysis_env` tool - `recid` is required. `software` carries the record's own container images, analysis release, global tag and environment recid. When only production-step releases are available, the notice points to `methodology_steps[].release` in the full record. - `environment_records` (condition, VM, validation) for the record's run periods and `example_software` that declares it works with the record, up to 50 between them; `guides` quotes the linked section of the first two portal guides, each capped at 12,000 characters, with the `[label]: url` reference definitions the quote links through from elsewhere in the guide, and a cut names the `cern_opendata_get_records` `body_offset` that reads on from it - Always `separately_licensed: true`; linked records or guides that can't be read leave a `notice` instead of failing the call --- ### `cern_opendata_get_validated_runs` tool - Exactly one of `recid` (a CMS collision dataset or a validated-run list) or `run_period` (`Run2012B`; `2012B` also matches); `variant` `full` or `muons_only`; `run_min`/`run_max`; `limit` up to 2,000 (default 200) - With neither bound supplied, a dataset `recid` uses its first and last listed runs as `run_bounds`. A period selects a certification list that may span several periods. Use a dataset recid or specify run bounds to narrow the rows. The summary covers the whole selected list. When several lists match, `matched_lists` names them and no runs are read. - Each run carries `lumi_sections` and `lumi_ranges`; `list.https_url` downloads the whole list file. CMS only: other records fail as `no_validated_runs` --- ### `cern_opendata_search_trigger_paths` tool - `path` matches the path in the record title before counting or paging. Supply an exact name (`HLT_IsoMu24`, `AlCa_EcalPi0`) or a prefix with one trailing `*` (`HLT_IsoMu*`). HLT matching is case-insensitive. A name without `HLT_` also matches non-HLT paths in the supplied case. A `_v` version suffix is dropped. Optional inputs are `year`, `limit` up to 625 (default 10), and `page`. - Each per-year record is parsed into the primary `datasets` its title names, `first_seen`, `last_seen`, per-version run ranges with their `l1_seed`, and HLT menu record links; `parsed: false` marks a record to read from its `abstract_html` - CMS open data from 2011–2016 only --- ### `cern_opendata_list_reference` tool - Optional `topic`: `experiments`, `record_types`, `collision_energies`, `collision_types`, `file_types`, `availability`, `categories`, `lhcb`, `identifiers`, `query_syntax`, `licensing` or `run_periods`; omit it for every table - Static and offline; `categories`, `lhcb` and `run_periods` are dated snapshots, while the search facets and `cern_opendata_get_validated_runs` read the live portal --- ### `cern-opendata://record/{recid}` resource - One record by `recid` (`6004`, or a prefixed recid such as `atlas-160006`; leading zeros ignored) as `application/json`, in the `cern_opendata_get_records` record shape: metadata (including production steps and cross section when stated), license and citation, with inline scripts omitted - `recid` comes from `cern_opendata_search_records`; reads carry a 15-minute public cache hint ## Features Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): stdio and Streamable HTTP transports, pluggable auth (`none` / `jwt` / `oauth`), swappable storage (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`), structured logging with optional OpenTelemetry tracing. CERN Open Data-specific: - Keyless and read-only; it never stages tape files or writes anything - One shared pacer at 50 requests a minute, under the portal's published 60 per client IP, and one 50-second deadline per call across queue wait and retries - Filter values canonicalized against the portal's verified vocabulary (`13 tev` → `13TeV`, `lhcb` → `LHCb`, `Pb-Pb` → `PbPb`, `dataset/collision` → `Dataset::Collision`); unknown values are sent as given and flagged - Tape-resident (`ondemand`) records are included in every search and lookup, where the portal otherwise drops them silently - File manifests, and file indexes read on their own, are cached for 15 minutes, so paging through a record's or an index's files costs one read - Lookup hits are cached for 15 minutes within an 8 MiB cache shared by the record tool and resource. A repeated lookup or body continuation reuses a cached hit. Agent-friendly output: HTML image sources and alt text survive as literal `![alt](url)` references within the existing fenced or escaped text rendering; they do not become active image embeds. Original HTML remains available in `structuredContent`. - Provenance on every response: `portal_url` on each hit and record, a `license` with its `basis`, a DOI `citation`, and `applied_filters` or `effectiveQuery` echoing what ran - Graceful partial results: unresolved ids land under `missing` with guidance, and unreadable linked records or guides in `cern_opendata_get_analysis_env` surface as a `notice` rather than a failure - Discriminated outputs: `kind`, `license.basis`, `interpreted_as`, `scope`, `variant`, `run_bounds.source` and `parsed` let callers branch on data, not string parsing - Portal text kept as data: titles, descriptions, guide sections and file names are fenced or escaped in `content[]` and relayed as received (HTML in `_html` fields) in `structuredContent` ## Data and licensing Portal metadata and datasets are CC0 under the [CERN Open Data Terms of Use](https://opendata.cern.ch/docs/terms-of-use). Software, container images, documentation and guide code are licensed separately, per record (software is commonly GPL). `cern_opendata_get_records` reports each record's license and its basis: `record` when the record states one, `cern_terms_default` for a dataset that states none (CC0), and `not_stated` otherwise. CERN asks reusers to cite each dataset's DOI in applications and publications; `cern_opendata_get_records` returns a ready citation for every record with a DOI. This server is an independent project and is not affiliated with or endorsed by CERN. ## Known limitations - **60 requests a minute per client IP.** The portal publishes this limit; the server paces itself to 50 a minute, and a call that cannot start within its deadline fails as `rate_limited` with `retryAfter`. A hosted deployment shares one budget across every user behind its egress IP. `cern_opendata_get_analysis_env` and `cern_opendata_get_validated_runs` cost 2–4 requests each. - **10,000-result window.** Search and trigger-path paging reach only the first 10,000 matches; narrow deeper result sets with filters. - **Facet lists are partial.** Terms facets return the first 10 values alphabetically (`file_type` up to 100), with the rest counted in `other_count`, and each `type` and `category` bucket its first 10 secondary values, with the rest counted in `subtypes_other_count` or `subcategories_other_count` (an unfiltered search hides `Supplementaries::Trigger` this way). These are summed counts of values, not record counts; `cern_opendata_list_reference` lists every value, and a `Primary::Secondary` filter's `totalCount` counts its records. - **Tape-resident files.** Files with availability `on demand` must be requested on the record's portal page before download; staging them is a write and out of scope. A record whose availability is `ondemand` lists none of its files through the API, so `cern_opendata_list_files` reports only the count and size its metadata states. - **CMS-only run lists and triggers.** Trigger records cover 2011–2016, and trigger detail is limited to what each record's abstract states. `cern_opendata_search_trigger_paths` returns no prescale factors: they are in each HLT menu record's configuration file (its `PrescaleService` block, listed by `cern_opendata_list_files` with the `menu_recid`), and the CMS luminosity records (collection `CMS-Luminosity-Information`) log which prescale column applied by run and luminosity section. Muons-only run lists do not exist for Commissioning2010, Run2010B or the 2011 ReReco list. - **Glossary entries are not served.** The portal's glossary links answer 404, so search excludes them. ## Getting started Connect to the hosted instance, no install: ```sh claude mcp add --transport http cern-opendata-mcp-server https://cern-opendata.caseyjhand.com/mcp ``` Every caller of the hosted instance shares one portal request budget of 50 requests a minute. For sustained use, run your own instance. Or run it locally: ```sh claude mcp add cern-opendata-mcp-server -- npx -y @cyanheads/cern-opendata-mcp-server ``` For other clients, add this to the MCP config file: ```json { "mcpServers": { "cern-opendata-mcp-server": { "command": "npx", "args": ["-y", "@cyanheads/cern-opendata-mcp-server"] } } } ``` No API key or account is required. For Docker or a source build, see [Running the server](#running-the-server). ## Configuration By default, a list tool serves an oversized `limit` at its cap and reports the applied value. To continue a search whose requested size was clamped to 50, pass `limit: 50` to keep the same offsets. Under Node, strict mode also takes effect when `CERN_OPENDATA_CLAMP_LIMITS=false` is set only in the working directory’s `.env`. If a call relied on a clamped page in 0.4.0, pass a limit at or below the tool’s advertised maximum or enable clamping. | Variable | Description | Default | |:---|:---|:---| | `CERN_OPENDATA_CLAMP_LIMITS` | Serve oversized page requests at the tool’s cap and accept up to 1,000 distinct record IDs. Set `false` to enforce page caps in the schema and limit record input to 100 IDs. Both modes look up 20 IDs per call. | `true` | | `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` | | `MCP_HTTP_PORT` | HTTP server port. | `3010` | | `MCP_HTTP_HOST` | HTTP server host. | `127.0.0.1` | | `MCP_HTTP_ENDPOINT_PATH` | Literal HTTP endpoint path. | `/mcp` | | `MCP_PUBLIC_URL` | Public HTTP(S) base URL for reverse-proxy deployments. Omit credentials, query parameters, and fragments. | Unset | | `MCP_SESSION_MODE` | HTTP session mode: `stateless`, `stateful`, or `auto`. | `stateless` | | `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth`. | `none` | | `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.). | `info` | | `LOGS_DIR` | Directory for log files (Node.js only). Relative paths resolve from the server package. | `/logs` | | `OTEL_ENABLED` | Enable [OpenTelemetry](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry). | `false` | | `MCP_USAGE_REPORTING` | **Off unless set to `true`.** Opt in to a daily summary of tool-call counts, failure types, and latency, sent to the server's author. Never includes argument values, results, or error messages. Respects `DO_NOT_TRACK`. See [Usage reports](#usage-reports). | Unset (off) | See [`.env.example`](./.env.example) for the common framework overrides. ### Usage reports Usage reports (telemetry) are **off by default**. Nothing is sent unless you set `MCP_USAGE_REPORTING=true`, and `DO_NOT_TRACK` is respected. Any value other than `0`, `false`, `no`, or `off` keeps reports off. When on, the server sends a summary to `https://telemetry.cyanheads.com/v1/reports` once a day and at shutdown. It includes tool-call counts, failure types, latency, the server and runtime versions, OS, and CPU architecture. It identifies the install only by a keyed hash of a random ID and never includes argument values, results, error messages, environment values, or hostnames. Set `MCP_USAGE_REPORTING_ENDPOINT` to use your own receiver. [Full report format](https://github.com/cyanheads/mcp-ts-core/blob/main/framework-skills/api-telemetry/SKILL.md#usage-reports). ## Running the server ### Local development Requires [Bun v1.4.4](https://bun.sh/) or higher (or Node.js v24+). ```sh git clone https://github.com/cyanheads/cern-opendata-mcp-server.git cd cern-opendata-mcp-server bun install cp .env.example .env # optional: adjust transport, logging, or telemetry settings ``` - **Build and run the production version**: ```sh # One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdio ``` - **Run checks and tests**: ```sh bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite ``` ### Streamable HTTP ```sh MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http # Server listens at http://localhost:3010/mcp ``` ### Docker ```sh docker run --rm -p 3010:3010 ghcr.io/cyanheads/cern-opendata-mcp-server:latest ``` The image defaults to HTTP transport, stateless sessions, and logs to `/var/log/cern-opendata-mcp-server`. For stdio from an MCP client, use `"command": "docker"` with `"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/cern-opendata-mcp-server:latest"]`. To build locally, run `docker build -t cern-opendata-mcp-server .`; OpenTelemetry peers are installed by default, and `--build-arg OTEL_ENABLED=false` omits them. ## Project structure | Directory | Purpose | |:---|:---| | `src/index.ts` | `createApp()` entry point: registers tools, the record resource and published skills, sets server instructions, starts the portal client. | | `src/mcp-server/tools` | Tool definitions (`*.tool.ts`), shared input helpers and list enrichment. | | `src/mcp-server/resources` | The `cern-opendata://record/{recid}` resource definition. | | `src/mcp-server/record-schema.ts` | Record output schema shared by `cern_opendata_get_records` and the resource. | | `src/services/cern-opendata` | Portal client (pacing, retries, deadline, caches), normalization, vocabulary tables, text rendering, trigger parsing. | | `tests/` | Unit and tool tests, mirroring the `src/` structure, run against fixture portal responses. | | `skills/` | Published `cern-opendata-guide` for agents calling the tools. | | `framework-skills/` | Development skills for agents maintaining the server. | | `docs/design.md` | Tool surface, verified portal behavior, and design decisions. | ## Development guide See [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version: - Handlers throw, framework catches — no `try/catch` in tool logic - Use `ctx.log` for logging and `ctx.enrich` for notices and paging context - Register new tools and resources in the barrels in `src/mcp-server/*/definitions/index.ts` - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields ## Contributing Issues are welcome. Run checks and tests before submitting: ```sh bun run devcheck bun run test ``` ## License This project is licensed under the Apache 2.0 License. See the [LICENSE](./LICENSE) file for details.