Skip to content

Stdio handshake timeout with npx local MCPs (env expansion suspect) #12229

Closed

Description

@LERMF

Summary

Local MCP servers using npx hang/time out in OpenCode. opencode mcp list shows 60s timeouts for local stdio MCPs, while running the same npx commands manually works. Suspect stdio handshake or env expansion issue ("${TOKEN}" passed literally).

Environment

  • OS: Linux
  • OpenCode: 1.1.51
  • Transport: local stdio (npx)

Repro

  1. Configure local MCP servers with command: [\"npx\", \"-y\", \"@modelcontextprotocol/server-filesystem\", \"/home/user\"]
  2. Run opencode mcp list
  3. Observe timeouts for local servers

Observed

filesystem: Operation timed out after 60000ms
memory: Operation timed out after 60000ms
sequential-thinking: Operation timed out after 60000ms
everything: Operation timed out after 60000ms
github: Operation timed out after 10000ms
brave-search: Operation timed out after 10000ms

Remote MCPs (context7) and local python server (neogsd_triad) connect fine.

Expected

Local MCPs should connect and register tools, as they do when run directly with npx.

Notes

  • npx -y @modelcontextprotocol/server-filesystem /home/user runs fine manually.
  • Previously, bunx produced Connection closed; npx now times out.
  • Config includes env var placeholders like ${GITHUB_TOKEN}, possible expansion issue.

Config snippet (sanitized)

"filesystem": {"type":"local","command":["npx","-y","@modelcontextprotocol/server-filesystem","/home/user"],"enabled":true,"timeout":60000}

Activity

  1. github-actions commented on Feb 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. github-actions commented on Apr 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 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