[PR #5699] MCP improvements #11538

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

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

State: closed
Merged: Yes


  1. The state parameter is a random generated string now (as per OAuth 2.0 spec). We validate in the callback that the same string is received.
  2. Previously, if you changed the URL for an MCP server (with oauth enabled), it would stop working. For example, if you had a gitlab MCP server and you changed the URL from https://gitlab.com/mcp to https://gitlab.mycompany.com/mcp, it would not work. To make it work, you'd have to rename the MCP server (to gitlab-2 or something) or create a new one. This PR fixes that as well.
image

Tested locally.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5699 **State:** closed **Merged:** Yes --- 1. The `state` parameter is a random generated string now (as per OAuth 2.0 spec). We validate in the callback that the same string is received. 2. Previously, if you changed the URL for an MCP server (with oauth enabled), it would stop working. For example, if you had a `gitlab` MCP server and you changed the URL from `https://gitlab.com/mcp` to `https://gitlab.mycompany.com/mcp`, it would not work. To make it work, you'd have to rename the MCP server (to `gitlab-2` or something) or create a new one. This PR fixes that as well. <img width="888" height="328" alt="image" src="https://github.com/user-attachments/assets/7618d08d-4ac6-43a9-a88e-a20206e42f53" /> Tested locally.
yindo added the pull-request label 2026-02-16 18:16:23 -05:00
yindo closed this issue 2026-02-16 18:16:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11538