NIAID Data MCP Server
An MCP (Model Context Protocol) server for the NIAID Data Ecosystem API, enabling LLMs to search biomedical research resources — datasets, clinical studies, publications, repositories, and more — funded or supported by NIAID.
Tools
niaid_data_query
Search the NIAID Data Ecosystem using Elasticsearch query string syntax.
Parameters:
| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | q | string | * | Elasticsearch query string. Supports field-specific queries, boolean operators, and wildcards. | | size | int | 10 | Number of results to return (1–1000). | | offset | int | 0 | Number of results to skip (for pagination). | | sort | string | — | Sort field; prefix with - for descending (e.g., -date). | | fields | string | — | Comma-separated fields to return (e.g., name,description,@type). | | aggs | list[string] | — | Fields to aggregate/facet by (e.g., ["@type", "conditionsOfAccess"]). | | facet_size | int | 10 | Max aggregation buckets per field (1–1000). | | explain | bool | — | Include relevance score explanation. | | response_format | string | markdown | markdown for readable output, json for structured data. |
Example queries:
q="COVID-19 AND @type:Dataset"— find COVID-19 datasetsq="*", aggs=["@type"]— summarize resource types across the whole catalogq="malaria", sort="-date", size=20— most recent malaria resources
Setup
Requires Python 3.11+ and uv.
uv sync
Running as a stdio MCP server (for Claude Desktop / MCP clients)
uv run python main.py
Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"niaid-data": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/path/to/niaid-data-mcp-server"
}
}
}
Running as an HTTP server
PORT=8000 uv run python main.py
A /health endpoint is available at http://localhost:8000/health.












