Back to Home
fastomop icon

omcp

Verified Safe

by fastomop

Overview

Provide a Model Context Protocol server for AI models to query and analyze healthcare data conforming to the OMOP Common Data Model.

Installation

Run Command
uv run omcp

Environment Variables

  • DB_TYPE
  • DB_PATH
  • DB_READ_ONLY
  • DB_USERNAME
  • DB_PASSWORD
  • DB_HOST
  • DB_PORT
  • DB_DATABASE
  • DB_TOKEN
  • DB_HTTP_PATH
  • DB_CATALOG
  • DB_SCHEMA
  • CDM_SCHEMA
  • VOCAB_SCHEMA
  • MCP_TRANSPORT
  • MCP_HOST
  • MCP_PORT
  • ENABLE_LOGGING
  • LOG_FILE
  • DEBUG
  • ENABLE_LANGFUSE
  • LANGFUSE_PUBLIC_KEY
  • LANGFUSE_SECRET_KEY
  • LANGFUSE_HOST
  • LANGFUSE_TRACE_CONTEXT_FILE

Security Notes

The server directly executes user-provided SQL queries using Ibis, but this is mitigated by a comprehensive `SQLValidator`. The validator enforces read-only access (SELECT statements only), restricts queries to predefined OMOP tables, disallows explicitly excluded tables and columns, and by default blocks sensitive 'source_value' and 'source_concept_id' columns. No hardcoded secrets; environment variables are used for sensitive configurations. Running on `0.0.0.0` for SSE transport might expose the server to the local network; proper firewall configuration is recommended.

Similar Servers

Stats

Interest Score40
Security Score8
Cost ClassHigh
Avg Tokens50000
Stars19
Forks7
Last Update2025-11-27

Tags

OMOPHealthcareLLMDatabaseMCP