Back to Home
tuannvm icon

oauth-mcp-proxy

Verified Safe

by tuannvm

Overview

OAuth 2.1 authentication library for Go MCP servers, supporting both mark3labs and official SDKs for token validation and caching.

Installation

Run Command
go run examples/official/simple/main.go

Environment Variables

  • OAUTH_PROVIDER
  • OIDC_ISSUER
  • OIDC_AUDIENCE
  • JWT_SECRET
  • OAUTH_CLIENT_ID
  • OAUTH_CLIENT_SECRET
  • SERVER_URL
  • OAUTH_REDIRECT_URIS
  • HTTPS_CERT_FILE
  • HTTPS_KEY_FILE

Security Notes

The project demonstrates a strong focus on security, including PKCE support, HMAC-signed state parameters to prevent tampering, explicit redirect URI validation (allowlist and localhost-only for fixed redirect mode), and secure TLS configurations. It logs truncated token hashes instead of full tokens. Extensive security tests are present. A minor area for improvement is a logged warning about an 'insecure-fallback-key' if JWT_SECRET is not configured for state signing, although it correctly prompts for a strong secret.

Similar Servers

Stats

Interest Score41
Security Score9
Cost ClassLow
Avg Tokens10
Stars15
Forks6
Last Update2026-01-16

Tags

OAuthAuthenticationMCP ServerGoSecurity