anomalyco / anomalyco/opencode
MCP server connection failures are logged without a reason
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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