[PR #9982] feat(mcp log): print mcp stderr to opencode log file #13290

Closed
opened 2026-02-16 18:18:09 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9982

State: closed
Merged: Yes


What does this PR do?

Log mcp stderr to ~/.local/share/opencode/log/

How did you verify your code works?

cat <<'EOF' > opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "mock-mcp": {
      "type": "local",
      "command": [
        "bash",
        "-c",
        "echo 'I AM HERE' >&2"
      ]
    }
  }
}
EOF

bun dev -- run "say hello"

grep -rn 'mcp stderr:' ~/.local/share/opencode/log/dev.log

# output should be something like
#
# 280:INFO  2026-01-22T08:13:30 +2ms service=mcp key=mock-mcp mcp stderr: I AM HERE
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9982 **State:** closed **Merged:** Yes --- ### What does this PR do? Log mcp stderr to `~/.local/share/opencode/log/` ### How did you verify your code works? ```bash cat <<'EOF' > opencode.json { "$schema": "https://opencode.ai/config.json", "mcp": { "mock-mcp": { "type": "local", "command": [ "bash", "-c", "echo 'I AM HERE' >&2" ] } } } EOF bun dev -- run "say hello" grep -rn 'mcp stderr:' ~/.local/share/opencode/log/dev.log # output should be something like # # 280:INFO 2026-01-22T08:13:30 +2ms service=mcp key=mock-mcp mcp stderr: I AM HERE ```
yindo added the pull-request label 2026-02-16 18:18:09 -05:00
yindo closed this issue 2026-02-16 18:18:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13290