diff --git a/server/api/v1/system/auto_code_mcp.go b/server/api/v1/system/auto_code_mcp.go index c3f6188b..3549aeee 100644 --- a/server/api/v1/system/auto_code_mcp.go +++ b/server/api/v1/system/auto_code_mcp.go @@ -60,7 +60,18 @@ func (a *AutoCodeTemplateApi) MCPList(c *gin.Context) { global.GVA_LOG.Error(err.Error()) return } - response.OkWithData(list, c) + + mcpServerConfig := map[string]interface{}{ + "mcpServers": map[string]interface{}{ + global.GVA_CONFIG.MCP.Name: map[string]string{ + "url": baseUrl, + }, + }, + } + response.OkWithData(gin.H{ + "mcpServerConfig": mcpServerConfig, + "list": list, + }, c) } // Create diff --git a/web/src/view/systemTools/autoCode/mcpTest.vue b/web/src/view/systemTools/autoCode/mcpTest.vue new file mode 100644 index 00000000..6df57951 --- /dev/null +++ b/web/src/view/systemTools/autoCode/mcpTest.vue @@ -0,0 +1,221 @@ + + + + + + + MCP 服务器配置示例 + + + {{ mcpServerConfig }} + + + + + + + + + {{ tool.name }} + + + + + + {{ tool.description }} + + + + + + + + + + + + + + + + + + + + + + API 返回结果: + + {{ apiDialogResponse }} + + + + + + {{ apiDialogResponse.content }} + + + {{ JSON.stringify(apiDialogResponse, null, 2) }} + + + + + 取消 + 测试 + + + + + + + \ No newline at end of file
{{ mcpServerConfig }}
{{ apiDialogResponse }}
{{ apiDialogResponse.content }}
{{ JSON.stringify(apiDialogResponse, null, 2) }}