MCP on FHIR

by terminallylazy

MCP Client 3 stars
  • other

About

What is MCP on FHIR?

MCP on FHIR is an interactive FHIR application that uses the Model Context Protocol (MCP) to provide knowledge graph capabilities. It connects to FHIR servers for healthcare data and MCP memory servers for graph visualization, and runs on any system with Node.js v18 or later.

How to use MCP on FHIR?

Run the application using the provided run.sh script (after making it executable) or by running npm start manually. The application automatically reads the mcp_config.json file to start the required MCP servers (memory server and FHIR server). Once running, access the interface at http://localhost:8080.

Key features of MCP on FHIR

- FHIR API integration for accessing healthcare data
- Knowledge graph visualization via MCP memory server
- Context-aware chat interface
- Configurable MCP servers through mcp_config.json
- Built-in support for @modelcontextprotocol/server-memory

Use cases of MCP on FHIR

- Visualizing connections between FHIR resources as a knowledge graph
- Querying healthcare data through a chat interface
- Prototyping MCP-based applications with FHIR data

FAQ from MCP on FHIR

What does MCP on FHIR do?

It is an interactive FHIR application that leverages the Model Context Protocol to create and navigate a knowledge graph of healthcare data, with a chat interface for querying.

What platforms or Node.js versions are supported?

Node.js v18 or later is required. The application runs on any system supporting Node.js and npm/npx.

How do I configure MCP servers?

Modify the mcp_config.json file. By default, it connects to a memory server (using npx -y @modelcontextprotocol/server-memory) and a FHIR server (e.g., https://hapi.fhir.org/baseR4). You can add, remove, or change servers.

What is the license for MCP on FHIR?

MIT License.

What should I do if the knowledge graph is not working?

Check that the application started properly, verify the MCP server configuration in mcp_config.json, refresh the browser, and review server logs for error messages.

Details

Author
terminallylazy
GitHub stars
3
Category
other
Repository
terminallylazy/mcp-on-fhir

MCP on FHIR

An interactive FHIR application with MCP (Model Context Protocol) Knowledge Graph capabilities.

Prerequisites

- Node.js v18 or later
- npm or npx

Getting Started

This application integrates with Model Context Protocol (MCP) servers to provide knowledge graph capabilities. You can run the application with the built-in configuration.

Option 1: Using the Run Script

1. Make the run script executable:

   chmod +x run.sh

2. Run the application:

   ./run.sh

Option 2: Manual Setup

1. Start the application:

   npm start

The application uses the mcp_config.json file to configure and start the necessary MCP servers automatically.

MCP Configuration

The application uses a mcp_config.json file to configure the MCP servers it connects to. By default, it connects to:

- Memory server (for knowledge graph functionality)
- FHIR server (for healthcare data)

You can modify the mcp_config.json file to add additional servers or change the configuration:

{
  "mcpServers": {
    "memory": {
      "enabled": true,
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ],
      "env": {
        "MEMORY_FILE_PATH": "./mcp-memory.json"
      }
    },
    "fhir": {
      "enabled": true,
      "url": "https://hapi.fhir.org/baseR4"
    }
  }
}

Accessing the Application

Once the application is running, you can access it at: http://localhost:8080

Troubleshooting Knowledge Graph Issues

If you experience issues with the Knowledge Graph:

1. Check that the application has started properly
2. Ensure that the MCP servers are configured correctly in mcp_config.json
3. Try refreshing the browser
4. Check the server logs for any error messages

Features

- FHIR API Integration: Connect to FHIR servers to access healthcare data
- Knowledge Graph: Visualize connected data through the MCP memory server
- Chat Interface: Interact with a context-aware chat interface

License

MIT