forked from AtomDancing/tlbm-mcp
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:
+3
-23
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user