Clinia
API Reference

API Overview

Patient Memory exposes two API surfaces: MCP tools for AI agent integration and a REST API for direct HTTP access.

API Overview

Patient Memory exposes two API surfaces backed by the same underlying data.

Base URL

https://api.<workspace-id>.clinia.cloud

Replace <workspace-id> with your workspace identifier.

REST API

The REST API provides direct HTTP access plus ingest endpoints:

Endpoint groupPurpose
GET /patientsList all registered patients
GET /patients/:idPatient metadata and stats
GET /patients/:id/vfsBrowse the VFS
GET /patients/:id/readRead VFS content
GET /patients/:id/resolutionAudit entity resolution decisions
GET /patients/:id/reconciliationView pipeline reconciliation summary
POST /patients/:id/ingest/*Ingest FHIR, CDA, or documents
DELETE /patients/:idRemove a patient from the registry

Use REST for server-side integrations, dashboards, or when you need ingest endpoints.

MCP Tools

The MCP endpoint at /mcp is designed for AI agent integration. It exposes the Virtual File System as four tools:

ToolPurpose
browse_patientNavigate the VFS directory structure
read_patientRead content from a VFS path
search_patientFull-text search across all patient data
get_patient_infoPatient demographics and pipeline statistics

Use MCP when building AI agents with the Model Context Protocol SDK. The server uses HTTP transport with SSE for streaming.

MCP Client Setup

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";

const transport = new SSEClientTransport(new URL("https://api.<workspace-id>.clinia.cloud/mcp"));
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);

Sessions are tracked via the Mcp-Session-Id header. Each connected client has its own session; all sessions share the same loaded patients.

The patient ID in VFS paths (the registry key) is set by you at ingest time via the :patientId URL parameter. It may differ from the FHIR Patient.id inside the bundle.

On this page