Connect AI Agents to Your Medical Data
Use the Model Context Protocol (MCP) to let AI assistants securely access your medical records.
Overview
The Model Context Protocol (MCP) is an open standard that enables AI agents to access external data sources. Persly MCP lets AI assistants securely access your medical records — lab results, health checkup certificates, outpatient visit records, and more.
Supported AI clients:
- Claude (Claude.ai, Claude Desktop, Claude Code, Claude Mobile)
- ChatGPT
- Cursor, VS Code, Windsurf, Zed, JetBrains
Prerequisites
- A Persly account (persly.ai)
- Completed medical record requests (status: COMPLETED)
- An MCP-compatible AI client
Quick Start
The fastest way to get started is with Claude Code:
claude mcp add --transport http persly-mcp https://mcp.persly.ai/mcpThen ask Claude to list your medical records — it will authenticate via your browser and return your data.
Available Tools
| Tool | Description | Parameters |
|---|---|---|
list_medical_data | List all your medical records with summaries | None |
get_medical_record | Get full details of specific medical records | ids (number[]) |
Example — list_medical_data
Returns a summary of all your completed medical records:
[
{
"id": 12345,
"type": "CERTIFICATE",
"date": "2026-03-15",
"hospitalName": "Seoul National University Hospital",
"summary": "General health checkup certificate"
},
{
"id": 12346,
"type": "MEDICAL_RECORD",
"date": "2026-02-20",
"hospitalName": "Samsung Medical Center",
"summary": "Outpatient visit record - Internal medicine"
}
]Example — get_medical_record
Returns full details including the markdown content of specific records:
[
{
"id": 12345,
"type": "CERTIFICATE",
"date": "2026-03-15",
"hospitalName": "Seoul National University Hospital",
"summary": "General health checkup certificate",
"markdown": "# Health Checkup Certificate\n\n**Patient**: ...\n**Date**: 2026-03-15\n...",
"pageStart": 1,
"pageEnd": 2
}
]Authentication & Security
Persly MCP uses OAuth 2.1 with PKCE for authentication:
- Browser-based login — You authenticate through your browser, no API keys needed
- User-scoped data — You can only access your own medical records
- COMPLETED records only — Only records with status COMPLETED are accessible
- Refresh tokens — Sessions stay active without repeated logins
- HTTPS only — All communication is encrypted end-to-end
No API key is required for MCP. Authentication happens through OAuth — your AI client will open a browser window for you to log in.
Troubleshooting
| Problem | Solution |
|---|---|
| No medical records found | Check that your medical record requests are in COMPLETED status at persly.ai |
| Authentication failure | Ensure you are logging in with the correct Persly account in the browser popup |
| Token expired | Disconnect and reconnect the MCP server in your AI client to re-authenticate |