Connects to Epic MyChart patient portals: interactive login, list and download your own test results
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:
/app/test-results) first, then classic routes, with permissive selectors.| 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). |
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
{
"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.
| 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. |
mychart_set_provider with your portal URL (e.g. https://mychart.example-health.org/MyChart)mychart_login → sign in + MFA in the window that opens (check "Remember this device")mychart_list_test_results → returns r1, r2, ...mychart_get_test_result r1 or mychart_download_test_result r1Everything lives in ~/.mychart-mcp/ — keep it out of synced folders (the Chromium profile does not tolerate file sync):
config.json — provider URLbrowser-profile/ — persistent Chromium profilestorage-state.json — exported session cookies (replayed on each launch)results-cache.json — id → result-URL map from the last list calldownloads/ — PDFs and screenshotsmychart_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.page.pdf), which is version-independent, rather than hunting for per-version "Download" buttons.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.MIT
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y mychart-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-kriskraw80-mychart": {
"command": "npx",
"args": [
"-y",
"mychart-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencemychart-mcp-servernpmio.github.kriskraw80/mychart works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.