Back to Home
giantswarm icon

mcp-oauth

Verified Safe

by giantswarm

Overview

An OAuth 2.1 Authorization Server library for Model Context Protocol (MCP) servers, designed to manage user authentication and authorization across multiple identity providers.

Installation

Run Command
go build && ./mcp-2025-11-25

Environment Variables

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET

Security Notes

The server exhibits strong security posture, including mandatory PKCE enforcement, refresh token rotation with reuse detection and immediate revocation of all associated tokens, comprehensive redirect URI validation to prevent SSRF and open redirect attacks (including DNS resolution checks), and generic error messages to prevent information leakage. It incorporates a two-layer PKCE architecture (client-to-server and server-to-provider) for defense-in-depth. Critical secrets like client secrets are hashed using bcrypt. The project explicitly warns against using environment variables for secrets in production and recommends secret managers, demonstrating high security awareness. OpenTelemetry tracing is implemented with explicit warnings against logging sensitive data, and reserved attribute keys prevent accidental logging of credentials. Rate limiting is applied to discovery endpoints, IP addresses, and user IDs. The code includes internal security warnings for development-only features (e.g., stdout exporters, insecure OTLP transport).

Similar Servers

Stats

Interest Score34
Security Score9
Cost ClassLow
Stars2
Forks0
Last Update2025-12-13

Tags

OAuthAuthorizationAPI SecurityGoOpenTelemetry