feat(go-api): migrate MCP server detail and download API to Go (#16113)

### What problem does this PR solve?

- Migrated MCP server detail and export (download) API from Python to
Go.
- Registered route: `GET /api/v1/mcp/servers/:mcp_id` (supporting
`?mode=download` query parameter).
This commit is contained in:
Hz_
2026-06-18 11:09:22 +08:00
committed by GitHub
parent f59332bc37
commit 69dbc44983
5 changed files with 206 additions and 2 deletions

View File

@@ -351,8 +351,6 @@ func (r *Router) Setup(engine *gin.Engine) {
commitDatasets.GET("/changes", r.fileCommitHandler.GetUncommittedChanges)
}
// Author routes
authors := v1.Group("/authors")
{
@@ -500,6 +498,7 @@ func (r *Router) Setup(engine *gin.Engine) {
{
mcp.POST("/servers", r.mcpHandler.CreateMCPServer)
mcp.GET("/servers", r.mcpHandler.ListMCPServers)
mcp.GET("/servers/:mcp_id", r.mcpHandler.GetMCPServer)
mcp.PUT("/servers/:mcp_id", r.mcpHandler.UpdateMCPServer)
mcp.DELETE("/servers/:mcp_id", r.mcpHandler.DeleteMCPServer)
mcp.POST("/servers/import", r.mcpHandler.ImportMCPServers)