ChartVoyant API & MCP
Patient MCP server
A Model Context Protocol server for patients, live since November 5, 2026. A patient creates a read-only key from their portal account and connects Claude, ChatGPT, Cursor, VS Code, or any MCP client to their own record at one practice.
https://chartvoyant.com/api/v1/portal/mcp
At a glance
| Status | Live in production since November 5, 2026. |
| Endpoint | https://chartvoyant.com/api/v1/portal/mcp with Authorization: Bearer cvpk_…, or https://chartvoyant.com/api/v1/portal/mcp/<key> for connectors that accept only a URL (such as custom connectors in Claude and ChatGPT). |
| Who it's for | A patient's own AI assistant. A key reads one patient's record at one practice, and no tool accepts a patient ID argument: the key is the patient. Practice staff agents use the Practice MCP server instead. |
| Authentication | A patient MCP key (cvpk_…) created by the patient. Portal sessions, practice API keys (cvk_…), and SMART tokens are refused with 401. |
| Access | Strictly read-only. Ten tools, each annotated readOnlyHint: true. None books, messages, pays, or modifies anything. |
| Transport & protocol | Stateless Streamable HTTP JSON-RPC 2.0 (POST only; GET/DELETE return 405). Supports MCP 2026-07-28, 2025-11-25, 2025-06-18, and 2025-03-26. |
| Limits | Request bodies up to 256 KB. Per key: 20 req/sec, 300 req/min, and 5,000 req/hr, then 429 with Retry-After. Tool outputs cap at 60,000 characters. |
| Audit | Every tool call writes a portal.mcp.tool.read event to the practice's audit log naming the patient, key prefix, tool, argument names, and client name. Argument values, results, and the secret key are never logged. |
How patient keys work
- Created only by the patient. In the portal under Account → AI assistants, or at chartvoyant.com/mcp-self-register. The patient re-enters their portal password and acknowledges the HIPAA warning before the key is minted.
- One patient, one practice. A patient seen at two ChartVoyant practices creates a separate key at each practice.
- Shown once, hashed at rest. Only a SHA-256 hash is stored; later views show only the prefix, label, last-used timestamp/app, and last four characters.
- Expiring & immediately revocable. Lifetimes of 30, 90 (default), 180, or 365 days; up to 10 active keys per patient. Revoking in the portal or disabling the portal account invalidates the key on the next request.
- Treat connector URLs like passwords. Quiet nginx logging strips the URL key segment from access logs, but anyone holding the URL can read the patient's portal record.
Connect a client
Patients receive pre-filled instructions when they create a key at chartvoyant.com/mcp-self-register. Replace <key> below with a cvpk_… token:
Claude (web, desktop, mobile) — Custom Connector
# Customize → Connectors → Add custom connector Name: ChartVoyant URL: https://chartvoyant.com/api/v1/portal/mcp/<key> Sign-in: none (the key is in the URL)
ChatGPT (Developer mode connector)
URL: https://chartvoyant.com/api/v1/portal/mcp/<key>
Claude Code / Cursor / VS Code / Gemini CLI / HTTP
claude mcp add --transport http chartvoyant-health https://chartvoyant.com/api/v1/portal/mcp \ --header "Authorization: Bearer $CHARTVOYANT_PATIENT_KEY"
{
"mcpServers": {
"chartvoyant-health": {
"url": "https://chartvoyant.com/api/v1/portal/mcp",
"headers": { "Authorization": "Bearer <key>" }
}
}
}curl https://chartvoyant.com/api/v1/portal/mcp \
-H "Authorization: Bearer $CHARTVOYANT_PATIENT_KEY" \
-H "Content-Type: application/json" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_overview","arguments":{}}}'
VS Code's user mcp.json nests servers under "servers" with "type": "http"; Gemini CLI's ~/.gemini/settings.json uses "httpUrl"; stdio-only clients can bridge via npx -y mcp-remote https://chartvoyant.com/api/v1/portal/mcp --header "Authorization: Bearer <key>".
Ten read-only tools
| Tool | Arguments | Returns |
|---|---|---|
get_overview | None | Start here: patient identity, practice locations/phones and today's practice-local date, next appointment, counts of results and visit summaries, open messages, and current balance. |
list_appointments | when (upcoming, past, all), limit (1–50, default 10) | Date/time, visit type, provider, location, status, reason, and whether the visit summary is signed. |
list_test_results | search (≤80 chars), since (YYYY-MM-DD), limit (1–50, default 20) | Portal-released final results, newest first, with abnormal flags, conclusion, care-team note, and result_id. |
get_test_result | result_id | Every component value, unit, reference range, abnormal flag, lab comment, conclusion, and care-team message. |
list_visit_summaries | limit (1–20, default 10) | Signed visit notes, newest first, with plan preview, after-visit summary flag, and visit_summary_id. |
get_visit_summary | visit_summary_id | Signed note text (first 24,000 chars), patient after-visit summary, and any addenda. |
get_health_summary | None | Active problem list, active medications with instructions, and active allergies with reactions. |
get_billing_summary | None | Amount owed (formatted USD + amount_you_owe_cents), pending insurance amounts, visit charges, open balances, and recent payments. |
list_messages | limit (1–50, default 20) | Portal messages, appointment requests, and refill requests sent by the patient, with status and message_id. |
get_message | message_id | Full chronological thread of patient messages and practice replies. |
What a tool returns
- Strictly portal-equivalent visibility. Unreleased results, unsigned draft notes, and inactive chart items never appear.
- Dual-format output.
content[0]is a one-line summary,content[1]is JSON text, andstructuredContentcarries the parsed object (omitted if truncated at 60,000 characters). - Practice-local wall-clock times. Appointment
startsvalues use wall-clock strings like2026-11-12T09:30alongside human-readable labels. - Prompt-injection defense instructions. Server instructions tell the model to treat chart text strictly as data, explain in plain language without diagnosing, and direct urgent concerns to the practice or 911 / 988.
Privacy and audit
Patient-directed sharing. Nothing leaves ChartVoyant until the patient creates a key and hands it to their chosen AI app. Once shared with a consumer AI app, HIPAA's privacy rules generally do not govern that third-party vendor — the patient sees and confirms this disclosure before minting a key.
Errors
| Status | Meaning |
|---|---|
401 | Missing, non-patient, unknown, expired, or revoked key. Includes WWW-Authenticate: Bearer realm="ChartVoyant patient MCP", error="invalid_token". |
400 | Malformed JSON-RPC message, header mismatch (-32020), or unsupported protocol version (-32022). |
403 | Disallowed browser Origin header. |
404 | Unknown JSON-RPC method on a 2026-07-28 request (-32601). |
405 | GET or DELETE (stateless POST-only server). |
429 | Per-key rate limit exceeded; honor Retry-After. |
| Tool error | Invalid tool arguments or unknown record IDs return a normal JSON-RPC result with isError: true. |
Building multi-patient apps
Never ask patients to email or paste cvpk_… keys into a hosted web service you operate. If you are building an application serving multiple patients, register a SMART on FHIR app instead so patients authorize via OAuth 2 + PKCE without handling raw secrets. To request a synthetic patient portal account for MCP client testing, email info@chartvoyant.com.