fix: implement MCP Streamable HTTP protocol for Cursor integration
- Replace basic JSON-RPC implementation with Streamable HTTP protocol - Add support for GET (SSE) and POST (JSON-RPC) requests - Update protocol version from 2024-11-05 to 2025-03-26 - Fix list_feeds tool definition to match actual API (remove unused page/pageSize params) - Add ping method support for MCP Inspector - Update Cursor configuration to use url field instead of curl command - Add comprehensive MCP integration documentation Fixes #32 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,8 +20,8 @@ func setupRoutes(appServer *AppServer) *gin.Engine {
|
||||
// 健康检查
|
||||
router.GET("/health", healthHandler)
|
||||
|
||||
// MCP 端点 - 使用 SSE 协议
|
||||
mcpHandler := appServer.createMCPHandler()
|
||||
// MCP 端点 - 使用 Streamable HTTP 协议
|
||||
mcpHandler := appServer.StreamableHTTPHandler()
|
||||
router.Any("/mcp", gin.WrapH(mcpHandler))
|
||||
router.Any("/mcp/*path", gin.WrapH(mcpHandler))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user