anomalyco / anomalyco/opencode

MCP server connection failures are logged without a reason

Open Beginner friendly
#49,726 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

When a local MCP server fails to spawn or connect (bad binary path, server exits on startup), the runtime log only shows:

WARN  server unavailable { key: "my-server", type: "local", status: "failed" }

with no reason attached. The failure message is already captured in status.error by connectLocal (opencode mcp list does print it), but the log line drops it. With several MCP servers configured, it's undiagnosable which one broke and why.

Happy to send a PR adding the reason to that log line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating connectLocal and the runtime logger that emits the “server unavailable” message. Trace how status.error is captured and compare it with the fields currently logged. Done means local MCP spawn or connection failures include their reason in the log while retaining the server key and status.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.