feat(mcp): integrate MCP Server into backend service as built-in endpoint
Build and Deploy / build-and-push (push) Successful in 54s

- Add MCP Controller and register /mcp route
- MCP Server now uses OpenAPI Token for authentication
- Update frontend settings to show built-in MCP endpoint config
- Update docs to reflect integrated MCP endpoint
This commit is contained in:
2026-07-27 02:38:09 +08:00
parent f004cfc937
commit 066383de83
8 changed files with 870 additions and 31 deletions
+19
View File
@@ -0,0 +1,19 @@
package controllers
import (
"github.com/engigu/taskpool/internal/mcp"
"github.com/gin-gonic/gin"
)
type MCPController struct{}
func NewMCPController() *MCPController {
return &MCPController{}
}
// HandleMCP 处理 MCP 请求(StreamableHTTP
func (c *MCPController) HandleMCP(ctx *gin.Context) {
// 获取 MCP HTTP Handler 并处理请求
handler := mcp.GetHTTPHandler()
handler.ServeHTTP(ctx.Writer, ctx.Request)
}