metriport
Read and write patients, facilities, medical documents, and consolidated FHIR records in Metriport.
Should I use this
Quality & Safety
Findings (4)
- LOWin metriport_get_document_query_status
- LOWin metriport_list_consolidated_queries
- LOWin metriport_get_medical_record_summary
- LOWin metriport_start_consolidated_query
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"metriport": {
"url": "https://metriport.usefulapi.io/mcp"
}
}
}Remote endpoints
https://metriport.usefulapi.io/mcpstreamable-httpWhat it can do
Tool inventory
Tools (12)
🟢metriport_list_facilities
List all Facilities under your Metriport Organization (id, name, npi, address). Medical API: GET /medical/v1/facility.
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_get_facility(id)
Get a single Facility by its Metriport ID. Medical API: GET /medical/v1/facility/{id}.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The Metriport Facility ID."
}
},
"required": [
"id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_list_patients(facilityId)
List Patients — all Patients, or only those at a given Facility if facilityId is supplied. Medical API: GET /medical/v1/patient.
Input Schema
{
"type": "object",
"properties": {
"facilityId": {
"description": "Optional Facility ID to filter by. Omit to list all patients.",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_get_patient(id)
Get a single Patient by its Metriport ID (demographics + facility IDs). Medical API: GET /medical/v1/patient/{id}.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The Metriport Patient ID."
}
},
"required": [
"id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_list_documents(patientId, dateFrom, dateTo, content)
List the document references currently available for a Patient at Metriport (optionally filtered by date range and content search). Medical API: GET /medical/v1/document.
Input Schema
{
"type": "object",
"properties": {
"patientId": {
"type": "string",
"description": "The Patient ID whose available documents to list."
},
"dateFrom": {
"description": "Inclusive start date yyyy-mm-dd.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"dateTo": {
"description": "Inclusive end date yyyy-mm-dd.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"content": {
"description": "Text to search within the document reference and contents (min 3 chars).",
"type": "string"
}
},
"required": [
"patientId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_get_document_query_status(patientId)
Check the progress/status of a Patient's document query (download + FHIR conversion counts). Medical API: POST /medical/v1/document/query with only patientId (no facilityId) returns current status without starting a new query.
Input Schema
{
"type": "object",
"properties": {
"patientId": {
"type": "string",
"description": "The Patient ID whose document-query status to check."
}
},
"required": [
"patientId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_get_document_url(fileName, conversionType)
Get a temporary, downloadable URL for a document by its file name (optionally converting XML/CDA to html or pdf). Medical API: GET /medical/v1/document/download-url.
Input Schema
{
"type": "object",
"properties": {
"fileName": {
"type": "string",
"description": "The file name of the document (from metriport_list_documents)."
},
"conversionType": {
"description": "Optional doc type to convert to, e.g. pdf, html, xml (for XML/CDA files).",
"type": "string"
}
},
"required": [
"fileName"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_list_consolidated_queries(id)
Get the status of the Patient's consolidated-data (FHIR) queries. Medical API: GET /medical/v1/patient/{id}/consolidated/query.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The Metriport Patient ID."
}
},
"required": [
"id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢metriport_get_medical_record_summary(patientId, conversionType)
Get a URL to the Patient's medical record summary rendered as pdf or html. Medical API: GET /medical/v1/patient/{patientId}/medical-record.
Input Schema
{
"type": "object",
"properties": {
"patientId": {
"type": "string",
"description": "The Metriport Patient ID."
},
"conversionType": {
"type": "string",
"enum": [
"pdf",
"html"
],
"description": "The format to render: pdf or html."
}
},
"required": [
"patientId",
"conversionType"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴metriport_create_patient(facilityId, firstName, lastName, dob, genderAtBirth, ...)
Creates a Patient in Metriport (writes PHI and initiates health-information-exchange queries). Medical API: POST /medical/v1/patient (facilityId is a required query param).
Input Schema
{
"type": "object",
"properties": {
"facilityId": {
"type": "string",
"description": "REQUIRED. The Facility ID where the Patient receives care."
},
"firstName": {
"type": "string",
"description": "The Patient's first name(s)."
},
"lastName": {
"type": "string",
"description": "The Patient's last name(s)."
},
"dob": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date of birth, yyyy-mm-dd."
},
"genderAtBirth": {
"type": "string",
"enum": [
"M",
"F",
"O",
"U"
],
"description": "Gender at birth: M, F, O (other), or U (unknown)."
},
"address": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"addressLine1": {
"type": "string",
"description": "Street address line 1."
},
"addressLine2": {
"description": "Street address line 2 (apt/suite).",
"type": "string"
},
"city": {
"type": "string",
"description": "City."
},
"state": {
"type": "string",
"description": "2-letter US state code, e.g. CA."
},
"zip": {
"type": "string",
"description": "ZIP / postal code."
},
"country": {
"description": "Country. Defaults to USA.",
"type": "string"
}
},
"required": [
"addressLine1",
"city",
"state",
"zip"
]
},
"description": "One or more addresses for the Patient."
},
"middleName": {
"description": "The Patient's middle name(s).",
"type": "string"
},
"personalIdentifiers": {
"description": "Optional personal IDs (driver's license / SSN).",
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"driversLicense",
"ssn"
],
"description": "Identifier type."
},
"value": {
"type": "string",
"description": "The ID number."
},
"state": {
"description": "2-letter state code (required for driversLicense).",
"type": "string"
},
"assigner": {
"type": "string"
}
},
"required": [
"type",
"value"
]
}
},
"contact": {
"description": "Optional contact info (phone / email).",
"type": "array",
"items": {
"type": "object",
"properties": {
"phone": {
"description": "10-digit phone number, e.g. 1234567890.",
"type": "string"
},
"email": {
"description": "Email address.",
"type": "string"
}
}
}
}
},
"required": [
"facilityId",
"firstName",
"lastName",
"dob",
"genderAtBirth",
"address"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴metriport_start_document_query(patientId, facilityId, metadata)
Starts a document query — retrieves the patient's medical documents from connected HIE networks. Returns a requestId; results arrive asynchronously. Medical API: POST /medical/v1/document/query (patientId and facilityId are required query params).
Input Schema
{
"type": "object",
"properties": {
"patientId": {
"type": "string",
"description": "REQUIRED. The Patient ID to query documents for."
},
"facilityId": {
"type": "string",
"description": "REQUIRED. The Facility ID where the patient receives care."
},
"metadata": {
"description": "Optional custom string key-value pairs returned in the webhook.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"patientId",
"facilityId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴metriport_start_consolidated_query(id, resources, dateFrom, dateTo, conversionType, ...)
Starts a consolidated-data (FHIR) query for the patient. Returns a requestId; the bundle is delivered asynchronously (webhook). Medical API: POST /medical/v1/patient/{id}/consolidated/query.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The Metriport Patient ID."
},
"resources": {
"description": "Comma-separated, case-sensitive list of FHIR resource types. Omit for all.",
"type": "string"
},
"dateFrom": {
"description": "Inclusive start date yyyy-mm-dd.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"dateTo": {
"description": "Inclusive end date yyyy-mm-dd.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"conversionType": {
"description": "Output format: json, pdf, or html.",
"type": "string",
"enum": [
"json",
"pdf",
"html"
]
},
"metadata": {
"description": "Optional custom string key-value pairs returned in the webhook.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}Community
Evidence