
Azure AHDS FHIR MCP 服务器
概览
Azure健康数据服务FHIR(快速保健互操作性资源)的示范背景协议服务器实施。 这项服务为与Azure FHIR服务器进行互动提供了一个标准化的接口,通过MCP工具使保健数据操作成为可能. 参见关于mcp.json的FastMCP指南: [[T0] - 用于服务对服务认证 - 离开 USE FAST MCP OHOTH PROXY=false - 保留 HTTP TRANSPORT=false 使用 stdio transport - 使用 Azure AD 客户端证书流 OAuth在半流时需要一个代表MCP服务器的机密Azure AD应用程序. 1. 在Azure门户网站上, 给它一个描述性名称,如FHIR-MCP-Server,设定为"单一租户",并让重新定向的URI暂不设. 2. 应用程序创建后,抓取生成的应用程序(客户端)ID和目录(租户)ID,供后用. 3个.
概述(AI 翻译)
Azure健康数据服务FHIR(快速保健互操作性资源)的示范背景协议服务器实施。 这项服务为与Azure FHIR服务器进行互动提供了一个标准化的接口,通过MCP工具使保健数据操作成为可能.
设置 # #
- 安装 * *
需要Python 3.13或更高和 uv.
先安装 uv 。
QQ 配置 QQ
见关于mcp.json的FastMCP指南:[[T2]
QQ 客户证书流程( 默认) :
- 用于服务对服务认证
- 离开[T3]
- 保留
HTTP_TRANSPORT=false以使用分层运输 - 使用Azure AD客户端证书流程
OAuth On-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-On-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-An-b-An-Af-Af-Af-Af-Af-Af-Af-Af-f-f-f-f-f-f-f-f-f-f-f-f-f-f-f
QQ 创建 Azure 应用程序注册
OAuth在半流时需要一个代表MCP服务器的机密Azure AD应用程序.
- 在Azure门户网站上,请访问微软Entra ID QQA app 注册QQ新注册。 给它一个描述性名称,例如
FHIR-MCP-Server,设置支持的账户类型 给 * 单一租户*,并暂不设定重新定向的URI。 - 联合国.
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Azure AHDS FHIR MCP Server 🚀
A Model Context Protocol (MCP) server implementation for Azure Health Data Services FHIR (Fast Healthcare Interoperability Resources). This service provides a standardized interface for interacting with Azure FHIR servers, enabling healthcare data operations through MCP tools.
Setup 🛠️
Installation 📦
Requires Python 3.13 or higher and uv.
Install uv first.
Configuration ⚙️
See the FastMCP guidance on mcp.json here: https://gofastmcp.com/integrations/mcp-json-configuration
Client Credentials Flow (default):
- Used for service-to-service authentication
- Leave
USE_FAST_MCP_OAUTH_PROXY=false - Keep
HTTP_TRANSPORT=falseto use stdio transport - Uses Azure AD client credentials flow
{
"mcpServers": {
"fhir": {
"type": "stdio",
"command": "uvx",
"args": [
"azure-fhir-mcp-server"
],
"env": {
"fhirUrl": "https://your-fhir-server.azurehealthcareapis.com/fhir",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"tenantId": "your-tenant-id"
}
}
}
}
OAuth On-Behalf-Of Flow:
Create the Azure App Registration
The OAuth on-behalf-of flow requires a confidential Azure AD application that represents the MCP server.
- In the Azure portal, go to Microsoft Entra ID ➜ App registrations ➜ New registration. Give it a descriptive name such as
FHIR-MCP-Server, set Supported account types to Single tenant, and leave the redirect URI unset for now. - After the app is created, capture the generated
Application (client) IDandDirectory (tenant) IDfor later use. - Under Expose an API, select Set for the Application ID URI and accept the suggested value
api://{appId}. Add a scope nameduser_impersonationwith admin consent display/description also set touser_impersonation. - Under Certificates & secrets, create a New client secret (for example
FHIR-MCP-Secret-New). Copy the secret value immediately; it is required for the MCP serverclientSecretsetting. - Under Authentication, add the following Web redirect URIs to support the FastMCP OAuth proxy:
http://localhost:9002/auth/callbackEnsure Default client type remains No so the app stays confidential.
安装
uvx azure-fhir-mcp-server配置
{
"mcpServers": {
"fhir": {
"type": "stdio",
"command": "uvx",
"args": [
"azure-fhir-mcp-server"
],
"env": {
"fhirUrl": "https://your-fhir-server.azurehealthcareapis.com/fhir",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"tenantId": "your-tenant-id"
}
}
}
}