Tencent/WeKnora · error
invalid response from server
Error message
invalid response from server
What it means
Sentinel returned when the MCP server sends a response that cannot be parsed or does not match the expected JSON-RPC shape (missing fields, wrong types, error payload where a result was expected). It indicates a protocol-level mismatch rather than a business error.
Source
Thrown at internal/mcp/errors.go:25
ErrUnsupportedTransport = errors.New("unsupported transport type")
// ErrNotConnected is returned when operation requires connection but client is not connected
ErrNotConnected = errors.New("client not connected")
// ErrAlreadyConnected is returned when trying to connect an already connected client
ErrAlreadyConnected = errors.New("client already connected")
// ErrInitializeFailed is returned when MCP initialize handshake fails
ErrInitializeFailed = errors.New("MCP initialize handshake failed")
// ErrToolNotFound is returned when requested tool is not found
ErrToolNotFound = errors.New("tool not found")
// ErrResourceNotFound is returned when requested resource is not found
ErrResourceNotFound = errors.New("resource not found")
// ErrInvalidResponse is returned when server response is invalid
ErrInvalidResponse = errors.New("invalid response from server")
// ErrTimeout is returned when operation times out
ErrTimeout = errors.New("operation timed out")
// ErrConnectionClosed is returned when connection is closed unexpectedly
ErrConnectionClosed = errors.New("connection closed")
)
View on GitHub (pinned to 988cbb0330)
Solutions
- Log the raw response payload to diagnose the protocol mismatch
- Verify client and server MCP protocol versions are compatible
- Retry the request in case of a truncated/corrupted transport frame
- Upgrade the MCP client library or server if the wire format changed
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/mcp/errors.go:25 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/7673e691b68c4115.
Report an issue: GitHub.