WeKnora/internal/mcpserver
Perfecto 03e2c47aec
feat(mcp): support 2026-07-28 alongside legacy clients (#4095)
* feat(mcp): support modern and legacy protocol connections

* fix(mcp): preserve annotated headers on modern tool calls

* fix(mcp): load parameter header schemas before tool calls

* fix(mcp): keep a working legacy session when discovery retry fails

Modern method-level 404s stay connected, while an expired SSE session still disconnects. A transient discover failure retries once, and a failed retry keeps the handshake that already succeeded.

* fix(mcp): wrap protocol negotiation lines for the linter

golangci-lint rejects lines longer than 120 characters.

* fix(mcp): retry protocol discovery without dropping the live session

A second initialize on the same transport clears a stateful legacy session when discover returns 404. Probe on a separate connection, and drop cached parameter headers after another client refreshes the directory.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-10-10 15:15:06 +08:00
..
grep_pattern_test.go refactor(agent): consolidate knowledge retrieval tools into search_knowledge, read_document, list_documents (#3381) 2026-09-18 14:12:22 +08:00
resource_urls.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
resource_urls_test.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
scope.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
scope_test.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
server.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
server_test.go feat(mcp): support 2026-07-28 alongside legacy clients (#4095) 2026-10-10 15:15:06 +08:00
tools_ask.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
tools_ask_image_test.go fix(mcp): return accessible image URLs from existing tools (#3650) 2026-09-24 11:56:25 +08:00
tools_ingest.go feat(mcp): add built-in MCP server with per-workspace endpoints (#3371) 2026-09-17 22:40:05 +08:00
tools_retrieve.go refactor(agent): consolidate knowledge retrieval tools into search_knowledge, read_document, list_documents (#3381) 2026-09-18 14:12:22 +08:00
tools_wiki.go fix(mcp): expose wiki output in structured content (#3590) 2026-09-24 11:49:57 +08:00
tools_wiki_test.go fix(mcp): expose wiki output in structured content (#3590) 2026-09-24 11:49:57 +08:00