
This project implements a designed to seamlessly interact with a Medplum FHIR server. The MCP server provides a standardized interface, enabling Large Language Models (LLMs) to perform Create, Read,...
概览
This project implements a designed to seamlessly interact with a Medplum FHIR server. The MCP server provides a standardized interface, enabling Large Language Models (LLMs) to perform Create, Read, Update, and Search (CRUDS) operations on various FHIR resources through a comprehensive suite of tools. This empowers users to manage healthcare data stored in Medplum using natural language commands through any MCP-compatible client (Claude Desktop, VS Code MCP extensions, etc.). The server implements the full MCP protocol specification, providing 33 comprehensive FHIR resource management tools that can be discovered and executed by any MCP client. Users can intuitively manage patient information, practitioners, organizations, encounters, observations, and more by conversing with an LLM that leverages the MCP tools to execute requests against the FHIR server. - ✅ Core FHIR resource management tools (Patient, Practitioner, Organization, Encounter, Observation, Medication, etc.
README
以下为原文 README 节选,完整内容请查看原文。
Medplum MCP Server
🚀 Project Description
This project implements a complete Model Context Protocol (MCP) server designed to seamlessly interact with a Medplum FHIR server. The MCP server provides a standardized interface, enabling Large Language Models (LLMs) to perform Create, Read, Update, and Search (CRUDS) operations on various FHIR resources through a comprehensive suite of tools. This empowers users to manage healthcare data stored in Medplum using natural language commands through any MCP-compatible client (Claude Desktop, VS Code MCP extensions, etc.).
The server implements the full MCP protocol specification, providing 33 comprehensive FHIR resource management tools that can be discovered and executed by any MCP client. Users can intuitively manage patient information, practitioners, organizations, encounters, observations, and more by conversing with an LLM that leverages the MCP tools to execute requests against the FHIR server.
✨ Current Status
🎉 MCP Server Implementation Complete! 🎉
What’s Implemented:
- ✅ Core FHIR resource management tools (Patient, Practitioner, Organization, Encounter, Observation, Medication, etc.)
- ✅ MCP Server Protocol Implementation - Full Model Context Protocol server with stdio transport
- ✅ Comprehensive tool schemas for LLM interaction (33 FHIR tools)
- ✅ Interactive Chat Harness - Full MCP client with natural language interface
- ✅ Jest integration tests for all tools
- ✅ Medplum FHIR server connectivity and authentication
- ✅ MCP Inspector testing and validation
- ✅ Claude Desktop integration configuration
Ready for Use:
- 🔄 The MCP server is fully functional and ready for integration with MCP clients
- ✅ All 33 FHIR tools are properly registered and working
- 🔄 Server successfully authenticates with Medplum and executes FHIR operations
- 🔄 Interactive chat harness available - Test all tools with natural language
- 🔄 Tested with MCP Inspector - all tools discoverable and executable
- 🔄 Claude Desktop configuration provided for immediate use
Current Capabilities:
- Full CRUD operations on FHIR resources through natural language
- Interactive chat interface for testing and development
- Seamless integration with any MCP-compatible client (Claude Desktop, VS Code MCP extensions, etc.)
- Comprehensive error handling and logging
- Production-ready MCP protocol implementation
🌟 Features Implemented
The MCP server currently supports a comprehensive set of 33 tools for managing various FHIR resources:
👥 Patient Management (4 tools) - src/tools/patientUtils.ts
createPatient: Create new patient records with demographics, identifiers, and contact information.getPatientById: Retrieve complete patient details by their unique ID.updatePatient: Modify existing patient information including demographics and contact details.searchPatients: Find patients based on name, birthdate, identifier, or other criteria.
安装
npx ts-node src/llm-test-harness.ts