mes-mcp 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,36 @@ MES_REGISTER_DYNAMIC_TOOLS=false
|
|
|
23
23
|
|
|
24
24
|
`MES_REGISTER_DYNAMIC_TOOLS` 默认关闭。关闭时 MCP 只注册稳定接口工具,通过后端动作目录发现并执行全部授权业务能力;打开后会把所有授权页面动作额外展开成 `mes.<动作编码>` 工具,适合明确需要工具直出且客户端能承载大量工具的场景。
|
|
25
25
|
|
|
26
|
+
## 运行
|
|
27
|
+
|
|
28
|
+
正式接入推荐用 `npx` 拉取 npm 上的最新版本,不需要全局安装:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx -y mes-mcp@latest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
MCP 客户端配置建议使用:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"mes-mcp": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["-y", "mes-mcp@latest"],
|
|
42
|
+
"env": {
|
|
43
|
+
"MES_BASE_URL": "https://your-mes.example.com",
|
|
44
|
+
"MES_API_PREFIX": "/api",
|
|
45
|
+
"MES_AGENT_TOKEN": "BearerTokenWithoutBearerPrefix",
|
|
46
|
+
"MES_TIMEOUT_MS": "30000",
|
|
47
|
+
"MES_REGISTER_DYNAMIC_TOOLS": "false"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`npx` 会在 MCP 客户端启动或重连时使用 npm 上的最新版本;已经运行中的 `mes-mcp` 进程不会热更新,发版后需要重启或刷新当前 AI 助手的 MCP 连接。
|
|
55
|
+
|
|
26
56
|
## 开发
|
|
27
57
|
|
|
28
58
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ async function main() {
|
|
|
45
45
|
const client = new MesAgentApiClient(config);
|
|
46
46
|
const server = new McpServer({
|
|
47
47
|
name: "mes-mcp",
|
|
48
|
-
version: "0.2.
|
|
48
|
+
version: "0.2.3",
|
|
49
49
|
});
|
|
50
50
|
await registerAllAgentTools(server, client, {
|
|
51
51
|
registerDynamicTools: config.registerDynamicTools,
|