go-common中增加mcp抽离成通用方法(编排由业务方自行处理)

This commit is contained in:
2026-07-25 11:27:34 +08:00
parent 121928733b
commit 97450f0739
14 changed files with 1112 additions and 9 deletions

View File

@@ -89,6 +89,30 @@
"period": 60,
"byIP": true,
"byUserID": false
},
"mcp": {
"enabled": true,
"callTimeoutSeconds": 60,
"servers": [
{
"name": "fetch-web",
"transport": "streamable-http",
"url": "http://mcp-gateway:1111/mcp/fetch-web",
"enabled": true,
"authToken": "dev-local-token",
"toolNamePrefix": "fetch-web",
"allowedTools": ["fetch_web"]
},
{
"name": "word",
"transport": "sse",
"url": "http://mcp-gateway:1111/mcp/word",
"enabled": false,
"authToken": "dev-local-token",
"toolNamePrefix": "word",
"allowedTools": ["create_document", "add_heading", "add_paragraph"]
}
]
}
}