🔧 fix: Remove empty result check from MCPConnection transport send method, allow pinging mcp servers

This commit is contained in:
Danny Avila 2025-03-26 16:01:42 -04:00
parent ea2cbc55a7
commit 6b58547c63
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956

View file

@ -320,9 +320,6 @@ export class MCPConnection extends EventEmitter {
const originalSend = this.transport.send.bind(this.transport);
this.transport.send = async (msg) => {
if ('result' in msg && !('method' in msg) && Object.keys(msg.result ?? {}).length === 0) {
throw new Error('Empty result');
}
this.logger?.debug(`[MCP][${this.serverName}] Transport sending: ${JSON.stringify(msg)}`);
return originalSend(msg);
};