refactor: 移除用户查询接口,进一步限制 MCP 能力

移除接口:
- get_user_roles: 查询用户角色
- get_user_by_openid: 按OpenID查询用户

用户查询涉及隐私信息,不应通过 MCP 暴露

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 12:04:45 +08:00
co-authored by Claude Opus 4.6
parent 12fa958191
commit dbec51b6c0
3 changed files with 4 additions and 27 deletions
+3 -23
View File
@@ -218,29 +218,9 @@ const TOOLS = [
},
endpoint: { method: "GET", path: "/api/order/rpc/query" },
},
// === 用户管理 ===
{
name: "get_user_roles",
description: "获取当前用户角色列表",
inputSchema: { type: "object", properties: {} },
endpoint: { method: "GET", path: "/api/user/roles" },
},
{
name: "get_user_by_openid",
description: "根据微信OpenID查询用户信息",
inputSchema: {
type: "object",
properties: {
wxOpenId: { type: "string", description: "微信OpenID" },
},
required: ["wxOpenId"],
},
endpoint: { method: "GET", path: "/api/user/openId/{wxOpenId}" },
},
];
];
// 创建 Server
const server = new Server(