MCP OAuth Server

This is an MCP server with OAuth 2.0 integration to a third-party authorization server.

Available Endpoints:

Authorization Endpoint

GET /oauth/authorize

Parameters:

Token Endpoint

POST /oauth/token

Parameters:

MCP SSE Endpoints

/mcp/sse - SSE connection endpoint (requires OAuth token)

/mcp/message - Message endpoint (requires OAuth token)

OAuth Flow:

  1. MCP Client initiates OAuth flow with this MCP Server
  2. MCP Server redirects to Third-Party OAuth Server
  3. User authenticates with Third-Party Server
  4. Third-Party Server redirects back to MCP Server with auth code
  5. MCP Server exchanges the code for a third-party access token
  6. MCP Server generates its own token bound to the third-party session
  7. MCP Server completes the OAuth flow with the MCP Client