Skip to content

EventEmitter overflow (drain) when MCP server doesn't support resources/list #25078

Closed as not planned

Description

@ozcajefff

Description

When using mcp-server-excel (or any MCP server that doesn't support
resources/list), OpenCode continuously polls resources/list and
accumulates drain listeners until EventEmitter overflow.

The author of mcp-server-excel confirmed this is an OpenCode-side bug:
sbroenne/mcp-server-excel#621

MCP client should handle -32601 (Method not available) without
accumulating listeners or crashing.

Suggested fix: add an option to disable resources/list polling for
servers that don't advertise resources.

Plugins

mcp-server-excel (sbroenne)

OpenCode version

1.14.30

Steps to reproduce

  1. Install mcp-server-excel via dotnet tool:
    dotnet tool install --global Sbroenne.ExcelMcp.McpServer

  2. Add the MCP to opencode.json:
    "excel-sbroenne": {
    "type": "local",
    "enabled": true,
    "command": ["mcp-excel"],
    "timeout": 60000
    }

  3. Open OpenCode

  4. Observe the EventEmitter overflow error on startup:
    MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
    11 drain listeners added to [Socket]. MaxListeners is 10.
    type: "drain", count: 11

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

Windows Terminal (PowerShell 7)

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 30, 2026
  2. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  3. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions