Skip to main content

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/


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

Metadata

Release files for bach-cedar-mcp 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bach-cedar-mcp 1.0.1
File Size Uploaded
bach_cedar_mcp-1.0.1.tar.gz 30.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bach-cedar-mcp 1.0.1
File Interpreter ABI Platform
bach_cedar_mcp-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 45.4 kB

Release files / bach_cedar_mcp-1.0.1.tar.gz

Download URL bach_cedar_mcp-1.0.1.tar.gz
Size 30.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aacb720f4de84a7c6d0b365136c5c4eedcd4365846e459137bacf3e40211c30d
BLAKE2b-256 checksum
How to use checksums
09455b5665ae1748e38205b6c3ed5275a950f700ff1eb4d9b916388c8aca3e6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / bach_cedar_mcp-1.0.1-py3-none-any.whl

Download URL bach_cedar_mcp-1.0.1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebaf6218baed274366a4ab59b039932bc6a7550cc517de30447c55e4784ba8a9
BLAKE2b-256 checksum
How to use checksums
3c6f699bf3c802c42b6385436aff5762be4c5392683e70933d951048ec426fbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page