Leyr
What is Leyr?

MCP Quickstart

Give your AI coding assistant full context about the Leyr API — docs, endpoint reference, and use-case guides via MCP.

Leyr Docs MCP Server

Add one URL to your IDE. Your AI assistant gets full access to every Leyr endpoint, use-case guide, and code example — and can write correct integration code from your first prompt.

No credentials required. No install. No account needed.


What your AI can do

Write integration code

Ask your AI to generate working Python or JavaScript for any Leyr workflow — booking appointments, writing notes, finding patients — and get code that matches the actual API contracts.

Look up any endpoint

Search all 40+ Leyr API endpoints by keyword, tag, or path. Get full parameter details, request shapes, and response schemas without leaving your editor.

Walk through use-case guides

Step-by-step quickstarts for every major workflow — from showing doctor availability to attaching documents — with complete end-to-end flows.

Answer any API question

Patient ID formats, error codes, EHR-specific quirks, rate limits — your AI can answer instantly using the real Leyr documentation.

Setup

No installation required. The MCP server runs as part of the Leyr docs site — just point your IDE at the URL.

No Leyr account needed to use the docs server.

Add to your IDE

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "leyr-docs": {
      "url": "https://docs.leyr.io/mcp"
    }
  }
}

Restart your IDE after saving the config.


Available tools

ToolWhat it does
list_use_casesList all use-case guides and the recommended execution order
show_doctor_availabilityGuide: care units → resources → services → timeslots
book_appointmentGuide: book a patient appointment
write_medical_noteGuide: write a medical note for a patient
attach_documentGuide: attach a document to a patient record
find_patientGuide: search for a patient and retrieve their ID
create_patientGuide: create or upsert a patient record
search_docsFull-text search across all Leyr documentation
get_doc_pageFetch a specific documentation page by slug
list_doc_sectionsBrowse all available documentation sections
get_openapi_schemaFull OpenAPI schema summary with all endpoints listed
search_endpointsSearch endpoints by keyword, tag, or path
get_endpointGet full details for a specific endpoint

Example prompts

Once connected, try asking your AI:

"Show me the full availability and booking flow for Webdoc in Python"

"Look up a patient by Swedish personal number and show me the exact request shape"

"Write a medical note for patient 12345 using the unstructured template"

"What's the difference between emr_id and se_personal_number patient IDs?"

"List all endpoints that support creating resources in Webdoc"


Ready to make real API calls?

The MCP server covers the docs — for live API access you'll need a Leyr account and credentials:

Create a Leyr account
Questions, requests, or suggestions for our MCP? Reach out at contact@leyr.io.
Leyr © 2026