pyomop
pyomop is a Python library/CLI for working with OHDSI OMOP CDM (v5.4/v6) databases using SQLAlchemy. It can create/init CDM tables, load OMOP vocabularies, run QueryLibrary queries, execute custom SQL and convert results to pandas DataFrames. It also includes FHIR Bulk Export (NDJSON/NDJSON) import utilities that map FHIR source values to OMOP concepts, and an optional MCP server exposing tools for database operations and query execution. There is also optional LLM-based natural-language query support via langchain extras.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Strengths/positives: TLS enforcement for database connections may depend on SQLAlchemy/DB settings; package uses standard drivers (asyncpg/SQLAlchemy) rather than custom network protocols. The MCP server supports stdio by default (less exposed). Environment variables for DB credentials are documented (reducing shell-history leakage). Concerns: no explicit authN/authZ for MCP tools (especially HTTP transport) is described; MCP includes tools that can execute SQL, increasing impact if exposed to untrusted users. No evidence of fine-grained tool-level scoping or audit logging. Dependency hygiene is not verifiable from provided content; presence of several external packages increases need for routine vulnerability scanning.
⚡ Reliability
Best When
You control the database and runtime environment (local/managed instance), and you want a developer-friendly toolkit for OMOP CDM setup, querying, and some ETL (FHIR import), optionally with agent access via MCP.
Avoid When
You need strong, standardized API authentication/authorization, auditing, and strict operational guardrails for untrusted users—especially for an HTTP-exposed MCP server and for tools that can execute SQL.
Use Cases
- • Creating and initializing OMOP CDM schemas (SQLite/PostgreSQL/MySQL).
- • Loading OMOP vocabulary CSVs and reconciling vocabulary.
- • Running OHDSI QueryLibrary predefined queries and exporting results to pandas.
- • Executing custom SQL against OMOP CDM and converting results to DataFrames.
- • Importing FHIR Bulk Export data into OMOP CDM with vocabulary reconciliation using provided mapping configs.
- • Using an MCP client to programmatically create/load/run SQL against an OMOP CDM database.
Not For
- • Production-grade managed access control for multi-tenant environments (no evidence of robust authN/authZ).
- • Internet-facing services without additional deployment hardening (package appears primarily developer/CLI focused).
- • Environments where deterministic/repeatable query generation from LLMs is required (LLM support is optional and depends on external models/prompts).
Interface
Authentication
Authentication/authorization for database access appears to be delegated to the target DB credentials supplied by the user. For the MCP server, transport options are described, but no explicit MCP authN/authZ, API keys, or scope enforcement are documented in the provided materials.
Pricing
No hosted service pricing is indicated; this is a library/CLI. LLM extras may incur external model/provider costs depending on configuration.
Agent Metadata
Known Gotchas
- ⚠ SQL execution tools can modify databases; agents should use check_sql/validation and constrain scope before run_sql.
- ⚠ create_cdm/create_eunomia limited to local sqlite to avoid inadvertent data loss—agents should respect those constraints to prevent unexpected failures.
- ⚠ HTTP transport is available for MCP but no authentication guidance is provided; avoid exposing publicly without external safeguards.
- ⚠ LLM-based natural language query generation quality depends heavily on prompt/model configuration and may require validation via check_sql before executing.
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for pyomop.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-04-04.