-
Notifications
You must be signed in to change notification settings - Fork 34.9k
Closed
Labels
chat-mcpfeature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiderson-testplan
Milestone
Description
Model Context Protocol (MCP) has recently released a new iteration of the authorization specification. This enables a discovery flow for protected MCP servers, where they rely on OAuth 2.0 Protected Resource Metadata (RFC9728) documents to provide information about the authorization server(s) (AS) used by teh MCP server.
Rough flow
- Remote protected MCP server is connected to VS Code (MCP client).
- VS Code initiates a connection.
- Server responds with a
HTTP 401 Unauthorized
and aWWW-Authenticate
header that contains aresource_metadata
field, which encapsulates a pointer to the PRM document. - VS Code reads the PRM document and extracts AS information.
- VS Code initiates the discovery process with the AS using conventional
/.well-known
endpoints. - Depending on the AS, VS Code either performs OAuth 2.0 Dynamic Client Registration (RFC7591) or uses the built-in client ID.
- With the information at hand, VS Code initiates the authorization via authorization code flow with PKCE.
Reference items
noboru-i, dclayton-godaddy, et84121, DGideas and atrawogOrenMe, TylerLeonhardt, digitarald, shashimalcse, et84121 and 1 moretao12345666333
Metadata
Metadata
Assignees
Labels
chat-mcpfeature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiderson-testplan