Back to Home
arapodcho icon

mcp_server_fhir

by arapodcho

Overview

An MCP server designed to expose and control FHIR (Fast Healthcare Interoperability Resources) data through a tool-calling interface, likely for integration with AI agents or other platforms to query and manage patient health information.

Installation

Run Command
python src/fastmcp_server.py

Environment Variables

  • FHIR_URL
  • CLIENT_ID
  • CLIENT_SECRET
  • TOKEN_HOST
  • AUTHORIZE_PATH
  • AUTHORIZATION_METHOD
  • TOKEN_PATH
  • AUDIENCE
  • CALLBACK_URL
  • SCOPES
  • CALLBACK_PORT

Security Notes

The `fastmcp_server.py` explicitly imports the `Auth` and `AuthConfig` utilities, indicating an intent for secure FHIR server access. However, the `ensure_auth` function, which is called by all tools, has the critical token acquisition and application (`fhir_client.set_access_token(access_token)`) commented out. This means the server, as provided, will attempt to connect to FHIR endpoints without any authentication. This is a severe security vulnerability if the target FHIR server contains sensitive patient data and requires authorization. Hardcoded `FHIR_URL` values for testing purposes are also present in `test_change_observation_category.py` and `fastmcp_server.py` which could lead to misconfigurations in production environments. No 'eval' or direct code injection vulnerabilities were found, but the default lack of authentication is critical.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2025-12-12

Tags

FHIRHealthcareAPIData IntegrationMCP