Skip to main content
Glama

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: Entrez MCP Server

Prerequisites

Before using this MCP server, you'll need API keys from:

CEDAR API Key

BioPortal API Key

Running the CEDAR MCP Server

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-mcp

Option 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:

  1. Install the MCP server using one of the methods above

  2. 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.txt

Running 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 --integration

Available Tools

2 tools
get_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

ParametersJSON Schema
NameRequiredDescriptionDefault
template_idYes
limitNo
offsetNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

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 effectively describes key behaviors: pagination support, chunking to avoid token limits, error handling (returns errors list), and the structure of the return value. However, it doesn't mention rate limits, authentication requirements, or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core purpose. Every sentence adds value: first states the action, second explains the pagination rationale, then clearly documents parameters and return structure. No wasted words or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, pagination logic) and the presence of an output schema (implied by the Returns section), the description is complete. It covers purpose, parameters, return structure, and behavioral context adequately without needing to duplicate what the output schema would provide.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It provides excellent parameter semantics: explains what template_id represents (ID or full URL) with an example, defines limit with min/max/default values, and explains offset's role in pagination. This adds substantial meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get', 'searches for', 'fetches') and resource ('template instances') with specific scope ('that belong to the input template ID'). It distinguishes from the sibling tool 'get_template' by focusing on instances rather than templates themselves. The purpose is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('to avoid token limit issues') and mentions pagination, but doesn't explicitly state when to use this tool versus alternatives or when not to use it. No direct comparison with the sibling 'get_template' is provided, leaving some ambiguity about tool selection.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
template_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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. Dates show when Glama detected each change.

  1. 2 tool updates
    • First observedget_instances_based_on_template
    • First observedget_template

TDQS

A3.6/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness2/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Exposes CDISC standards data including SDTM, ADaM, CDASH, and Controlled Terminology as tools for AI assistants via the CDISC Library API. It enables users to search standards, retrieve domain variables, and access codelist definitions to facilitate clinical research data management.
    12
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables interaction with the CEDAR metadata repository, including fetching templates, searching BioPortal ontology terms, and managing template instances.
    8
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BACH-AI-Tools/cedar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server