-
feat(mcp): P1 基座 — PatientService.search(find_patient)+ 装 MCP SDK + 集成路径确认 · 1d8e6bab
开放给 agent 的 MCP 只读服务,第一步基座: - PatientService.search(scope, query, limit):按 姓名/手机/externalId 模糊检索,强制 tenant scope, 返回极简候选卡片(手机号掩码,真号走 revealPhone)。= find_patient 工具背后。 - 装 @modelcontextprotocol/sdk@1.29.0。 - 集成侦察(避免踩坑):经典 moduleResolution=Node 下静态 import 走 @modelcontextprotocol/sdk/dist/cjs/server/{mcp,streamableHttp}.js(CJS + 带 .d.ts); registerTool(name,{description,inputSchema:ZodRawShape},cb)+ StreamableHTTPServerTransport 无状态(sessionIdGenerator:undefined, enableJsonResponse:true)+ handleRequest(req,res,body)。 - Bearer 鉴权复用 JwtService(jwt.secret),payload 含 hostId/tenantId/permissions → 派生 scope。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>luoqi committed
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| pac-service | Loading commit data... | |
| pac-web | Loading commit data... |