MCP server for querying MIMIC-IV clinical data on PostgreSQL

MCP server for querying MIMIC-IV clinical data on PostgreSQL

mimic-mcp-server•byambakick

A project providing an MCP server that sits in front of Azure Database for PostgreSQL to run clinical analytics workloads over MIMIC-IV data.

License: MIT License•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Runs an MCP server connected to PostgreSQL, configured through PGHOST, PGUSER, PGPASSWORD and PGDATABASE environment variables.
  • •Supports Microsoft Entra authentication as an alternative to password-based PostgreSQL access.
  • •Enables running benchmarked analytics queries such as COUNT(*) over the MIMIC-IV emar_detail table through the MCP server path.
  • •Accompanies scripts for creating MIMIC-IV schemas and ingesting MIMIC-IV CSVs into PostgreSQL.

BEST FOR

  • •Analysts comparing MCP-mediated querying against direct SQL on large clinical datasets.
  • •Developers who want to run MIMIC-IV analytics through an MCP server from Claude Desktop or VS Code configurations.
  • •Teams exploring whether MCP abstractions reduce implementation effort for multi-table clinical query workloads.

ABOUT MIMIC-MCP-SERVER

MCP server for querying MIMIC-IV clinical data on PostgreSQL is cataloged as an MCP server attributed to ambakick. A project providing an MCP server that sits in front of Azure Database for PostgreSQL to run clinical analytics workloads over MIMIC-IV data. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for querying MIMIC-IV clinical data on PostgreSQL are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the MCP server support Entra authentication?

Yes. Setting AZURE_USE_AAD to True along with subscription and resource group variables is documented as an alternative to password authentication.

Which environment variables configure the PostgreSQL connection?

PGHOST, PGUSER, PGPASSWORD and PGDATABASE must be set or supplied in the Claude Desktop or VS Code configuration.

What license is the project released under?

The README states the project is under the MIT License.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 0a315ec4e83d · 采集于 2026-11-13 11:54:44 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Server × PostgreSQL on MIMIC‑IV

Project goal: Evaluate whether a Model Context Protocol (MCP) Server layered on Azure Database for PostgreSQL can match—or outperform—direct SQL while reducing developer effort for large‑scale clinical analytics.


1. Problem Statement

Clinical datasets such as MIMIC‑IV contain tens of millions of rows and hundreds of attributes. Writing and maintaining raw SQL against such breadth is error‑prone and slow. We ask:

Can an MCP‑based abstraction simultaneously improve developer productivity and sustain (or enhance) runtime efficiency compared with traditional SQL‑only workflows?

To answer this we compare direct SQL against an MCP Server → Postgres path on identical workloads—ranging from a simple COUNT(*) on mimiciv_hosp.emar_detail (≈ 87 M rows) to multi‑table note aggregations.


2. Repository Layout

.
├── mimic-postgres/          # Scripts to create schemas & ingest MIMIC‑IV CSVs
├── src/            # Fork of azure_postgresql_mcp with env configs
└── README.md              # This file

3. Prerequisites

  • Python 3.10+
  • Node 18+ (optional, for additional MCP tooling)
  • Azure Database for PostgreSQL – Flexible Server (Standard_D4s v5 or larger)
  • MIMIC‑IV credential & data download permission
# core libs
pip install psycopg[binary] rich click pandas matplotlib
# benchmarking
pip install httpx pytest pytest‑benchmark
# MCP server
pip install mcp[cli] azure-identity azure-mgmt-postgresqlflexibleservers

4. Dataset Loading

cd data-loading
psql "$PGURI" -f 00_create_mimiciv_note_schema.sql
psql "$PGURI" -f 01_create_emar_tables.sql
python 02_bulk_copy.py --csv-root /path/to/mimic-iv

Estimated ingest time on Standard_D4s: ~45 min for 72 GB (11.7 M note rows + 87 M EMAR rows).


5. Starting the MCP Server

cd mcp-server
python azure_postgresql_mcp.py

Environment variables (PGHOST, PGUSER, PGPASSWORD, PGDATABASE) must be set or supplied in your Claude Desktop / VS Code configuration.

To use Microsoft Entra authentication instead of a password, set:

export AZURE_USE_AAD=True
export AZURE_SUBSCRIPTION_ID=...
export AZURE_RESOURCE_GROUP=...

6. Running Baselines

6.1 Direct SQL

python benchmarks/run_sql.py --query count_emar_detail

Outputs a single line like:

count=87,371,064 elapsed=101550.2 ms

6.2 MCP Server

python benchmarks/run_mcp.py --query count_emar_detail

Sample output:

count=87,371,064 elapsed=67560.1 ms

Multiple runs (default = 30) are aggregated into CSV under benchmarks/results/.


7. Key Results (Preview)

QueryDirect SQLMCP ServerΔ (ms)Δ %
COUNT(*) on emar_detail101,550 ms67,560 ms−33,990−33 %
LOC to implement workload #16823−45−66 %

8. Future Work

  • Enable Entra ID + RBAC and re‑benchmark connection latency.
  • Add pgvector semantic‑search benchmark via a custom MCP tool.
  • Run clinician UX trials comparing MCP+Claude vs. SQL IDE.

9. License & Citation

MIT License — see LICENSE.

If you use this code or results, please cite:

Menon S.K., N. (2025). MCP Server × PostgreSQL on MIMIC‑IV: productivity and performance comparison. Georgia Tech CS 6423 Final Project Report.

10. Acknowledgements

  • PhysioNet for access to the MIMIC‑IV dataset
  • Azure Database for PostgreSQL
  • Anthropic for the MCP specification and Claude Desktop tooling

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for querying MIMIC-IV clinical data on PostgreSQL from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mimic-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage