Repository navigation
Description
Issue Description
EventEmitter overflow (drain event) when excel-sbroenne MCP server is enabled in OpenCode. After a short period of use, OpenCode crashes with a Node.js overflow error. When the server is disabled, OpenCode works perfectly with no issues.
AI Assistant
- Other: OpenCode v1.14.28 (https://opencode.ai)
MCP Tool & Action
- Tool: N/A — the crash occurs at the connection/initialization level, not during a specific tool call
- Action: The overflow appears to be triggered during
getPromptpolling - File Path: N/A
- Additional Parameters: N/A
Expected Behavior
The MCP server should stay connected and respond to requests from OpenCode without causing the Node.js event loop to overflow.
Actual Behavior
After enabling excel-sbroenne in OpenCode and using it for a short time, OpenCode crashes with:
type: "drain"
count: 11
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at once (node:events:200:36)
...at getPrompt
...at send
Error Response
{
"error": "Node.js EventEmitter MaxListenersExceededWarning: drain event, count 11, at overflowWarning node:events:185:19"
}MCP Server Configuration
Configuration file location: C:\Users\JEFRY\.config\opencode\opencode.json
"excel-sbroenne": {
"type": "local",
"enabled": true,
"command": [
"C:/Users/JEFRY/.dotnet/tools/mcp-excel.exe"
],
"environment": {
"DOTNET_EnableDiagnostics": "0",
"APPLICATIONINSIGHTS_CONNECTION_STRING": ""
},
"timeout": 60000
}Environment
- Windows Version: Windows 11
- Excel Version: Excel 365
- ExcelMcp Version: v1.8.50
- .NET Version: 8.0 and 10.0 (both installed)
- Installation Method:
- Global .NET tool (
dotnet tool install --global Sbroenne.ExcelMcp.McpServer)
- Global .NET tool (
MCP Server Logs
INFO service=mcp key=excel-sbroenne toolCount=25 create() successfully created client
warn: ModelContextProtocol.Server.McpServer[2049951654]
Server (excel-mcp 1.8.50.0), Client (opencode 1.14.28) received request for method 'resources/list', but no handler is available.
warn: ModelContextProtocol.Server.McpServer[975074943]
Server (excel-mcp 1.8.50.0), Client (opencode 1.14.28) method 'resources/list' request handler failed in 29.7949ms.
ModelContextProtocol.McpProtocolException: Method 'resources/list' is not available.
ERROR service=mcp clientName=excel-sbroenne error=MCP error -32601: Method 'resources/list' is not available. failed to get resources
Steps to Reproduce
- Install mcp-excel via
dotnet tool install --global Sbroenne.ExcelMcp.McpServer - Configure OpenCode with the MCP server as shown above
- Start OpenCode — server connects successfully showing 25 tools
- Use OpenCode normally for a few minutes
- OpenCode crashes with EventEmitter overflow on
drainevent
Additional Context
- The server connects successfully at startup (25 tools detected)
- The crash happens during active use, not at startup
- Disabling
excel-sbroennecompletely fixes the issue — OpenCode runs stably - The
resources/listmethod is not implemented in the server, OpenCode receives-32601error repeatedly which may be contributing to the listener accumulation - Also tried with the standalone ZIP executable (
ExcelMcp-MCP-Server-1.8.50-windows.zip) — same overflow occurs - OpenCode uses Bun (not Node.js directly) as its runtime
Question
Is there a known workaround for this compatibility issue with OpenCode? Could the repeated resources/list polling by OpenCode be causing the listener leak?
Activity
sbroenne commentedon Apr 28, 2026
Hi @ozcajefff — quick update: we merged #625 to remove a stale, unregistered internal resource provider and clarify that Excel MCP is a tools/prompts-only server.
That change does not add MCP resource support or a
resources/listhandler. Theresources/listpolling/overflow still looks like an OpenCode-side compatibility bug: an MCP client should handle an unsupported optional method (-32601 Method not available) without accumulating listeners or crashing.If OpenCode has a setting to disable resource polling for servers that do not advertise resources, that should be the best workaround. Otherwise, this is likely worth reporting upstream to OpenCode with the repeated
resources/listpolling anddrainlistener overflow details from this issue.ozcajefff commentedon Apr 30, 2026
I’ll try to look into this issue and gather more information so I can help find a solution. I appreciate the details you shared.