Connects to Epic MyChart patient portals to log in, list test results, and download them as PDFs so an AI assistant can help understand your own lab work.

Connects to Epic MyChart patient portals to log in, list test results, and download them as PDFs so an AI assistant can help understand your own lab work.

MyChart MCP Server

Category
访问服务器

README

MyChart MCP Server

An MCP (Model Context Protocol) server that connects to any Epic MyChart patient portal to log in, list your test results, and download them as PDFs — so an AI assistant can help you understand your own lab work.

Epic offers no simple public login API (the official FHIR route requires per-organization app registration), so this server drives the MyChart website with Playwright:

  • Login is interactive and private — a visible browser window opens; you type your username/password and complete MFA yourself. Credentials never pass through the AI, the MCP protocol, or this server's tool arguments.
  • Session persists — cookies (including MyChart's session-scoped auth cookie) are exported to disk after login and replayed on every launch, so subsequent operations run headless until the portal expires the session server-side.
  • Works across MyChart versions — scraping tries the modern SPA routes (/app/test-results) first, then classic routes, with permissive selectors.

Tools

Tool Purpose
mychart_set_provider Set your health system's MyChart URL (one-time). Paste any URL from their MyChart site.
mychart_login Opens a visible browser window; you sign in + complete MFA there.
mychart_session_status Check provider config + whether the saved session is still valid.
mychart_list_test_results List ALL test results (auto-expands "Show more"), with ids r1, r2, ....
mychart_get_test_result Full readable content of one result (values, ranges, comments).
mychart_download_test_result Save a result as PDF to ~/.mychart-mcp/downloads.
mychart_screenshot Debug: full-page PNG of what the automation browser sees.
mychart_close_browser Close the browser process (session stays saved on disk).

Installation

npm install -g mychart-mcp-server
npx playwright install chromium

Or from source:

git clone https://github.com/kriskraw80/mychart-mcp-server.git
cd mychart-mcp-server
npm install
npx playwright install chromium
npm run build

Register with Claude Code / Claude Desktop

{
  "mcpServers": {
    "mychart": {
      "command": "npx",
      "args": ["mychart-mcp-server"]
    }
  }
}

(Or point command at node with args: ["<path>/dist/index.js"] for a source checkout.) Restart your MCP client after config changes.

Optional environment variables

Variable Purpose
MYCHART_URL Default provider URL (alternative to mychart_set_provider).
MYCHART_USERNAME / MYCHART_PASSWORD If set on the server process, the login form is pre-filled (MFA is still completed by you in the window). Optional — typing in the window is the default and safest.

Typical flow

  1. mychart_set_provider with your portal URL (e.g. https://mychart.example-health.org/MyChart)
  2. mychart_login → sign in + MFA in the window that opens (check "Remember this device")
  3. mychart_list_test_results → returns r1, r2, ...
  4. mychart_get_test_result r1 or mychart_download_test_result r1

Data locations

Everything lives in ~/.mychart-mcp/ — keep it out of synced folders (the Chromium profile does not tolerate file sync):

  • config.json — provider URL
  • browser-profile/ — persistent Chromium profile
  • storage-state.json — exported session cookies (replayed on each launch)
  • results-cache.json — id → result-URL map from the last list call
  • downloads/ — PDFs and screenshots

Notes & limitations

  • Personal use, no warranty. This tool automates the MyChart web portal to access your own health records — a right you have under HIPAA — but portal scraping is not officially sanctioned by Epic. Use at your own discretion.
  • MyChart's DOM varies by health system and Epic version. If listing finds nothing, use mychart_screenshot to see the rendered page; selectors may need a tweak for your provider. Some systems host MyChart on non-obvious domains (e.g. secure.<org>.org rather than mychart.<org>.org) — paste the URL straight from your browser.
  • The server prefers your system-installed Chrome (then Edge, then Playwright's bundled Chromium) — real Chrome's app-bound cookie encryption requires the whole profile to stay on one browser brand, and some Windows machines can't run the bundled build.
  • PDF download renders the result detail page via headless Chrome (page.pdf), which is version-independent, rather than hunting for per-version "Download" buttons.
  • Sessions expire server-side after idle time; just run mychart_login again.
  • login-helper.mjs, run-direct.mjs, and run-batch.mjs drive the built dist/ code directly — handy for re-login or batch fetching without an MCP client in the loop.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选