Developers · Records MCP server
Give agents tenant-scoped validation context.
Expose validation, issue explanation, quality scores, and run comparison through a workspace-issued agent-tools key.
Available with Records deployments
Smallest useful example
Start from a deployment-issued scope.
The MCP process belongs to a Records deployment. Its key and tenant scope are provisioned before an agent can request validation or run context.
npm run --silent mcp:serveExpected contract
What comes back
Bounded tool responses for validation, issue explanation, quality context and comparison of existing runs—not workspace administration.
| Prerequisite | A Records deployment and workspace-issued agent-tools scope |
|---|---|
| Can read | Tenant-scoped validation, findings, quality scores and existing run comparison |
| Cannot change | Servers, settings, keys, baselines or the connected FHIR system |
One input, a concrete finding, a verified correction.
An actual Records validator-tool execution on assistant-authored synthetic FHIR. Six information findings remain after the correction.
validate_resource({ resource, fhirVersion: "R4" })patient-before.json
{ "active": "true"}Patient.active
{ "message": "Primitive type mismatch for Patient.active: expected boolean, found string"}patient-after.json
{ "active": true}Change Patient.active from "true" to true. Revalidation resolves the type error; six information findings remain.
Synthetic FHIR R4 · Validator 0.6.4 · Executed locally on 15 September 2026
View complete JSON
String instead of boolean
{ "resourceType": "Patient", "id": "synthetic-cli-patient", "active": "true"}Patient.active fails validation
{ "tool": "validate_resource", "result": { "resourceType": "Patient", "profile": null, "fhirVersion": "R4", "score": 79, "errors": 1, "warnings": 0, "information": 6, "issues": [ { "severity": "error", "code": "structural-primitive-type-mismatch", "path": "Patient.active", "message": "Primitive type mismatch for Patient.active: expected boolean, found string", "aspect": "structural" }, { "severity": "info", "code": "dom-6", "path": "Patient.text", "message": "A resource should have narrative for robust management", "aspect": "structural" }, { "severity": "info", "code": "missing-meta", "path": "meta", "message": "Resource should have a meta field", "aspect": "metadata" }, { "severity": "info", "code": "required-metadata-missing-lastUpdated", "path": "meta.lastUpdated", "message": "Patient resource is missing recommended metadata field: meta.lastUpdated", "aspect": "metadata" }, { "severity": "info", "code": "required-metadata-missing-versionId", "path": "meta.versionId", "message": "Patient resource is missing recommended metadata field: meta.versionId", "aspect": "metadata" }, { "severity": "information", "code": "best-practice-patient-identifier", "path": "Patient.identifier", "message": "Patient resources should have at least one identifier for reliable patient matching", "aspect": "structural" }, { "severity": "information", "code": "best-practice-patient-name", "path": "Patient.name", "message": "Patient resources should have at least one name", "aspect": "structural" } ], "engine": "records" }}Correction verified
{ "tool": "validate_resource", "result": { "resourceType": "Patient", "profile": null, "fhirVersion": "R4", "score": 94, "errors": 0, "warnings": 0, "information": 6, "issues": [ { "severity": "info", "code": "dom-6", "path": "Patient.text", "message": "A resource should have narrative for robust management", "aspect": "structural" }, { "severity": "info", "code": "missing-meta", "path": "meta", "message": "Resource should have a meta field", "aspect": "metadata" }, { "severity": "info", "code": "required-metadata-missing-lastUpdated", "path": "meta.lastUpdated", "message": "Patient resource is missing recommended metadata field: meta.lastUpdated", "aspect": "metadata" }, { "severity": "info", "code": "required-metadata-missing-versionId", "path": "meta.versionId", "message": "Patient resource is missing recommended metadata field: meta.versionId", "aspect": "metadata" }, { "severity": "information", "code": "best-practice-patient-identifier", "path": "Patient.identifier", "message": "Patient resources should have at least one identifier for reliable patient matching", "aspect": "structural" }, { "severity": "information", "code": "best-practice-patient-name", "path": "Patient.name", "message": "Patient resources should have at least one name", "aspect": "structural" } ], "engine": "records" }}The calling application or reviewer decides the next action.
Built for one clear integration job
Choose the functions your integration needs.
Validate resources
Return normalized findings, counts, and a score for a request-local resource and profile.
Explain findings
Give the agent a bounded explanation, suggested fix, and specification links.
Read quality context
Query tenant-scoped scores and compare two existing Records runs without exposing administration.
Saved runs, comparisons and reports require a Records workspace.
Scope
The boundary
Know what this surface owns before you put it into a workflow.
What remains outside this surface
The agent-tools scope cannot create or delete servers, change settings, manage keys, establish baselines, or mutate the connected FHIR system.