本指南详细介绍了如何设置和运行 Agent Care 的 Model Context Protocol (MCP) 服务器。Agent Care 是一个用于医疗保健领域的 AI 代理框架,支持与 Cerner 和 Epic 等厂商的 FHIR API 集成,为医疗保健领域的数据交互和处理提供便利。
将项目克隆到本地,并安装依赖和构建项目,具体命令如下:
git clone {agentcare-mcp-github路径}
cd agentcare-mcp
npm install
npm run build
要启动 MCP 服务器,请按照以下步骤操作:
根据您选择的厂商(Cerner 或 Epic),请参考以下环境变量配置示例:
OAUTH_CLIENT_ID=XXXXXXX
OAUTH_CLIENT_SECRET=XXXXXXX
OAUTH_TOKEN_HOST=https://fhir-ehr.cerner.com/r4/ecn_1234567890
OAUTH_AUTHORIZATION_METHOD=body
OAUTH_TOKEN_PATH=/interconnect-fhir-oauth/oauth2/token
OAUTH_AUTHORIZE_PATH=/interconnect-fhir-oauth/oauth2/authorize
OAUTH_AUDIENCE=https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4
OAUTH_CALLBACK_URL=http://localhost:3456/oauth/callback
OAUTH_SCOPES=user/Patient.read%20user/Observation.read%20user/MedicationRequest.read%20user/Condition.read%20user/AllergyIntolerance.read%20user/Procedure.read%20user/CarePlan.read%20user/CareTeam.read%20user/Encounter.read%20user/Immunization.read
OAUTH_CALLBACK_PORT=3456
FHIR_BASE_URL=https://fhir-ehr.cerner.com/r4/ecn_1234567890
PUBMED_API_KEY=your_pubmed_api_key
CLINICAL_TRIALS_API_KEY=your_trials_api_key
FDA_API_KEY=your_fda_api_key
OAUTH_CLIENT_ID=XXXXXXX
OAUTH_CLIENT_SECRET=
OAUTH_TOKEN_HOST=https://fhir.epic.com
OAUTH_AUTHORIZATION_METHOD=body
OAUTH_TOKEN_PATH=/interconnect-fhir-oauth/oauth2/token
OAUTH_AUTHORIZE_PATH=/interconnect-fhir-oauth/oauth2/authorize
OAUTH_AUDIENCE=https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4
OAUTH_CALLBACK_URL=http://localhost:3456/oauth/callback
OAUTH_SCOPES=user/Patient.read%20user/Observation.read%20user/MedicationRequest.read%20user/Condition.read%20user/AllergyIntolerance.read%20user/Procedure.read%20user/CarePlan.read%20user/CareTeam.read%20user/Encounter.read%20user/Immunization.read
OAUTH_CALLBACK_PORT=3456
FHIR_BASE_URL=https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4
PUBMED_API_KEY=your_pubmed_api_key
CLINICAL_TRIALS_API_KEY=your_trials_api_key
FDA_API_KEY=your_fda_api_key
要在 Claude Desktop 上配置 Agent Care,请参考以下步骤:
要使用 Inspector,请执行以下命令:
npm install -g @cerner/inspector-cli
inspector init
要与 Goose 框架集成,请按照以下步骤操作:
如果遇到问题,请参考以下常见问题:
本指南介绍了如何设置和运行 Agent Care 的 MCP 服务器,并提供了与 Claude Desktop 和 Goose 框架集成的详细步骤。如需进一步帮助,请参考官方文档或联系支持团队。