validateHedStringLABSCO 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 definitionsvalidateHedTsv— validate a BIDS TSV event file, either by path or as inlinefileData, with sidecar content passed asjsonDatafor a complete checkvalidateHedSidecar— parse and validate a HED sidecar JSON file, by path or inlinegetFileFromPath— 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 — git clone https://github.com/hed-standard/hed-mcp
USE CASES
Checking an annotation while you write it
Validate the HED string interactively with warnings on, before it goes anywhere near a dataset.
Validating a BIDS dataset before publication
Validate the sidecar files first, then the TSV event files with the sidecar content passed alongside them.
Developing a custom definition
Test the definition on a string that uses it before adopting it across the dataset.
Validating without touching the filesystem
Pass the TSV or JSON content inline instead of a path, which also avoids the file I/O on small datasets.
4 tools
Listed in project docs. Your client may show a different list.
validateHedTsvvalidateHedSidecargetFileFromPathBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
Node.js 22+
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/hed-standard/hed-mcp
cd hed-mcp
npm install
npm run buildMCP Clients
Any MCP client
{
"mcpServers": {
"hed-mcp": {
"command": "node",
"args": [
"dist/server.js"
],
"cwd": "<YOUR_PATH_TO_HED_MCP>"
}
}
}Set cwd to your clone of hed-mcp. Not every client reads cwd; if yours ignores it, drop cwd and put the full path in args instead: <YOUR_PATH_TO_HED_MCP>/dist/server.js.