tabby-mcp-server 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -50306,6 +50306,8 @@ let McpService = class McpService {
50306
50306
  * Register a single tool
50307
50307
  */
50308
50308
  registerTool(tool) {
50309
+ // Use type assertion to avoid "Type instantiation is excessively deep" error
50310
+ // This is a known issue with complex zod + MCP SDK type inference
50309
50311
  this.server.tool(tool.name, tool.description, tool.schema, tool.handler);
50310
50312
  this.logger.info(`Registered tool: ${tool.name}`);
50311
50313
  }
@@ -50379,6 +50381,18 @@ let McpService = class McpService {
50379
50381
  }
50380
50382
  }
50381
50383
  });
50384
+ // POST /sse handler for Streamable HTTP transport (fallback response)
50385
+ // Some MCP clients try POST /sse first (Streamable HTTP), then fallback to GET /sse
50386
+ this.app.post('/sse', (req, res) => {
50387
+ this.logger.debug('Received POST /sse request, redirecting to SSE-only mode');
50388
+ // Return 405 Method Not Allowed with proper headers
50389
+ res.setHeader('Allow', 'GET');
50390
+ res.status(405).json({
50391
+ error: 'Method Not Allowed',
50392
+ message: 'This server uses SSE transport. Use GET /sse for SSE connection and POST /messages for sending messages.',
50393
+ hint: 'Configure your client to use SSE-only mode'
50394
+ });
50395
+ });
50382
50396
  // Messages endpoint for SSE transport
50383
50397
  this.app.post('/messages', async (req, res) => {
50384
50398
  const sessionId = req.query.sessionId;