Skip to main content
Glama
OMOPHub MCP Server

OMOPHub MCP Server

Official
by OMOPHub

Why OMOPHub MCP?

Working with medical vocabularies today means downloading multi-gigabyte CSV files, loading them into a local database, and writing SQL to find what you need. Every time.

OMOPHub MCP Server gives your AI assistant instant access to the entire OHDSI ATHENA vocabulary. No database setup, no CSV wrangling, no context switching. Just ask.

You: "Map ICD-10 code E11.9 to SNOMED"

Claude: Found it - E11.9 (Type 2 diabetes mellitus without complications)
        maps to SNOMED concept 201826 (Type 2 diabetes mellitus)
        via standard 'Maps to' relationship.

Use cases:

  • Concept lookup - Find OMOP concept IDs for clinical terms in seconds

  • Cross-vocabulary mapping - Map between ICD-10, SNOMED, RxNorm, LOINC, and 120+ vocabularies

  • Hierarchy navigation - Explore ancestors and descendants for phenotype definitions

  • Concept set building - Let your AI agent assemble complete concept sets for cohort definitions

  • Code validation - Verify medical codes and check their standard mappings


Related MCP server: snowstorm-mcp-server

Quick Start

1. Get an API Key

Sign up at omophub.com → create an API key in your dashboard.

2. Add to Your AI Client

Open Claude Desktop settings > "Developer" tab > "Edit Config". Add to claude_desktop_config.json:

{
  "mcpServers": {
    "omophub": {
      "command": "npx",
      "args": ["-y", "@omophub/omophub-mcp"],
      "env": {
        "OMOPHUB_API_KEY": "oh_your_key_here"
      }
    }
  }
}
claude mcp add omophub -- npx -y @omophub/omophub-mcp
# Then set OMOPHUB_API_KEY in your environment

Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global MCP server". Add to .cursor/mcp.json:

{
  "mcpServers": {
    "omophub": {
      "command": "npx",
      "args": ["-y", "@omophub/omophub-mcp"],
      "env": {
        "OMOPHUB_API_KEY": "oh_your_key_here"
      }
    }
  }
}

Add to .vscode/mcp.json:

{
  "servers": {
    "omophub": {
      "command": "npx",
      "args": ["-y", "@omophub/omophub-mcp"],
      "env": {
        "OMOPHUB_API_KEY": "oh_your_key_here"
      }
    }
  }
}

Run the MCP server as an HTTP service that clients connect to via URL:

# Start the local listener; each client supplies its own credential
npx -y @omophub/omophub-mcp --transport=http --port=3100

# MCP endpoint: http://localhost:3100/mcp
# Health check:  http://localhost:3100/health

Point the client at http://127.0.0.1:3100/mcp and set its Authorization header to Bearer <your OMOPHub API key> on every MCP request. The legacy / path also accepts individual API keys. Local HTTP listens on loopback by default.

Upgrading from 1.6.3. Move the key from the HTTP server’s --api-key or OMOPHUB_API_KEY setting into each client’s authorization header. Use an individual key for each account so the API can apply its vocabulary permissions and tier quota. For local stdio, keep the key in the client’s MCP environment. If you previously exposed a keyed HTTP server on a shared network, restrict its listener and review the account’s usage.

For an OAuth-capable client, add https://mcp.omophub.com/mcp, sign in to OMOPHub and approve vocabulary access. The API enforces your vocabulary permissions and bills successful reads against your tier. To disconnect one app, open Settings → Connected Apps in the OMOPHub dashboard.

Clients that use individual API keys can send the key in the Authorization header:

Claude Code:

claude mcp add omophub --transport http \
  -H "Authorization: Bearer oh_your_key_here" \
  https://mcp.omophub.com

VS Code (.vscode/mcp.json):

{
  "servers": {
    "omophub": {
      "type": "http",
      "url": "https://mcp.omophub.com",
      "headers": { "Authorization": "Bearer oh_your_key_here" }
    }
  }
}

Cursor / Windsurf:

{
  "mcpServers": {
    "omophub": {
      "url": "https://mcp.omophub.com",
      "headers": { "Authorization": "Bearer oh_your_key_here" }
    }
  }
}

For a Claude custom connector, use the hosted OAuth URL above. The local Claude Desktop setup uses stdio and an API key.

# HTTP for clients on this machine; send the API key from the client
docker run --rm -e MCP_HOST=0.0.0.0 -p 127.0.0.1:3100:3100 omophub/omophub-mcp:1.7.0

# Stdio mode (for piping)
docker run -i -e OMOPHUB_API_KEY=oh_your_key_here omophub/omophub-mcp --transport=stdio

3. Start Asking

"What's the OMOP concept ID for type 2 diabetes?"

"Map ICD-10 code E11.9 to SNOMED"

"Show me all descendants of Diabetes mellitus in SNOMED"


Available Tools

Tool

What it does

search_concepts

Search for medical concepts by name or clinical term across all vocabularies

get_concept

Get detailed info about a specific OMOP concept by concept_id

get_concept_by_code

Look up a concept using a vocabulary-specific code (e.g., ICD-10 E11.9)

map_concept

Map a concept to equivalent concepts in other vocabularies (paginated — see note below)

get_hierarchy

Navigate concept hierarchy - ancestors, descendants, or both

list_vocabularies

List available medical vocabularies with statistics

semantic_search

Search using natural language with neural embeddings (understands clinical meaning)

find_similar_concepts

Find concepts similar to a reference concept, name, or description

explore_concept

Get concept details, hierarchy, and cross-vocabulary mappings in one call

fhir_resolve

Resolve a FHIR coded value (incl. administrative codes via the HL7 FHIR-to-OMOP IG ConceptMaps) to its OMOP standard concept and CDM target table

fhir_resolve_codeable_concept

Resolve a FHIR CodeableConcept — best match by OHDSI vocabulary preference, honoring userSelected

Resources

URI

Description

omophub://vocabularies

Full vocabulary catalog with statistics

omophub://vocabularies/{vocabulary_id}

Details for a specific vocabulary

Prompts

Prompt

Description

phenotype-concept-set

Guided workflow to build a concept set for a clinical phenotype

code-lookup

Look up and validate a medical code with mappings and hierarchy


Example Prompts

Find a concept → search_concepts

"Search for metformin in RxNorm"

Cross-vocabulary mapping → map_concept

"I have SNOMED concept 201826 - what's the ICD-10 code?"

Build a concept set → search_concepts → get_hierarchy → map_concept

"Help me build a concept set for Type 2 diabetes including all descendants"

Completeness matters here. map_concept returns one page at a time (page_size 1-200, default 100). A widely-used drug ingredient can have well over a thousand NDC mappings, so a single call is a sample, not the answer. Check has_more in the response and keep incrementing page until it is false — otherwise the concept set looks complete while silently missing codes.

Use find_similar_concepts for exploration, not for this: it is ranked embedding similarity, so it has no notion of set membership and cannot be exhaustive no matter how large page_size is.

Validate a code → get_concept_by_code → map_concept

"Is ICD-10 code E11.9 valid? What does it map to in SNOMED?"

Semantic search → semantic_search

"Find concepts related to 'heart attack'"

Explore a concept → explore_concept

"Give me everything about SNOMED concept 201826"

FHIR-to-OMOP resolution → fhir_resolve

"Resolve FHIR SNOMED code 44054006 to OMOP — what table does it go in?"

CodeableConcept → fhir_resolve_codeable_concept

"This CodeableConcept has both SNOMED 44054006 and ICD-10 E11.9 — which should I use for OMOP?"

Find similar → find_similar_concepts

"What concepts are similar to 'Type 2 diabetes mellitus'?"


Configuration

Environment Variables

Variable

Required

Description

OMOPHUB_API_KEY

stdio

Individual API key for local stdio. HTTP clients send their own credentials.

OMOPHUB_BASE_URL

Custom API base URL (default: https://api.omophub.com/v1)

OMOPHUB_LOG_LEVEL

debug · info · warn · error (default: info)

OMOPHUB_ANALYTICS_OPTOUT

Set to true to disable analytics headers

OMOPHUB_USER_AGENT_SUFFIX

Optional deployment identifier appended to omophub-mcp/<version> (default: none)

MCP_TRANSPORT

stdio (default) or http

MCP_PORT

HTTP server port (default: 3100, only used with http transport)

MCP_HOST

HTTP bind address (default 127.0.0.1). Set explicitly when clients connect through a container network.

MCP_ALLOWED_HOSTS

Additional accepted HTTP authorities, comma-separated, including any nondefault port. For a reverse proxy, allow its public authority and preserve the original Host header.

MCP_ALLOWED_ORIGINS

Additional trusted browser origins, comma-separated, including scheme and any nondefault port. Native clients may omit Origin.

HEALTH_PORT

Port for standalone health endpoint in stdio mode (default: disabled)

CLI Arguments

# Stdio mode (default)
npx @omophub/omophub-mcp --api-key=oh_your_key --base-url=https://custom.api.com/v1

# HTTP mode
npx @omophub/omophub-mcp --transport=http --port=3100

# Stdio mode with standalone health endpoint
npx @omophub/omophub-mcp --api-key=oh_your_key --health-port=8080

Health Endpoint (Docker / Kubernetes)

In HTTP mode, the health endpoint is available at /health on the same port as the MCP endpoint:

npx @omophub/omophub-mcp --transport=http --port=3100
curl http://localhost:3100/health
# → {"status":"ok","version":"1.7.0","uptime_seconds":42}

In stdio mode, use --health-port for a standalone health endpoint:

HEALTH_PORT=8080 OMOPHUB_API_KEY=oh_your_key npx @omophub/omophub-mcp
curl http://localhost:8080/health

The Docker image defaults to HTTP mode on port 3100 with health checks built in.


Development

git clone https://github.com/OMOPHub/omophub-mcp.git
cd omophub-mcp
npm install
npm run build
npm test

Run locally:

OMOPHUB_API_KEY=oh_your_key npx tsx src/index.ts

Troubleshooting

Error

Solution

HTTP 401

Configure the client’s Bearer API key or reconnect its hosted OAuth grant.

HTTP 403 before MCP dispatch

Check the requested host and browser origin against the configured allowlists.

stdio API key required

Set OMOPHUB_API_KEY in the MCP client’s environment.

Authentication failed

API key may be invalid or expired - generate a new one

Rate limit exceeded

Automatic retries are built in. For higher limits, upgrade your plan

Tools not appearing

Restart your AI client, verify npx @omophub/omophub-mcp runs without errors, check config path



License

MIT - see LICENSE

Available Tools

11 tools
explore_conceptExplore a conceptA
Read-only

Get a comprehensive view of a medical concept in one call: detailed info, ancestors/descendants hierarchy, and cross-vocabulary mappings. Use this instead of calling get_concept + get_hierarchy + map_concept separately. Ideal for understanding what a concept is, where it sits in the classification tree, and how it maps to other coding systems.

Inputs: concept_id (required), hierarchy_levels, include_mappings, include_hierarchy, +2 more. Returns: concept

fhir_resolveResolve a FHIR codingA
Read-only

Resolve one FHIR Coding with separate system and code fields to its OMOP standard concept and CDM target table. Supports text-only input via semantic search fallback and optional Phoebe recommendations. Examples: system='http://snomed.info/sct' code='44054006' for Type 2 diabetes, or display='heart attack' for text-only resolution.

Inputs: code, system, display, on_unmapped, +4 more. Returns: data, success

fhir_resolve_codeable_conceptResolve a FHIR CodeableConceptA
Read-only

Resolve a FHIR CodeableConcept with multiple codings. Picks the best match per OHDSI vocabulary preference (SNOMED > RxNorm > LOINC > CVX > ICD-10). Falls back to the text field via semantic search if no coding resolves.

Inputs: coding (required), text, on_unmapped, resource_type, +2 more. Returns: data, success

find_similar_conceptsFind similar conceptsA
Read-only

Find medical concepts similar to a reference concept, name, or natural language query. Supports three algorithms: 'semantic' (neural embeddings — best for meaning, and the default), 'lexical' (text matching — best for typos), 'hybrid' (combined). Provide exactly ONE of: concept_id, concept_name, or query. Use this to explore related concepts, find alternative codes, or build phenotype concept sets. Tip: For drug vocabularies like RxNorm, use drug class names ('ACE inhibitors', 'beta blockers', 'antihypertensives') rather than symptom descriptions ('medications for high blood pressure') — the embedding model aligns better with clinical terminology than lay language.

Inputs: page, query, algorithm, page_size, +7 more. Returns: similar_concepts

get_conceptLook up a concept by numeric OMOP IDA
Read-only

Get detailed information about a specific OMOP concept by its numeric concept_id. Returns the concept name, vocabulary, domain, concept class, standard status, valid dates, and synonyms. After searching by name, pass the selected numeric concept_id here to verify the concept code and vocabulary release.

Inputs: concept_id (required). Returns: concept_id, concept_name, vocab_release

get_concept_by_codeLook up a source concept by vocabulary and codeA
Read-only

Look up an OMOP concept using a vocabulary-specific code and vocabulary ID. Both parameters are required to avoid ambiguity - the same code can exist in multiple vocabularies (e.g., 'E11' exists in both ICD10CM and ICD10). If multiple concepts share the same code within a vocabulary, all matches are returned - prefer the one with standard_concept='S'.

Inputs: concept_code (required), vocabulary_id (required). Returns: concepts

get_hierarchyList descendants or ancestors of an OMOP conceptA
Read-only

List descendants of a known OMOP concept using direction='down', or ancestors using 'up'. Use page=1 and the requested page_size. While has_more is true, set the next call’s page argument to the returned next_page and keep the same page size and filters. Read truncated to determine whether the upstream row cap was reached. A combined view cannot establish exhaustive coverage.

Inputs: concept_id (required), page, direction, page_size, +3 more. Returns: has_more, ancestors, direction, next_page, +3 more

list_vocabulariesList available vocabulariesA
Read-only

List all available medical vocabularies in the OMOP standardized vocabulary system with concept counts and metadata. Use this to understand what terminology systems are available (SNOMED CT, ICD-10-CM, RxNorm, LOINC, etc.) and their scope.

Inputs: search. Returns: total, vocabularies

map_conceptMap a source conceptA
Read-only

Map a source vocabulary code or a known numeric OMOP concept ID to another vocabulary. For ICD10CM to SNOMED, supply vocabulary_id="ICD10CM", the original concept_code and target_vocabularies="SNOMED". The tool resolves the exact source code before reading its mappings. Report only the targets in successful mappings rows. On error, the mapping is unverified. Follow has_more for further pages.

Inputs: page, page_size, concept_id, concept_code, +3 more. Returns: mapped, message, mappings, mapping_error, +1 more

search_conceptsSearch terminology by nameA
Read-only

Search a vocabulary by term or synonym. When the user asks to look up the matching concept or report its vocabulary release, set verify_match to true. A unique match then gets a second API read by its numeric ID. Multiple matches are returned for selection.

Inputs: query (required), page, page_size, domain_ids, +3 more. Returns: page, total, results, verified_concept

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 11 tools

    Disambiguation3/5

    Most tools are identifiable, but semantic_search and find_similar_concepts overlap substantially when a query string is used, and explore_concept is explicitly a superset of get_concept plus get_hierarchy plus map_concept. The descriptions do help distinguish them, but the boundaries between search/related-concept tools and the convenience aggregator are blurry enough to invite misselection.

    Naming Consistency4/5

    The tool set consistently uses snake_case, with predictable verb_noun forms such as get_concept, map_concept, list_vocabularies, and find_similar_concepts. Minor deviations exist: semantic_search lacks a leading verb and fhir_resolve/fhir_resolve_codeable_concept use a domain prefix rather than the same verb pattern.

    Tool Count5/5

    Eleven tools is well within the typical 3-15 range for a reference/lookup server. The set covers keyword search, semantic search, similar-concept discovery, concept retrieval, mapping, hierarchy, vocabulary listing, and FHIR resolution without obvious padding.

    Completeness4/5

    The surface covers the core read-only OMOP workflows: concept lookup by ID/name/code, hierarchy traversal, cross-vocabulary mapping, vocabulary listing, and FHIR Coding/CodeableConcept resolution. Minor gaps remain around bulk concept-set operations, relationship-specific queries, and richer filtering by domain or vocabulary, but agents can work around these with the existing tools.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides keyless access to NIH clinical data including ICD-10/9, RxTerms, LOINC, NPI, and conditions search, allowing AI agents to query medical terminologies without authentication.
      65 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to look up, search, validate, navigate hierarchies, and expand value sets for SNOMED CT clinical terminology through the Model Context Protocol.
      9
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to manage virtual clinic data including patients, visits, diagnoses, treatments, lab/radiology orders, and search medical literature and internal knowledge base.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      -