Skip to main content

A Model Context Protocol server for interacting with CEDAR metadata repository

Project description

CEDAR MCP Server

A Model Context Protocol (MCP) server for interacting with the CEDAR (Center for Expanded Data Annotation and Retrieval) metadata repository.

Prerequisites

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

CEDAR API Key

BioPortal API Key

Running the CEDAR MCP Server

Option 1: Using UVX (Recommended)

Run directly without installation using uvx:

uvx --from git+https://github.com/musen-lab/cedar-mcp.git cedar-mcp \
  --cedar-api-key "your-cedar-key" \
  --bioportal-api-key "your-bioportal-key"

Option 2: Local Installation with UV

Clone and run using uv:

# Clone the repository
git clone https://github.com/musen-lab/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"

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 --from git+https://github.com/musen-lab/cedar-mcp.git cedar-mcp

# Or run locally
uv run python -m cedar_mcp.server

Using with Claude Code

Add the CEDAR MCP server to Claude Code:

# Add using uvx (from Git repository)
claude mcp add cedar-mcp --uvx --from git+https://github.com/musen-lab/cedar-mcp.git \
  --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": [
        "--from", 
        "git+https://github.com/musen-lab/cedar-mcp.git",
        "cedar-mcp"
      ],
      "env": {
        "CEDAR_API_KEY": "your-cedar-key",
        "BIOPORTAL_API_KEY": "your-bioportal-key"
      }
    }
  }
}

Or if you have it installed locally:

{
  "mcpServers": {
    "cedar-mcp": {
      "command": "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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bach_cedar_mcp-1.0.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bach_cedar_mcp-1.0.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file bach_cedar_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: bach_cedar_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for bach_cedar_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fb756f97b5cbdba0508aaf653babada998e2a683e44779606bb40c6e6e46db7e
MD5 13f0965b7d99eb14b0abf5887a9e1266
BLAKE2b-256 1978aff124257ce508083bdf560af18b8ae07ea08c9b1dd83370ec6b4dfff53f

See more details on using hashes here.

File details

Details for the file bach_cedar_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bach_cedar_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for bach_cedar_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aae1c3af54c4e0cec36731e6737682c1ee3b51439cd447d5ff165c7499b9b17
MD5 6f672fa51965503116b863e19ab64c99
BLAKE2b-256 de5f2cc8ce4332306a35a1d3ec0d5c8cc703601f8c121f4cba617ce403dc9d85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page