Skip to content

Document OAuth support in MCP HTTP/SSE configuration reference#9798

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/update-sse-configuration-docs
Open

Document OAuth support in MCP HTTP/SSE configuration reference#9798
Copilot wants to merge 3 commits into
mainfrom
copilot/update-sse-configuration-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

The MCP configuration reference omitted the oauth field for HTTP/SSE servers, despite being supported in VS Code schema/runtime. This updates the docs to reflect the implemented transport auth shape and expected OAuth behavior.

  • HTTP/SSE schema table updates

    • Added oauth to the HTTP and Server-Sent Events (SSE) servers field table with example shape.
  • OAuth field contract

    • Added an oauth property table documenting clientId as required.
    • Added a note clarifying VS Code drives the OAuth flow automatically and opens a browser on first auth.
  • Usable configuration example

    • Added a second <details> example block showing an HTTP MCP server configured with OAuth.
{
  "servers": {
    "slack": {
      "type": "http",
      "url": "https://mcp.slack.com/mcp",
      "oauth": {
        "clientId": ""
      }
    }
  }
}
Original prompt

The "HTTP and Server-Sent Events (SSE) servers" section in docs/copilot/reference/mcp-configuration.md is missing the oauth field, which is already implemented in VS Code (see mcpConfiguration.ts).

Changes needed in docs/copilot/reference/mcp-configuration.md

1. Add oauth row to the HTTP server configuration table

In the table under "### HTTP and Server-Sent Events (SSE) servers", add a new row after headers:

| oauth | No | OAuth configuration for authenticating with the server | {"clientId": "12348411142.11062036567072"} |

2. Add oauth field description

Below the table (after the note about Unix sockets/Windows named pipes), add:

The oauth object supports the following property:

Property Type Required Description
clientId string Yes The OAuth client ID to use when authenticating with the server.

[!NOTE]
When oauth is configured, VS Code handles the OAuth flow automatically. A browser window opens for authorization on the first connection to the server.

3. Add an example with OAuth after the existing remote server example

Add a second <details> block after the existing "Example remote server configuration" block:

<details>
<summary>Example HTTP server with OAuth</summary>

This example shows the configuration for an MCP server that uses OAuth for authentication. On first use, VS Code opens a browser window to complete the OAuth flow.

```json
{
    "servers": {
        "slack": {
            "type": "http",
            "url": "https://mcp.slack.com/mcp",
            "oauth": {
                "clientId": "…"
            }
        }
    }
}
```

Source of truth

The schema is defined in the VS Code source at src/vs/workbench/contrib/mcp/common/mcpConfiguration.ts:

oauth: {
    type: 'object',
    description: localize('app.mcp.json.oauth', "OAuth configuration for authenticating with the server."),
    additionalProperties: false,
    minProperties: 1,
    properties: {
        clientId: {
            type: 'string',
            minLength: 1,
            description: localize('app.mcp.json.oauth.clientId', "The OAuth client ID to use when authenticating with the server.")
        }
    }
},

And the type is:

export interface McpServerTransportHTTPOAuth {
    readonly clientId?: string;
}

Copilot AI changed the title [WIP] Add oauth field to HTTP server configuration Document OAuth support in MCP HTTP/SSE configuration reference May 18, 2026
Copilot AI requested a review from digitarald May 18, 2026 23:40
@digitarald digitarald marked this pull request as ready for review May 19, 2026 18:49
@digitarald
Copy link
Copy Markdown
Contributor

@copilot /act-on-feedback

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 19, 2026

@copilot /act-on-feedback

I reviewed the PR feedback and there are no additional actionable review comments to address at this time, so no further code changes were needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants