Skip to content

MCP OAuth: Warp appends ?server_id= to redirect_uri, breaking RFC 6749 compliance #9088

Closed

Description

@therealinvoker

Bug Description

When connecting to an MCP server that uses OAuth (RFC 9728), Warp appends a ?server_id=... query parameter to the redirect_uri in the authorization request. This breaks OAuth servers that use exact string matching on redirect URIs, which is the recommended behavior per RFC 6749 §3.1.2.2.

Steps to Reproduce

  1. Configure an MCP server with OAuth in Warp Settings → MCP:
    {"serverUrl": "https://example.com/mcp"}
  2. The MCP server's /oauth/register endpoint returns:
    {"redirect_uris": ["warp://mcp/oauth2callback"]}
  3. Warp constructs the authorize URL with:
    redirect_uri=warp%3A%2F%2Fmcp%2Foauth2callback%3Fserver_id%3D65aebdca-613a-4b60-97d3-92548673bd03
    
  4. The OAuth server rejects with unknown_redirect_uri because warp://mcp/oauth2callback?server_id=.... doesn't exactly match the registered warp://mcp/oauth2callback.

Expected Behavior

Warp should use the redirect_uri exactly as returned by the registration endpoint, without appending query parameters. Per RFC 6749 §3.1.2.2:

The authorization server MUST compare the two URIs using simple string comparison.

Dynamic client-specific data (like server_id) should be passed via the state parameter instead, as recommended by the RFC.

Actual Behavior

Warp appends ?server_id={uuid} to the redirect_uri, causing OAuth servers with strict redirect URI validation to reject the request.

Environment

  • Warp version: latest stable (macOS)
  • MCP server: custom server with Hydra (ORY) as OAuth provider
  • OAuth flow: RFC 9728 (MCP OAuth) + RFC 7591 (Dynamic Client Registration)

Impact

This prevents Warp from connecting to any MCP server whose OAuth provider does exact redirect URI matching (which is the RFC-recommended default). Workaround: use mcp-remote via Claude Desktop instead, which correctly uses localhost callbacks without appending query params.

Activity

  1. dannyneira commented on Apr 16, 2026

    @dannyneira
    Member

    Thanks for submitting this. It's on our radar to fix. You may be able to workaround this by connecting to the mcp with an npx proxy.

    For example:

    {
      "<YOUR OAUTH MCP NAME>": {
        "args": [
          "-y",
          "mcp-remote",
          "<YOUR OAUTH MCP URL>"
        ],
        "command": "npx"
      }
    }
    
  2. added
    area:mcp
    triaged
    bug
    on Apr 19, 2026
  3. vkodithala commented on Apr 20, 2026

    @vkodithala
    Contributor

    Hey @therealinvoker, thanks so much for flagging this issue! Fixed this last week, we should now be using a clean redirect_uri scheme. Will be out in the next Warp update!

  4. added
    ready-to-implement
    ready-to-spec
    repro:high
    on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpbugready-to-implementready-to-specrepro:hightriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions