Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ omop_mcp Public

Model Context Protocol (MCP) server for mapping clinical terminology to Observational Medical Outcomes Partnership (OMOP) concepts using Large Language Models

License

Notifications You must be signed in to change notification settings

OHNLP/omop_mcp

Repository files navigation

OMOP MCP Server

License arXiv

Model Context Protocol (MCP) server for mapping clinical terminology to Observational Medical Outcomes Partnership (OMOP) concepts using Large Language Models (LLMs).

Installation

Before configuring the MCP server, ensure you have:

  1. uv installed on your system

  2. Clone the repository

    git clone https://github.com/OHNLP/omop_mcp.git
    cd omop_mcp
  3. Set up environment variables (only for API calls)

    Copy .env.template and configure your API credentials:

    cp .env.template .env

    Edit .env with API credentials:

    # Azure OpenAI Configuration
    AZURE_OPENAI_ENDPOINT=
    AZURE_OPENAI_API_KEY=
    AZURE_API_VERSION=
    MODEL_NAME=
    
    # OpenAI Configuration (alternative)
    OPENAI_API_KEY=

Configuration for Claude Desktop

Add the following configuration to your claude_desktop_config.json file:

Location:

  • MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

Configuration:

Replace <path-to-local-repo> with the actual path to your cloned repository.

{
  "mcpServers": {
    "omop_mcp": {
      "command": "uv",
      "args": ["--directory", "<path-to-local-repo>", "run", "omop_mcp"]
    }
  }
}

Features

The OMOP MCP server provides the find_omop_concept tool for:

  • Mapping clinical terminology to OMOP concepts
  • Validating terminology mappings
  • Searching OMOP vocabulary
  • Converting between different clinical coding systems

Usage Example

  • It is recommended to specify the OMOP field and table name in the prompt for improved accuracy. Refer to omop_concept_id_fields.json for the list of OMOP fields and tables that store concept IDs.

  • You can specify preferred vocabularies for the mapping in order of priority (e.g., "SNOMED preferred" or "LOINC > SNOMED > RxNorm").

Prompt:

Map `Temperature Temporal Scanner - RR` for `measurement_concept_id`
in the `measurement` table.

Response:

CONCEPT_ID: 46235152
CODE: 75539-7
NAME: Body temperature - Temporal artery
CLASS: Clinical Observation
CONCEPT: Standard
VALIDITY: Valid
DOMAIN: Measurement
VOCAB: LOINC
URL: https://athena.ohdsi.org/search-terms/terms/46235152
REASON: This LOINC concept specifically represents body temperature measured
at the temporal artery, which is what a temporal scanner measures.
The "RR" in your source term likely refers to "Recovery Room" or
another location/department indicator, but in OMOP, the location would
typically be captured in a separate field rather than
as part of the measurement concept itself.

Contributing

See CONTRIBUTING.md for guidelines to contribute to the project.

Citation Policy

If you use this software, please cite the pre-print at arXiv (cs.AI) below:

An Agentic Model Context Protocol Framework for Medical Concept Standardization

License

This project is licensed under the Apache License 2.0. See LICENSE file for details.

Contact: [email protected]

About

Model Context Protocol (MCP) server for mapping clinical terminology to Observational Medical Outcomes Partnership (OMOP) concepts using Large Language Models

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •