# Metriport MCP connector

The Metriport connector lets Claude, ChatGPT, Cursor, and the Elaichi Agent register patients, request medical record summaries, run document queries, and manage facilities and cohorts in Metriport, each person signed in as themselves, every action logged.

Source: https://elaichi.ai/connectors/metriport/

## Facts

| | |
| --- | --- |
| Application | Metriport |
| Category | Healthcare |
| AI tools | 61 |
| Authentication | Connects with an API key |
| Needs your own OAuth app | No |
| MCP endpoint | https://api.elaichi.ai/mcp |
| Works with | Claude, ChatGPT, Cursor, any MCP client, and the Elaichi Agent |
| Tools advertised by name | No. 61 tools is past the 30-tool threshold, so clients use `search_tools` and `execute_tool` |

## What you can ask once Metriport is connected

- Show Metriport patients added to cohorts this week.
- Get the medical record summary for patient 4821.
- Which facilities are set on our newest Metriport patients?

## Connect Metriport in Elaichi

This happens once for the organization, before any client is involved.

1. Open Connections, choose Add connection, and pick Metriport.
2. Optionally set Share with, then press Connect.
3. Paste a Metriport API key. One person generates a token in Metriport and pastes it once. Everyone else works through Share with, and never sees it.

Credentials are vaulted and nobody, including the AI, reads them back. The connection becomes a toolbox immediately, so you can curate which Metriport tools are exposed, rename them, or freeze arguments before anyone points a client at it.

## Connect Metriport to Claude

Endpoint: https://api.elaichi.ai/mcp

1. Open Customize, then Connectors.
2. Press Add.
3. Name it, paste the MCP server URL, then Continue.
4. Sign in and approve.

On Team and Enterprise, an Owner adds it once. Everyone else turns it on for themselves.

## Connect Metriport to ChatGPT

Endpoint: https://api.elaichi.ai/mcp

1. Open Plugins, then press the + button.
2. Name it and paste the endpoint into Server URL.
3. Leave Authentication on OAuth, then tick the risk acknowledgement.
4. Press Create, then sign in and approve.

Works on the web today. The plugin directory lives at chatgpt.com/plugins.

## Connect Metriport to Cursor

Endpoint: https://api.elaichi.ai/mcp

1. Open `~/.cursor/mcp.json`.
2. Add the endpoint under `mcpServers`.
3. Reload Cursor, then sign in and approve.

Set up per machine, so repeat it on each computer you work from.

## Connect Metriport to any MCP client

Endpoint: https://api.elaichi.ai/mcp

1. Add the endpoint as a remote MCP server.
2. Sign in and approve.

The Elaichi Agent already has these tools, with nothing to set up.

## What the consent screen decides

Only Read is granted by default, which is not enough to call a Metriport tool. Over MCP there is no trusted place to confirm a write in the moment, so the consent screen is the standing approval rather than a formality. Grant Read and Run tools. Think hard before granting Delete, which reaches into connected apps and cannot be undone.

## What teams do with Metriport through Elaichi

### Register a new patient before their visit

Intake. Add a patient to Metriport with their demographics and the facility they are being seen at, so their outside records can start being gathered before they arrive.

### Pull a medical record summary for a referral

Care coordination. Ask for a patient's consolidated medical record summary in Metriport and check whether it is ready, so the referring notes, medications, and history are in hand before the appointment.

### Check on a record query that is still running

Clinical operations. Start a document query for a patient and ask how far along it is, instead of refreshing a dashboard while a clinician waits.

### Find the right patient and avoid duplicates

Health information management. Match a person against existing Metriport patients, look them up by the ID from your own system, and fix demographics on the record without creating a second one.

### Group patients into a cohort for outreach

Population health. Add a list of patients to a cohort in Metriport, see which cohorts a patient already belongs to, and keep treatment relationships current as a panel changes.

### Keep facilities and rosters up to date

Practice administration. Add a new clinic location, update its details, and bulk create or update patients when a practice or a batch of new patients joins.

## Frequently asked questions

### How do I connect Metriport to Claude?

Connect Metriport in Elaichi first: pick Metriport from the catalog and paste in the API key from your Metriport dashboard, then in Claude go to Customize, then Connectors, then Add, and paste the endpoint https://api.elaichi.ai/mcp. That is the whole setup, and there is no client ID or secret to generate. Sign in with your Elaichi account and Claude can start working with Metriport patients, facilities, and record queries.

### Does Metriport work with ChatGPT and Cursor as well as Claude?

Yes. Once Metriport is connected in Elaichi, the same endpoint, https://api.elaichi.ai/mcp, works in Claude, ChatGPT, Cursor, any other MCP client, and the Elaichi Agent. You connect Metriport once and every client you use picks it up.

### What can an AI agent actually do with my Metriport data?

An agent can register a patient in Metriport, match a person against existing patients, update demographics, and request a medical record summary or start a document query and tell you when it is ready. It can also add patients to cohorts, set which facility a patient is seen at, and keep facility details current. Because Metriport exposes a lot of actions, short concrete asks such as "get the record summary status for this patient" work better than long paragraphs.

### Does connecting Metriport give the AI access to every patient?

No. Every request to Metriport runs with the access of the person who signed in to Elaichi, so an agent can only reach the patients, facilities, and records that person's Metriport access already allows. Elaichi can narrow that further by hiding actions or whole groups of actions, but it can never grant more than the person already has.

### Can my team share one Metriport connection?

Yes. One administrator connects Metriport in Elaichi and shares the connection with a team, and nobody else on the team ever sees or handles the API key. Each teammate still signs in to Elaichi as themselves, so the audit log names the actual person who registered a patient or requested a record, not a shared account.

### Can I stop an agent from deleting or changing things in Metriport?

Yes. Restrictions in Elaichi work per action, so you can allow reading Metriport patients and record summaries while blocking deleting patients or removing facilities. A blocked action is never shown to Claude, ChatGPT, or any other client, so no prompt, however worded, can reach it.

### What happens to a Metriport connection when someone leaves?

Offboarding a person in Elaichi ends their access to Metriport through every client at once, with no keys to rotate on their way out. A shared Metriport connection keeps working for everyone else on the team. If you ever want to remove Metriport entirely, disconnecting it once in Elaichi removes it from Claude, ChatGPT, Cursor, and every other client at the same time.

## All 61 Metriport tools

Every tool below is callable through https://api.elaichi.ai/mcp once Metriport is connected, subject to the toolbox it is in and the restrictions on the caller.

- **Create a Metriport patient** (Create). Create a new patient in Metriport for a specified facility where the patient is receiving care. Returns the created patient object including id, firstName, lastName, dob, genderAtBirth, address, personalIdentifiers, and facilityIds. Required: facilityId, firstName, lastName, dob, genderAtBirth, address.
- **Get single Metriport patient by ID** (Get). Get a single Metriport patient by id. Returns: id, eTag, firstName, lastName, dob, genderAtBirth, address, personalIdentifiers, and facilityIds. Required: id.
- **Update a Metriport patient by ID** (Update). Update a Metriport patient's demographics, personal identifiers, address, contact info, and consent status. Returns the updated patient object including id, eTag, firstName, lastName, dob, genderAtBirth, address, personalIdentifiers, and facilityIds. Required: id, facilityId.
- **List all Metriport patients** (List). List Patients in Metriport, optionally filtered by the Facility where they receive care. Returns: id, firstName, lastName, dob, genderAtBirth, address, personalIdentifiers, facilityIds, eTag. All Patients are returned when no facility is specified.
- **Delete a Metriport patient by ID** (Delete). Delete a Metriport patient by id. Returns an empty 204 response on success. Required: id.
- **Metriport patients get medical record summary** (Get). Get the Medical Record Summary download URL for a Metriport patient in PDF or HTML format. Returns: url, facilities. Required: patient_id, conversionType. The download URL is valid for 600 seconds (10 minutes).
- **Metriport patients get medical record summary status** (Get). Check if a Medical Record Summary already exists for a Metriport patient and when it was generated in PDF and HTML formats. Returns: htmlCreatedAt, pdfCreatedAt. Required: patient_id.
- **Metriport patients match** (Action). Match an existing Metriport patient by demographics without creating a new record — use it to resolve your patient to a Metriport patient id before other calls. Returns the matched patient: id, eTag, firstName, lastName, dob, genderAtBirth, address, personalIdentifiers, contact, and facilityIds. Returns 404 if no patient matches. Required: firstName, lastName, dob, genderAtBirth.
- **Metriport patients bulk create** (Create). Create a batch of patients in Metriport and initiate Document Queries for all of them. This is an asynchronous endpoint — the response contains a presigned upload URL for a CSV file of patient demographics that is valid for 10 minutes. Returns: requestId, status, uploadUrl. Supports a maximum of 100,000 patients per batch.
- **Metriport patients get by external ID** (Get). Get a Metriport patient by their external identifier (the ID from your internal system/EHR). Returns: id, eTag, firstName, lastName, dob, genderAtBirth, address, personalIdentifiers, facilityIds. Required: externalId.
- **Metriport patients get facilities** (Get). Get all facilities associated with a Metriport patient. Returns each facility's id, eTag, oid, name, npi, tin, active, and address. Required: patient_id.
- **Metriport patients set facilities** (Set). Set (replace) all facilities associated with a Metriport patient. This operation overrides any existing facility associations. Returns the facilities array including each facility's id, eTag, oid, name, npi, tin, active, and address. Required: patient_id, facilityIds.
- **Metriport patients update treatment relationship** (Update). Update a patient's treatment relationship consent status in Metriport. Set to true to grant consent or false to revoke it; revoking automatically removes the patient from all treatment cohorts. Returns: id, treatmentRelationship, message, requestId, status, uploadUrl. Required: patient_id, treatmentRelationship.
- **Metriport patients add to cohorts** (Add). Add a Metriport patient to multiple cohorts at once. Returns: cohorts — an array of cohort objects, each with id, name, description, color, settings, and size. Required: patient_id, cohortIds. Cohorts the patient already belongs to are silently skipped; patients without a treatment relationship cannot be added to treatment cohorts.
- **Metriport patients list cohorts** (List). List all cohorts a Metriport patient is a member of. Returns: id, eTag, name, description, color, settings, size. Required: patient_id.
- **Metriport patients sync external** (Sync). Sync a Metriport patient with an external EHR system, creating a link between the Metriport Patient and the external system when automatic synchronization isn't possible. Returns: patientId, externalId. Required: patient_id.
- **Metriport patients bulk update** (Update). Update a Metriport patient's Health Information Exchange (HIE) opt-out status. Returns: id, hieOptOut, message, requestId, status, uploadUrl. Required: patient_id, hieOptOut.
- **Create a Metriport facility** (Create). Create a new Facility in Metriport where your patients receive care. Returns the created facility object including id, oid, name, npi, tin, active, and address. Required: name, npi, tin, active, address.
- **Get single Metriport facility by ID** (Get). Get a single Metriport Facility by id. Returns the facility object including id, oid, name, npi, tin, active, and address. Required: id.
- **Update a Metriport facility by ID** (Update). Update a Metriport Facility by id. Returns the updated facility object including id, oid, name, npi, tin, active, and address. Required: id, name, npi, tin, active, address.
- **List all Metriport facilities** (List). List all Facilities created under your Metriport organization. Returns: id, eTag, oid, name, npi, tin, active, address.
- **Delete a Metriport facility by ID** (Delete). Delete a Metriport Facility by id. Returns an empty 204 response on success. Cannot delete a Facility that has patients associated with it. Required: id.
- **Metriport documents start query** (Search). Trigger a document query for a specified patient across HIEs in Metriport to retrieve their clinical documents asynchronously. Returns: status, requestId. Required: patientId.
- **Metriport documents get query status** (Search). Get the status of a document query previously started for a specified patient in Metriport. Returns: status, requestId. Required: patientId.
- **List all Metriport documents** (List). List all FHIR DocumentReferences retrievable for a Patient in Metriport, with optional date range and content search filters. Returns DocumentReference objects including id, resourceType, status, type, subject, description, date, content (with attachment download URLs), author, and context. Required: patientId.
- **Metriport documents get URL** (Get). Get a downloadable URL for a Metriport document by file name. Returns: url, documents. Required: fileName. The URL is valid for 60 seconds; optional conversionType converts XML/CDA files to html or pdf.
- **Metriport documents upload** (Upload). Create a DocumentReference in Metriport and receive an upload URL for a medical document. Returns: documentReferenceId, uploadUrl. Required: patientId, type, description, context. Uploads are limited to 50MB per file.
- **Metriport documents start bulk get URL** (Start). Start a bulk download URL generation process for all of a patient's documents in Metriport. Returns: status, requestId. Required: patientId. The process is asynchronous — completed URLs are delivered via webhook. Only one bulk process runs per patient at a time; re-triggering while running returns the current progress.
- **Metriport consolidated data start query** (Search). Start an asynchronous consolidated data query for a Metriport patient to retrieve cached data in FHIR JSON, PDF, or HTML format. Returns: requestId, status, startedAt, dateFrom, dateTo, resources, conversionType, queries, message. Required: patient_id, conversionType. Results are delivered via webhook when ready; if identical parameters match an in-progress query, the previous request's status is…
- **Metriport consolidated data get query status** (Search). Get the status of all in-progress consolidated data queries for a Metriport patient. Returns: queries, message. Required: patient_id.
- **Metriport consolidated data get single query status** (Search). Get the status of a single consolidated data query for a Metriport patient by request ID. Returns: requestId, status, startedAt, dateFrom, dateTo, resources, conversionType. Required: patient_id, request_id.
- **Create a Metriport consolidated datum** (Create). Contribute FHIR resources to a Metriport patient's consolidated data by uploading a FHIR Bundle of type collection. Returns: resourceType, id, type, entry. Required: patient_id, resourceType, type, entry. Content-length must not exceed 1MB (50 resources in sandbox).
- **Metriport consolidated data count** (Action). Get a count of a Metriport patient's consolidated data per FHIR resource type, with optional date and resource-type filters. Returns: total, resources, filter. Required: patient_id.
- **Create a Metriport cohort** (Create). Create a new Metriport cohort for organizing and managing groups of patients. Returns: id, eTag, name, description, color, settings, size, token. Cohort names must be unique within your organization. Required: name.
- **Get single Metriport cohort by ID** (Get). Get a single Metriport cohort by id, including the count of patients assigned to it. Returns: id, eTag, name, description, color, settings, size. Required: id.
- **List all Metriport cohorts** (List). List all cohorts defined by your organization in Metriport. Returns an array of cohorts, each with id, eTag, name, description, color, settings, and size.
- **Update a Metriport cohort by ID** (Update). Update an existing Metriport cohort's details (name, description, color, settings). All fields are optional; omitted fields remain unchanged and empty strings clear values. Returns: id, eTag, name, description, color, settings, size. Required: id.
- **Delete a Metriport cohort by ID** (Delete). Delete a Metriport cohort by id. The cohort must be empty — remove all patients first or the API Returns an empty 204 response on success. Returns an empty 204 response on success. Required: id.
- **Metriport cohorts add patients** (Add). Add patients to a Metriport cohort in bulk. Returns the updated cohort including id, name, description, color, settings, size, and a message. Required: cohort_id. Provide either patientIds or allPatients in the body, but not both.
- **Metriport cohorts remove patients** (Delete). Remove patients from a Metriport cohort in bulk. Returns the updated cohort including id, name, description, color, settings, size, and a message. Required: cohort_id. Provide either patientIds or allPatients in the body, but not both.
- **Metriport cohorts list patients** (List). List all patients that are members of a Metriport cohort. Returns: id, eTag, firstName, lastName, dob, genderAtBirth, address, personalIdentifiers, facilityIds. Required: cohort_id. Max 100 items per page.
- **Create a Metriport organization** (Create). Register a new Organization in Metriport representing your legal corporate entity. Returns the created organization including its id, name, type, and location with full address details. Required: type, name, and location containing addressLine1, city, state, zip, and country.
- **List all Metriport organizations** (List). Get the Metriport organization representing your legal corporate entity. Returns: id, type, name, location, facilities.
- **Update a Metriport organization by ID** (Update). Update your Metriport organization's details by id. Returns the updated organization object including id, type, name, and location. Required: id.
- **Metriport messages send** (Send). Send a secure message to another practitioner in the Metriport network regarding a specific patient. Returns the Message object with an initial status of processing; use the returned id to poll via Get Message Status or receive a webhook when delivery completes or fails. Required: patientId, destination. Sending is asynchronous.
- **Get single Metriport message by ID** (Get). Get the status of a previously sent message in Metriport. Returns: id, patientId, direction, status, transportMethod, network, destination, subject, body, attachments, intendedRecipientNpi, sentAt, updatedAt. Required: id.
- **List all Metriport messages** (List). List all inbound and outbound secure messages for your Metriport organization, optionally filtered by direction, patient, destination, or status. Returns: id, patientId, direction, status, transportMethod, network, destination, subject, body, attachments, intendedRecipientNpi, sentAt, updatedAt. Some inbound messages may not be tied to a specific patient.
- **Metriport network queries start** (Start). Trigger a network query for a Metriport patient to retrieve health data from HIEs, pharmacies, and laboratories. Returns: meta, networkEntries. Required: patient_id. The endpoint returns 2XX even on partial source failures—always check the errors array for source-level failures.
- **Metriport network queries get status** (Get). Get the status of a Metriport network query to check its progress in retrieving patient health data from HIEs, pharmacies, and laboratories. Returns: meta (itemsOnPage, itemsInTotal) and networkEntries, each with name, oid, npi, addressLine, city, state, zipCode, rootOrganization, managingOrgOid, network, and supportsMessaging. Required: patient_id, request_id — obtain request_id from the start method.
- **List all Metriport network entries** (List). List HIE (network) directory entries available to your Metriport account, with optional full-text and exact-match filters. Returns: name, oid, npi, addressLine, city, state, zipCode, rootOrganization, managingOrgOid, network, supportsMessaging.
- **List all Metriport settings** (List). Get the Metriport account settings. Returns: id, webhookUrl, webhookKey.
- **Update a Metriport setting by ID** (Update). Update the Metriport account settings, storing a new webhook URL. Returns: id, webhookUrl, webhookKey. Required: webhookUrl.
- **Metriport settings get webhook status** (Get). Get the status of communication with your app's webhook in Metriport. Returns: webhookEnabled, webhookStatusDetail, webhookRequestsProcessing, webhookRequestsFailed. Might return an empty body if no settings are stored for your account yet.
- **Metriport settings retry webhook** (Action). Retry failed webhook requests in Metriport. Returns an empty 204 response on success.
- **Metriport tokens create embed** (Create). Create an embed access token for embedding Metriport in your application. Returns: token. The optional expirationInSeconds body field accepts a maximum of 36000 seconds (10 hours).
- **Get single Metriport care gap by ID** (Get). Get detailed information about a specific Metriport care gap measure report. Returns a FHIR Bundle including a Patient resource, the full MeasureReport with population membership data, and a Parameters resource with supporting calculation details. Required: id.
- **List all Metriport care gaps** (List). List care gaps across all patients in your Metriport organization. Returns: resourceType, type, entry.
- **Metriport care gaps list for patient** (List). List care gaps for a single Metriport patient. Returns: resourceType, type, entry. Required: patient_id.
- **Metriport suspects list for patient** (List). List suspected conditions for a Metriport patient as FHIR Bundles. Returns each result as a FHIR Bundle with resourceType, type, and entry (containing a Patient, the suspected Condition, and supporting Observation/Procedure/MedicationRequest evidence). Required: patient_id.
- **Create a Metriport identity session** (Create). Start a hosted IAL2 identity verification session for a Metriport patient, returning a single-use URL where the user completes verification with an approved Credential Service Provider. Returns: sessionId, sessionUrl, expiresAt, status. Required: patientId, redirectUrl. The sessionUrl is single-use and the redirectUrl must be on the account's allowlist.
- **Create a Metriport aal 2 challenge** (Create). Create a multifactor AAL2 challenge for a verified Metriport user. Returns a single-use challenge URL along with its challengeId, expiry timestamp, and authentication method (totp or webauthn). Required: proofedIdentityId, redirectUrl.
