CEDAR MCP Server
The MCP server is distributed through PyPI as the bach-cedar-mcp package, allowing easy installation and deployment via pip or uvx
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CEDAR MCP Serverget the latest clinical trial metadata template"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CEDAR MCP Server
A Model Context Protocol (MCP) server for interacting with the CEDAR (Center for Expanded Data Annotation and Retrieval) metadata repository.
🚀 快速启动(推荐)
使用 UVX 一键启动
uvx bach-cedar-mcp在 Cursor/Cherry Studio 中配置
{
"mcpServers": {
"cedar-mcp": {
"command": "uvx",
"args": ["bach-cedar-mcp"],
"env": {
"CEDAR_API_KEY": "<YOUR_CEDAR_API_KEY>",
"BIOPORTAL_API_KEY": "<YOUR_BIOPORTAL_API_KEY>"
}
}
}
}PyPI 包地址: https://pypi.org/project/bach-cedar-mcp/
Related MCP server: CEDAR MCP Server
Prerequisites
Before using this MCP server, you'll need API keys from:
CEDAR API Key
Go to cedar.metadatacenter.org
Create an account or log in
Navigate to: Profile → API Key
Copy your API key
BioPortal API Key
Create an account or log in
Navigate to: Account Settings → API Key
Copy your API key
Running the CEDAR MCP Server
Option 1: Using UVX from PyPI (Recommended)
Run directly without installation using uvx:
uvx bach-cedar-mcp \
--cedar-api-key "your-cedar-key" \
--bioportal-api-key "your-bioportal-key"Option 2: Install from PyPI
Install using pip and run:
# Install from PyPI
pip install bach-cedar-mcp
# Run the server
bach-cedar-mcp \
--cedar-api-key "your-cedar-key" \
--bioportal-api-key "your-bioportal-key"Option 3: Using Environment Variables
Set environment variables instead of command-line arguments:
# Set environment variables
export CEDAR_API_KEY="your-cedar-key"
export BIOPORTAL_API_KEY="your-bioportal-key"
# Run with uvx
uvx bach-cedar-mcp
# Or if installed with pip
bach-cedar-mcpOption 4: Local Development
Clone and run from source:
# Clone the repository
git clone https://github.com/BACH-AI-Tools/cedar-mcp.git
cd cedar-mcp
# Install dependencies and run
uv run python -m cedar_mcp.server \
--cedar-api-key "your-cedar-key" \
--bioportal-api-key "your-bioportal-key"Using with Claude Code
Add the CEDAR MCP server to Claude Code:
# Add using uvx (from PyPI)
claude mcp add cedar-mcp --uvx bach-cedar-mcp \
--cedar-api-key "your-cedar-key" \
--bioportal-api-key "your-bioportal-key"Using with Claude Desktop
To use with Claude Desktop app:
Install the MCP server using one of the methods above
Add to Claude Desktop configuration in your
claude_desktop_config.json:
{
"mcpServers": {
"cedar-mcp": {
"command": "uvx",
"args": ["bach-cedar-mcp"],
"env": {
"CEDAR_API_KEY": "your-cedar-key",
"BIOPORTAL_API_KEY": "your-bioportal-key"
}
}
}
}Or if you have it installed with pip:
{
"mcpServers": {
"cedar-mcp": {
"command": "bach-cedar-mcp",
"env": {
"CEDAR_API_KEY": "your-cedar-key",
"BIOPORTAL_API_KEY": "your-bioportal-key"
}
}
}
}Available Tools
Here is the list of CEDAR tools with a short description
get_template: Fetches a template from the CEDAR repository.get_instances_based_on_template: Gets template instances that belong to a specific template with pagination support.
Development
Install Development Dependencies
pip install -r requirements-dev.txtRunning Tests
This project includes comprehensive integration tests that validate real API interactions with both CEDAR and BioPortal APIs.
For detailed testing information, see test/README.md.
Contributing
Contributions are welcome! Please ensure all tests pass before submitting a Pull Request:
python run_tests.py --integrationAvailable Tools
2 toolsget_instances_based_on_templateA
Get template instances that belong to the input template ID with pagination support.
This tool searches for instances of a given template and fetches their complete content in paginated chunks to avoid token limit issues.
Args: template_id: The template ID or full URL from CEDAR repository (e.g., "https://repo.metadatacenter.org/templates/e019284e-48d1-4494-bc83-ddefd28dfbac") limit: Number of instances to return per page (min: 1, max: 100, default: 10) offset: Starting position for pagination (default: 0)
Returns: Dictionary containing: - instances: List of template instances for this page - pagination: Pagination metadata (total_count, current_page, etc.) - errors: List of any errors encountered during fetching
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It discloses pagination behavior to avoid token limits, the return structure including errors, and that it fetches complete content. This adds useful behavioral context beyond the basic 'get' operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a summary, an explanatory paragraph, and well-labeled Args/Returns sections. It is slightly redundant at the start, but all information is useful and earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a moderate-complexity tool with no annotations and a zero-coverage schema, the description is highly complete. It covers parameters, return structure, pagination rationale, and error handling, fully equipping an agent to invoke and interpret the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It thoroughly explains each parameter: template_id with a full URL example, limit with min/max/default, and offset with default. This adds significant meaning beyond the bare schema types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets template instances belonging to an input template ID. This distinguishes it from sibling tools like get_cedar_template, which likely retrieves the template definition itself, and search-oriented tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: use this to fetch template instances for a given template. It does not explicitly exclude alternatives, but the purpose is distinct enough that no exclusions are necessary given the sibling tool names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_templateB
Get a template from the CEDAR repository.
Args: template_id: The template ID or full URL from CEDAR repository (e.g., "https://repo.metadatacenter.org/templates/e019284e-48d1-4494-bc83-ddefd28dfbac")
Returns: Template data from CEDAR, cleaned and transformed
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the template data is 'cleaned and transformed', which adds useful context about post-processing behavior. However, it lacks details on authentication needs, rate limits, or error handling, which are important for a retrieval tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the main purpose, followed by structured sections for args and returns. Each sentence adds value, such as the example and transformation note, with no wasted words, though it could be slightly more streamlined.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (one parameter) and the presence of an output schema, the description is reasonably complete. It covers the purpose, parameter semantics, and return behavior, though it could benefit from more usage guidelines and behavioral details to be fully comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'template_id' can be an ID or full URL, provides an example, and clarifies the format, compensating well for the schema's lack of documentation. With only one parameter, this is effective.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and resource 'template from the CEDAR repository', making the purpose understandable. However, it doesn't explicitly differentiate from the sibling tool 'get_instances_based_on_template', which appears to retrieve instances rather than templates, so this is a minor gap in sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description mentions retrieving a template but doesn't clarify scenarios where this is preferred over other methods or tools, such as the sibling tool for instances, leaving the agent without usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
- First observed
get_instances_based_on_template - First observed
get_template
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: get_instances_based_on_template retrieves paginated instances of a template, while get_template fetches the template itself. There is no overlap in functionality, and an agent can easily differentiate between them based on their descriptions and intended use cases.
Both tools follow a consistent verb_noun naming pattern: get_instances_based_on_template and get_template. They use snake_case uniformly, and the verb 'get' is applied consistently to indicate retrieval operations, making the naming predictable and easy to understand.
With only 2 tools, this server feels too thin for its apparent domain of interacting with a CEDAR repository. While the tools cover template and instance retrieval, there are likely missing operations such as creating, updating, or deleting templates/instances, which limits the server's utility and scope.
The server is severely incomplete for a CEDAR repository interface. It only provides read operations (get_template and get_instances_based_on_template) with no support for create, update, delete, or other essential actions like searching or managing metadata. This leaves significant gaps that will hinder agent workflows and limit functionality.
Maintenance
Related MCP Connectors
Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers.
Search biomedical papers, inspect publication records, and traverse citation or semantic graphs.
Connect AI clients to biomedical data and tools.
Machine-readable entity discovery with provenance, trust and verified source evidence.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables interaction with REDCap instances for managing research data, projects, and files through natural language.383,280 PyPI1MIT

CEDAR MCP Serverofficial
AlicenseAqualityAmaintenanceEnables interaction with the CEDAR metadata repository, including fetching templates, searching BioPortal ontology terms, and managing template instances.8MIT- FlicenseNot gradedqualityDmaintenanceEnables LLMs and AI agents to query a biomedical knowledge graph stored in RedisGraph, with tools for concept search, synonym enrichment, and study variable discovery through semantic relationships.-
- FlicenseAqualityDmaintenanceEnables interaction with synthetic NIH-style clinical research data through tools for searching publications, querying patient metadata, analyzing AAA measurements, and retrieving protocol guidance.5-