Skip to content

feature: Client support for OAuth #295

Closed
@giridhar-murthy-glean

Description

@giridhar-murthy-glean

Problem Statement

Recent implementations of MCP servers are supporting OAuth based authorization. mcp-go's client fails to connect to such servers, because it receives a HTTP 401 Unauthorized when connecting to such servers.

Proposed Solution

To support connections to such servers, mcp-go's client will need to be able to initiate a full OAuth flow upon receipt of a HTTP 401 Unauthorized response and ensure that users can be authorized correctly.

This issue is primarily a check to see if this work is on the roadmap/under development or if it needs to be worked on. I'm happy to take a stab at this, if there isn't already an effort underway.

MCP Spec Reference

OAuth flow is described here:
https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#2-authorization-flow

A reference implementation is available as part of the official MCP Typescript SDK

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: mcp specIssues related to MCP specification compliancetype: enhancementNew feature or enhancement request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions