MCP server failed to start (unstable MCP servers) #595

Closed
opened 2026-02-16 17:27:32 -05:00 by yindo · 3 comments
Owner

Originally created by @almirsarajcic on GitHub (Jul 10, 2025).

Originally assigned to: @thdxr on GitHub.

I have a problem with my Playwright MCP. The connection is not stable enough so during the opencode startup, it fails to connect.
In Claude Code, it worked by trying to connect later and succeeding, but it seems like opencode gives up.

Image

I can't really reproduce this consistently, but what I do is configure MCPs in opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "playwright": {
      "type": "remote",
      "url": "http://localhost:8900/mcp",
      "enabled": true
    }
  }
}

Then start opencode, and ask it to navigate to some website, like this: https://opencode.ai/s/0Yigi01r.

Then, I start the Playwright MCP server with npx @playwright/mcp@latest --port 8900 --headless --isolated and try prompting again without closing opencode. It doesn't connect.

A workaround that works for me is to use some kind of MCP proxy

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "playwright": {
      "type": "local",
      "command": ["mcp-proxy", "http://localhost:8900/mcp"],
      "enabled": true
    }
  }
}

https://opencode.ai/s/tPnQZCgZ

Image

Basically, I asked it to navigate to a website, and the request just hung until it timed out (couldn't interrupt btw.). But when I started the MCP, it worked immediately without having to restart opencode.

That proxy was initially built for Tidewave (Elixir MCP), but it seems to work well with other MCPs too.
https://github.com/tidewave-ai/mcp_proxy_rust
https://elixirdrops.net/d/UAo4BtYi

Originally created by @almirsarajcic on GitHub (Jul 10, 2025). Originally assigned to: @thdxr on GitHub. I have a problem with my Playwright MCP. The connection is not stable enough so during the opencode startup, it fails to connect. In Claude Code, it worked by trying to connect later and succeeding, but it seems like opencode gives up. <img width="331" height="100" alt="Image" src="https://github.com/user-attachments/assets/fa354a4e-67a6-44b4-a33c-4653fe53dafe" /> I can't really reproduce this consistently, but what I do is configure MCPs in opencode.json ```json { "$schema": "https://opencode.ai/config.json", "mcp": { "playwright": { "type": "remote", "url": "http://localhost:8900/mcp", "enabled": true } } } ``` Then start `opencode`, and ask it to navigate to some website, like this: https://opencode.ai/s/0Yigi01r. Then, I start the Playwright MCP server with `npx @playwright/mcp@latest --port 8900 --headless --isolated` and try prompting again without closing opencode. It doesn't connect. A workaround that works for me is to use some kind of MCP proxy ```json { "$schema": "https://opencode.ai/config.json", "mcp": { "playwright": { "type": "local", "command": ["mcp-proxy", "http://localhost:8900/mcp"], "enabled": true } } } ``` https://opencode.ai/s/tPnQZCgZ <img width="641" height="645" alt="Image" src="https://github.com/user-attachments/assets/ff1b5375-76ab-4dc6-9b58-5d0c4859a7d2" /> Basically, I asked it to navigate to a website, and the request just hung until it timed out (couldn't interrupt btw.). But when I started the MCP, it worked immediately without having to restart opencode. That proxy was initially built for Tidewave (Elixir MCP), but it seems to work well with other MCPs too. https://github.com/tidewave-ai/mcp_proxy_rust https://elixirdrops.net/d/UAo4BtYi
yindo closed this issue 2026-02-16 17:27:32 -05:00
Author
Owner

@moesmufti commented on GitHub (Jul 14, 2025):

same issue +1

edit: I get this constantly now, not just on 'unstable' connections. Server is definitely running but it shows the error upon any new session

@moesmufti commented on GitHub (Jul 14, 2025): same issue +1 edit: I get this constantly now, not just on 'unstable' connections. Server is definitely running but it shows the error upon any new session
Author
Owner

@clouatre commented on GitHub (Sep 14, 2025):

Proxy Stability Comparison: mcp-remote vs mcp-proxy

Our enterprise testing confirms your observation about proxy reliability differences.

mcp-remote Experience:

  • Works well for single-instance scenarios
  • Authentication coordination issues for multiple instances (lockfile conflicts, geelen/mcp-remote#25)
  • 30-minute lockfile expiry blocks new instances

mcp-proxy Assessment:

  • More isolated per-instance operation
  • Limited OAuth support (requires pre-authenticated tokens)
  • No multi-server aggregation (open request, sparfenyuk/mcp-proxy#82)

Enterprise Impact: Both proxies have architectural limitations that affect production deployments:

  • Shared authentication sessions
  • Coordination conflicts
  • Complex troubleshooting

Reference Implementation: Claude Code's native SSE transport eliminates proxy layer entirely, providing better stability and simpler debugging.

Recommendation: While mcp-proxy may be more stable for specific use cases, native SSE + OAuth implementation (issue #988) would eliminate proxy dependency and associated stability concerns entirely.

@clouatre commented on GitHub (Sep 14, 2025): ## Proxy Stability Comparison: mcp-remote vs mcp-proxy Our enterprise testing confirms your observation about proxy reliability differences. **[mcp-remote](https://github.com/geelen/mcp-remote) Experience**: - ✅ Works well for single-instance scenarios - ❌ Authentication coordination issues for multiple instances (lockfile conflicts, geelen/mcp-remote#25) - ❌ 30-minute lockfile expiry blocks new instances **[mcp-proxy](https://github.com/sparfenyuk/mcp-proxy) Assessment**: - ✅ More isolated per-instance operation - ❌ Limited OAuth support (requires pre-authenticated tokens) - ❌ No multi-server aggregation (open request, sparfenyuk/mcp-proxy#82) **Enterprise Impact**: Both proxies have architectural limitations that affect production deployments: - Shared authentication sessions - Coordination conflicts - Complex troubleshooting **Reference Implementation**: Claude Code's native SSE transport eliminates proxy layer entirely, providing better stability and simpler debugging. **Recommendation**: While mcp-proxy may be more stable for specific use cases, native SSE + OAuth implementation (issue #988) would eliminate proxy dependency and associated stability concerns entirely.
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#595