MCP Quickstart
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
Look up any endpoint
Walk through use-case guides
Answer any API question
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
| Tool | What it does |
|---|---|
list_use_cases | List all use-case guides and the recommended execution order |
show_doctor_availability | Guide: care units → resources → services → timeslots |
book_appointment | Guide: book a patient appointment |
write_medical_note | Guide: write a medical note for a patient |
attach_document | Guide: attach a document to a patient record |
find_patient | Guide: search for a patient and retrieve their ID |
create_patient | Guide: create or upsert a patient record |
search_docs | Full-text search across all Leyr documentation |
get_doc_page | Fetch a specific documentation page by slug |
list_doc_sections | Browse all available documentation sections |
get_openapi_schema | Full OpenAPI schema summary with all endpoints listed |
search_endpoints | Search endpoints by keyword, tag, or path |
get_endpoint | Get 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 accountMedical Notes Setup
Medical notes allow you to create and retrieve clinical documentation in the EHR on behalf of your users. Before you can use the Medical Notes API, you need to configure a medical notes mapping for the EHR in your application settings in the Developer Portal.
Setup Guides for our EHRs
Here we have prepared setup guides for EHRs supported by Leyr. These guides will help you to configure EHRs for integrations and get required credentials.