Skip to main content
Glama
orlando-derm

advancedmd-connector

by orlando-derm

advancedmd-connector

advancedmd-connector 是组织中唯一与 AdvancedMD 通信的进程。每个 AdvancedMD 数据的消费者——后端工作流(appointment-validator、srt-auths、note-audit、patient-intake)、admin-console 凭据检查,以及 AI 代理(Adam 和任何 Claude Code、Cursor 或 Desktop 代理)——都通过 HTTP 或 MCP 向它发送工具调用,并取回 JSON 结果。它持有唯一的 AdvancedMD 凭据、唯一的登录会话和唯一的速率时钟。

如今有十五个进程各自持有 AdvancedMD 凭据、独立登录,并针对 AdvancedMD 的每办公室密钥上限(每次超额调用收费 $0.01,且拒绝快于约每分钟一次的登录)独立限速。连接器通过集中持有会话和时钟来解决这个问题:一个进程、一个速率时钟、一个工具面,对所有现有消费者保持工具名称和结果形状不变。完整契约见 SPEC.md,每项选择的原因见 docs/CONNECTOR_DECISIONS.md。

架构

 backend workflows ------ JSON tool call ------> +-----------------------------+
 (validator, srt-auths,                          |    advancedmd-connector     |
  note-audit, intake,                            |                             |
  admin-console, chatbot)                        |  HTTP API   MCP surface     |
                                                  |      \        /             |
 agents ----------------- MCP tool call -------> |     receivers (one per      |
 (Adam via remote MCP;                           |       open request)         |
  Cursor, Claude Code,                           |          |                  |
  Desktop via stdio shim                         |     entry queue             |
  or remote MCP)                                 |          |                  |
                                                  |     worker loop  (1 at a    |
                                                  |          |        time)     |
                                                  |      handler                |
                                                  |          |                  |
                                                  |    request queue            |
                                                  |          |                  |
                                                  |     sender loop  (clock,    |
                                                  |          |        session)  |
                                                  +----------|------------------+
                                                             |  XML over HTTPS
                                                             v
                                                        AdvancedMD

一个进程。一个端口(默认 8820)。虚线框以上的都是消费者;框外没有任何进程持有 AMD 凭据或发送 XML。

Related MCP server: production-grade-mcp-agentic-system

本地五条命令运行

cp .env.example .env                      # fill AMD_USERNAME, AMD_PASSWORD, AMD_OFFICE_KEY
pip install -e ".[dev]"
export $(cat .env | grep -v '^#' | xargs) CONNECTOR_TOKENS_PATH=/tmp/tokens.json
connector tokens add myapp --priority interactive --tools '*'   # prints a token once
uvicorn --factory connector.app:build_app --host 0.0.0.0 --port 8820

GET http://localhost:8820/health 应返回 {"status": "starting"},或在首次登录尝试完成后返回 "ok"docker compose up --build 以容器化方式运行相同内容,读取相同的 .env

挂接代理

工具名称、参数模式和脱敏结果形状在三种挂接方式中完全一致(SPEC 12.1),因此代理配置可以在它们之间迁移而无需更改提示词。

远程 MCP(托管代理,如 Adam)——直接指向连接器的流式 HTTP 面:

{"mcpServers": {"amd-patients": {"type": "http",
  "url": "http://advancedmd-connector:8820/mcp/patients",
  "headers": {"Authorization": "Bearer <agent token>"}}}}

提供十条路由:/mcp/patients/mcp/visits/mcp/providers/mcp/codes/mcp/billing/mcp/payments/mcp/masterfiles/mcp/system/mcp/ehr/mcp/all(并集)。

本地 stdio 垫片(工作站上的代理)——安装已发布的 advancedmd-mcp 包并通过网络指向连接器;它不持有凭据,也没有工具逻辑:

{"mcpServers": {"amd-patients": {"command": "uvx",
  "args": ["advancedmd-mcp", "--domain", "patients"],
  "env": {"ADVANCEDMD_CONNECTOR_URL": "http://100.94.62.115:8820",
          "ADVANCEDMD_CONNECTOR_TOKEN": "<agent token>"}}}}

Claude Code 插件——plugin/ 声明全部九个 stdio 服务器,使用 ${ADVANCEDMD_CONNECTOR_URL}${ADVANCEDMD_CONNECTOR_TOKEN} 环境引用:

claude plugin add <path or repo>/plugin

同一个 plugin/.mcp.json 复制后同样适用于 Cursor 和 Claude Desktop。

从工作流中使用

后端 Python 服务使用 orlando-derm-backend/lib/advancedmd_connector/ 中的 SDK,它保留所有现有方法名和类型化结果:

from lib.advancedmd_connector import AmdConnector

connector = AmdConnector.from_env()          # ADVANCEDMD_CONNECTOR_URL, ADVANCEDMD_CONNECTOR_TOKEN
bundle = await connector.get_patient_bundle(patient_id)
result = await connector.tool("getdemographic", patient_id=patient_id)   # generic call

SDK 不持有 AMD 凭据、XML 或 AMD URL——它仅使用 HTTP。完整方法表和异常映射见 SPEC 13。

签发令牌

令牌通过随附的 connector CLI 针对令牌表文件(CONNECTOR_TOKENS_PATH)签发和撤销:

connector tokens add appointment-validator --priority batch --tools '*'
connector tokens add my-agent --priority interactive --tools getdemographic,lookuppatient
connector tokens list
connector tokens revoke my-agent

明文令牌在签发时打印一次,之后从不存储或可恢复。完整标志参考见 docs/OPERATIONS.md,令牌模型见 docs/TOKENS.md。

遇到缓慢时去哪里查看

  • GET /health(无需令牌,仅限内网)——会话状态、入口队列深度和最久等待、请求队列深度,以及各层级的速率时钟已用/上限,一次调用全部返回。

  • GET /metrics(无需令牌)——Prometheus 文本:按调用方/工具/结果统计的工具调用次数和等待直方图、按层级统计的 AMD 请求次数和耗时直方图、各层级的时钟已用/上限/休眠时间、重新登录和登录拒绝计数器、队列深度。完整指标列表见 SPEC 18,告警条件见 SPEC 18.2。

  • 缓慢的 AMD 回复绝不能延迟 /health——发送循环和 /health 运行在同一个事件循环上,但禁止阻塞 I/O(SPEC 4.4),因此挂起的 AMD 调用会以 /health 上的时钟/队列压力形式显现,而不是连接器无响应。

批处理调度

连接器本身不运行批处理作业;它只串行化批处理优先级调用方发送的内容。当前针对它调度的消费者(SPEC 22 迁移表)是 appointment-validator(每晚一次运行)、srt-auths(扫描和事件运行)和 note-audit(每日一次运行)。批处理优先级请求在 BATCH_AGING_MS(默认 60 秒)后老化并提升优先级,因此长时间的批处理积压不会无限期饿死交互式调用(SPEC 5.3);部署仍应避开这些窗口,因为重启会丢弃内存中的会话(SPEC 16.3)。

延伸阅读

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    A
    quality
    F
    maintenance
    MCP server that exposes 300+ AI agents as tools via a single API key. Supports listing agents, invoking any agent with chat-completion style messages, checking agent health, and retrieving platform statistics.
    5
    3
  • A
    license
    Not graded
    quality
    C
    maintenance
    A production-ready MCP server for Method CRM API integration. It enables LLMs to interact with Method CRM data through tools for tables, files, users, events, and API key management.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

  • Hosted MCP server exposing US hospital procedure cost data to AI assistants

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/orlando-derm/advancedmd-connector'

If you have feedback or need assistance with the MCP directory API, please join our Discord server