@@ -9,71 +9,58 @@ LOG_LEVEL=info
99# Defaults to http://localhost:PORT if not set (where PORT is the configured port)
1010# BASE_URL=http://localhost:3000
1111
12- # Authentication Configuration (Optional)
13- # Set ENABLE_AUTH=true to enable authentication
14- ENABLE_AUTH = false
15-
16- # Authentication mode: "resource_server", "full", or "none" (default)
17- AUTH_MODE = resource_server
18-
1912# ============================================================================
20- # Resource Server Mode Configuration
21- # ============================================================================
22- # MCP server acts as a resource server and validates tokens from external OAuth providers
23- # Commonly used with gateways that handle OAuth flows for enterprise deployments
24- # Can also work with direct OAuth flows where clients get tokens themselves
25-
26- # OAuth issuer URL for token validation (required for resource_server mode)
27- # Examples:
28- # Auth0: https://your-domain.auth0.com
29- # Okta: https://your-domain.okta.com
30- # Google: https://accounts.google.com
31- OAUTH_ISSUER = https://your-domain.auth0.com
32-
33- # Expected audience in JWT tokens (optional)
34- # If set, tokens must have this audience claim
35- OAUTH_AUDIENCE = your-api-identifier
36-
37- # ============================================================================
38- # Full Mode Configuration (OAuth Proxy + Resource Server)
13+ # Authentication Configuration (Optional)
3914# ============================================================================
40- # MCP server acts as both OAuth client (proxy to external IdP) AND resource server
41- # Provides OAuth endpoints while delegating authentication to external providers
42- # Production-ready but consider using resource_server mode with a gateway for enterprise deployments
43-
44- # OAuth client credentials (required for full mode)
45- OAUTH_CLIENT_ID = your-client-id
46- OAUTH_CLIENT_SECRET = your-client-secret
15+ # Default: No authentication required - server runs immediately
16+ # Enable when you need OAuth 2.1 authentication with token validation
17+ # ENABLE_AUTH=false
4718
48- # OAuth provider endpoints (required for full mode)
49- OAUTH_AUTH_ENDPOINT = https://your-domain.auth0.com/authorize
50- OAUTH_TOKEN_ENDPOINT = https://your-domain.auth0.com/oauth/token
19+ # When ENABLE_AUTH=true, configure your OAuth provider:
20+ # ENABLE_AUTH=true
21+ # OAUTH_ISSUER=https://your-provider.com
22+ # OAUTH_CLIENT_ID=your-client-id
23+ # OAUTH_CLIENT_SECRET=your-client-secret
5124
52- # OAuth configuration
53- OAUTH_SCOPE = read
54- # OAUTH_REDIRECT_URI=http://localhost:3000/callback # Optional, defaults to BASE_URL/callback
25+ # Additional OAuth settings (optional)
26+ # OAUTH_AUDIENCE=your-api-identifier # For token audience validation
27+ # OAUTH_SCOPE=openid profile email # Default scope
28+ # OAUTH_REDIRECT_URI=http://localhost:3000/callback # Defaults to BASE_URL/callback
5529
5630# ============================================================================
57- # Example Configurations
31+ # Common OAuth Provider Examples
5832# ============================================================================
5933
60- # Example: Auth0 Resource Server Mode
34+ # Auth0 Example:
6135# ENABLE_AUTH=true
62- # AUTH_MODE=resource_server
6336# OAUTH_ISSUER=https://your-domain.auth0.com
37+ # OAUTH_CLIENT_ID=your-auth0-client-id
38+ # OAUTH_CLIENT_SECRET=your-auth0-client-secret
6439# OAUTH_AUDIENCE=your-api-identifier
6540
66- # Example: Auth0 Full Mode
41+ # Okta Example:
6742# ENABLE_AUTH=true
68- # AUTH_MODE=full
69- # OAUTH_CLIENT_ID=your-auth0-client-id
70- # OAUTH_CLIENT_SECRET=your-auth0-client-secret
71- # OAUTH_AUTH_ENDPOINT=https://your-domain.auth0.com/authorize
72- # OAUTH_TOKEN_ENDPOINT=https://your-domain.auth0.com/oauth/token
73- # OAUTH_SCOPE=read
74- # OAUTH_REDIRECT_URI=http://localhost:3000/callback # Optional, defaults to BASE_URL/callback
43+ # OAUTH_ISSUER=https://your-domain.okta.com
44+ # OAUTH_CLIENT_ID=your-okta-client-id
45+ # OAUTH_CLIENT_SECRET=your-okta-client-secret
7546
76- # Example: No Authentication Mode (Default)
77- # Note: Consider enabling auth even for local development for security best practices
78- # ENABLE_AUTH=false
79- # AUTH_MODE=none
47+ # Google Example:
48+ # ENABLE_AUTH=true
49+ # OAUTH_ISSUER=https://accounts.google.com
50+ # OAUTH_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
51+ # OAUTH_CLIENT_SECRET=your-google-client-secret
52+
53+ # ============================================================================
54+ # Use Cases
55+ # ============================================================================
56+ #
57+ # Auth Disabled (ENABLE_AUTH=false or omitted):
58+ # - Public MCP servers
59+ # - Gateway-protected deployments (Pomerium, nginx with auth, etc.)
60+ # - Development and testing
61+ # - Internal corporate networks with perimeter security
62+ #
63+ # Auth Enabled (ENABLE_AUTH=true):
64+ # - Direct OAuth 2.1 with token validation
65+ # - Self-contained secure deployment
66+ # - Production servers without gateway infrastructure
0 commit comments