Skip to content

fix(server): always report opencode as mcp client name - #53471

Merged
rekram1-node merged 1 commit into
v2from
fix-mcp-client-name
Oct 6, 2026
Merged

rekram1-node merged 1 commit into
v2from
fix-mcp-client-name

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #51578

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The server passed options.app.name as the MCP clientInfo.name. That value is the artifact/OPENCODE_CLIENT telemetry tag, so MCP servers saw cli, desktop, or acp in the initialize handshake instead of opencode and could no longer identify the client (regressing #2289). v1 always sent opencode.

The MCP client name is now always opencode. The version still comes from app.version, and OPENCODE_CLIENT keeps driving the user agent and telemetry. This is a smaller alternative to #51825, which still lets OPENCODE_CLIENT override the MCP name, so desktop and ACP would keep sending desktop and acp.

How did you verify your code works?

  • Ran bun run serve with a stub stdio MCP server that logs its initialize request:
    • origin/v2: clientInfo.name is cli by default and desktop with OPENCODE_CLIENT=desktop.
    • this branch: opencode in both cases.
  • bun run typecheck in packages/server.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Requested by: @rekram1-node (Aiden Cline via Slack)

app.name is the artifact/OPENCODE_CLIENT telemetry tag (cli, desktop, acp), so MCP servers were seeing it in the initialize handshake instead of opencode.

Co-authored-by: Eric Curtin <eric.curtin@docker.com>
@opencode-agent
opencode-agent Bot force-pushed the fix-mcp-client-name branch from bbdd9dc to f0f58a0 Compare October 6, 2026 03:15
@rekram1-node
rekram1-node merged commit b78d10c into v2 Oct 6, 2026
9 checks passed
@rekram1-node
rekram1-node deleted the fix-mcp-client-name branch October 6, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant