advancedmd-connector
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 자격 증명, 유일한 로그인 세션, 유일한 요율 클록(rate clock)을 보유합니다.
현재 15개 프로세스가 각각 AdvancedMD 자격 증명을 보유하고, 독립적으로 로그인하며, AdvancedMD의 사무실 키별 상한(초과 호출당 $0.01이 청구되고 분당 약 1회보다 빠른 로그인을 거부함)에 대해 독립적으로 요율 제한을 적용합니다. 커넥터는 세션과 클록을 중앙에서 소유하여 이 문제를 해결합니다. 즉, 하나의 프로세스, 하나의 요율 클록, 하나의 도구 표면, 모든 기존 소비자에 대해 변경되지 않은 도구 이름과 결과 형태를 유지합니다. 전체 계약은 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 8820GET http://localhost:8820/health는 첫 번째 로그인 시도가 완료되면 {"status": "starting"} 또는 "ok"로 응답해야 합니다. docker compose up --build는 동일한 .env를 읽어 동일한 것을 컨테이너화하여 실행합니다.
에이전트 연결
도구 이름, 인수 스키마, 그리고 수정된 결과 형태는 세 가지 연결 방법 모두에서 동일하므로(SPEC 12.1), 에이전트 구성은 프롬프트를 변경하지 않고 한 방법에서 다른 방법으로 이동할 수 있습니다.
원격 MCP(호스팅 에이전트, 예: Adam) — 커넥터의 streamable-HTTP 표면을 직접 가리킵니다:
{"mcpServers": {"amd-patients": {"type": "http",
"url": "http://advancedmd-connector:8820/mcp/patients",
"headers": {"Authorization": "Bearer <agent token>"}}}}10개의 라우트가 제공됩니다: /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/은 ${ADVANCEDMD_CONNECTOR_URL} 및 ${ADVANCEDMD_CONNECTOR_TOKEN} 환경 참조로 9개의 stdio 서버를 모두 선언합니다:
claude plugin add <path or repo>/plugin동일한 plugin/.mcp.json은 복사하여 Cursor와 Claude Desktop에서도 유효합니다.
워크플로우에서 사용
백엔드 Python 서비스는 orlando-derm-backend/lib/advancedmd_connector/의 SDK를 사용하며, 이 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 callSDK는 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(야간 1회 실행), srt-auths(스캔 및 이벤트 실행), note-audit(일일 1회 실행)입니다. 배치 우선순위 요청은 BATCH_AGING_MS(기본 60초) 후에 승격으로 노화되므로 긴 배치 백로그가 대화형 호출을 무기한 굶기지 않습니다(SPEC 5.3). 그러나 재시작 시 메모리 내 세션이 손실되므로(SPEC 16.3) 배포는 이러한 시간대를 피해야 합니다.
추가 자료
SPEC.md — 전체 빌드 계약.
docs/CONNECTOR_DECISIONS.md — 각 선택이 이루어진 이유.
docs/API.md — SPEC 11에서 미러링된 HTTP API.
docs/OPERATIONS.md — 토큰 CLI, 배포, 롤백, 알림, 픽스처 절차.
This server cannot be installed
Maintenance
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
- FlicenseAqualityFmaintenanceMCP 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.53
- AlicenseNot gradedqualityDmaintenanceA production-grade MCP server designed for multi-tenant, authenticated, and observable AI agent systems, enabling secure tool execution across heterogeneous data sources.57MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to discover and execute tools via a secure MCP server with JWT authentication, RBAC, rate limiting, and audit logging.1MIT
- AlicenseNot gradedqualityCmaintenanceA 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.3MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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