erikhoward
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"fhir": {
"args": [
"azure-fhir-mcp-server"
],
"command": "uvx",
"env": {
"LOG_LEVEL": "INFO",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"fhirUrl": "https://your-fhir-server.azurehealthcareapis.com/fhir",
"tenantId": "your-tenant-id"
}
}
}
}
可用工具 (1 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
search_fhir 2 个参数 需填 1 项
nSearch for FHIR resources based on search parameters.nnArgs:n resource_type: The FHIR resource type to search (e.g., Patient , Observation )n search_params: Dictionary of search parameters to applyn ctx: MCP Context for logging and progress reportingnnReturns:n List of matching resourcesn
必填参数:resource_type
服务介绍
Azure AHDS FHIR MCP 服务器 🚀
这是一个为 Azure Health Data Services FHIR(Fast Healthcare Interoperability Resources)实现的模型上下文协议(MCP)服务器。该服务提供了一个标准化接口,用于与 Azure FHIR 服务器交互,通过 MCP 工具实现医疗数据操作。
设置 🛠️
安装 📦
需要 Python 3.13 或更高版本以及 uv。
首先安装 uv。
MCP 配置 ⚙️
Claude 桌面配置
1 - 编辑 Claude 桌面配置:
打开 claude_desktop_config.json 并添加以下配置。
在 MacOS 上,文件位于这里:~/Library/Application Support/Claude Desktop/claude_desktop_config.json。
在 Windows 上,文件位于这里:%APPDATA%Claude Desktopclaude_desktop_config.json。
json
{
"mcpServers": {
"fhir": {
"command": "uvx",
"args": [
"azure-fhir-mcp-server"
],
"env": {
"LOG_LEVEL": "INFO",
"fhirUrl": "https://your-fhir-server.azurehealthcareapis.com/fhir",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"tenantId": "your-tenant-id"
}
}
}
}
以下是可用环境配置变量的表格:
| 变量 | 描述 | 默认值 |
|---|---|---|
LOG_LEVEL |
日志级别 | INFO |
fhirUrl |
Azure FHIR 服务器 URL | 必填 |
clientId |
OAuth2 客户端 ID | 必填 |
clientSecret |
OAuth2 客户端密钥 | 必填 |
tenantId |
Azure AD 租户 ID | 必填 |
2 - 重启 Claude 桌面。
可用工具 🔧
FHIR 资源操作
search_fhir- 根据搜索参数字典搜索 FHIR 资源
资源访问
服务器通过 MCP 资源协议提供了对所有标准 FHIR 资源的访问:
fhir://Patient/- 访问所有 Patient 资源fhir://Patient/{id}- 访问特定的 Patient 资源fhir://Observation/- 访问所有 Observation 资源fhir://Observation/{id}- 访问特定的 Observation 资源fhir://Medication/- 访问所有 Medication 资源fhir://Medication/{id}- 访问特定的 Medication 资源- 还有很多...
开发 💻
本地开发设置
1 - 克隆仓库:
bash
git clone https://github.com/erikhoward/azure-fhir-mcp-server.git
cd azure-fhir-mcp-server
2 - 创建并激活虚拟环境:
Linux/macOS:
bash
python -m venv .venv
source .venv/bin/activate
Windows:
bash
python -m venv .venv
.venvScriptsactivate
3 - 安装依赖项:
bash
pip install -e ".[dev]"
4 - 复制并配置环境变量:
bash
cp .env.example .env
编辑 .env 文件以使用您的设置:
env
fhirUrl=https://your-fhir-server.azurehealthcareapis.com/fhir
clientId=your-client-id
clientSecret=your-client-secret
tenantId=your-tenant-id
5 - Claude 桌面配置
打开 claude_desktop_config.json 并添加以下配置。
在 MacOS 上,文件位于这里:~/Library/Application Support/Claude Desktop/claude_desktop_config.json。
在 Windows 上,文件位于这里:%APPDATA%Claude Desktopclaude_desktop_config.json。
json
{
"mcpServers": {
"fhir": {
"command": "uv",
"args": [
"--directory",
"/path/to/azure-fhir-mcp-server/repo",
"run",
"azure_fhir_mcp_server"
],
"env": {
"LOG_LEVEL": "DEBUG",
"fhirUrl": "https://your-fhir-server.azurehealthcareapis.com/fhir",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"tenantId": "your-tenant-id"
}
}
}
}6 - 重启Claude Desktop。
贡献 🤝
欢迎贡献!请随时提交Pull Request。
- 叉分(Fork)仓库
- 创建你的功能分支 (
git checkout -b feature/AmazingFeature) - 提交你的更改 (
git commit -m '✨ Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 打开一个Pull Request
许可证 ⚖️
根据MIT许可发布 - 查看 LICENSE.md 文件。
这不是官方的Microsoft或Azure产品。