PerslyPersly API
MCP

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:

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/mcp

Then ask Claude to list your medical records — it will authenticate via your browser and return your data.

Available Tools

ToolDescriptionParameters
list_medical_dataList all your medical records with summariesNone
get_medical_recordGet full details of specific medical recordsids (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

ProblemSolution
No medical records foundCheck that your medical record requests are in COMPLETED status at persly.ai
Authentication failureEnsure you are logging in with the correct Persly account in the browser popup
Token expiredDisconnect and reconnect the MCP server in your AI client to re-authenticate

On this page