Labsco
MCP SERVER

HED MCP Server

by hed-standard

Validate HED annotations — strings, BIDS TSV event files and JSON sidecars — against a named schema version, with caching.

Biomedical: Genomics & Clinical Data
Summary
From the standard's maintainers, sidecar-first by design.

The practical guidance embedded in the tools is worth as much as the tools: validate the sidecar before the TSV, pass the sidecar content along with the events file so the check is complete, and use inline data for small files to skip the I/O. Pinning an explicit schema version on every call is not a formality either — HED schemas evolve, and a dataset that validates against one version may not against another.

What it is

An MCP server for validating HED (Hierarchical Event Descriptor) data, the standardised vocabulary used to annotate experimental events in BIDS neuroimaging datasets. It exposes the validators through MCP so any compatible client can check annotations, and also runs in WebSocket mode and behind an HTTP REST API.

What you get
  • `validateHedString` — validate one HED tag string against a schema version, with optional warning detection and an array of custom definitions
  • `validateHedTsv` — validate a BIDS TSV event file, either by path or as inline `fileData`, with sidecar content passed as `jsonData` for a complete check
  • `validateHedSidecar` — parse and validate a HED sidecar JSON file, by path or inline
  • `getFileFromPath` — read a file from the local filesystem for the validators to work on
  • Multi-schema support: the standard HED vocabulary alongside library schemas such as the language and EEG-feature ones, each pinned by an explicit version string
  • Definition handling, so custom definitions can be supplied and reused across validations rather than re-declared
  • Schema caching and definition caching, so repeated validations do not reload the schema each time
  • Errors that name the problem — an invalid tag, a malformed definition, a schema that failed to load, an unreadable file — plus separately reported warnings for things like extension tags
Requirements

No account and no key, though schema loading fetches over the network the first time. Node.js 22 or newer. Clone, `npm install`, `npm run build` to produce `dist/`, then point your client at `node dist/server.js` with the working directory set. The MCP Inspector is the quickest way to try it. Validation calls need an explicit `hedVersion` — the standard schema is versioned, and the author recommends pinning a specific version in production and enabling warnings during development. WebSocket mode runs with a port flag for browser-based MCP clients, and an HTTP REST API server is included as a separate entry point. ISC licensed.

Setup effort

Build from source — clone the repository and build it, then point your client at the binary