Skip to content

Problem with bufio.Scanner: token too long error when using STDIO mode on some MCP servers #588

@y1713375484

Description

@y1713375484

Description

When I run certain MCP servers in STDIO mode, I encounter the following error:
ERROR: Error reading from stdout: bufio.Scanner: token too long
Because of this, I’m forced to switch to the HTTP mode instead.
Is there a recommended workaround or best practice to handle this issue in STDIO mode?
I saw the pull request #464 but I’m still encountering the same issue. Would it be possible to allow manual configuration of the buffer size?
Thanks.

Environment

  • Go version (see go.mod): [1.23.3]
  • mcp-go version (see go.mod): [0.39.1]
  • macbook m3

Metadata

Metadata

Assignees

No one assigned

    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