@@ -79,20 +79,121 @@ Configuration is managed through environment variables with the `MCP_` prefix:
7979| ` MCP_DOCKER_HOST ` | (auto-detect) | Docker daemon host URL |
8080| ` MCP_LOG_LEVEL ` | ` INFO ` | Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) |
8181| ` MCP_LOG_FORMAT ` | ` json ` | Log format (json or text) |
82- | ` MCP_HOST ` | ` 0.0.0.0 ` | Server host to bind to |
83- | ` MCP_PORT ` | ` 8000 ` | Server port to bind to |
82+ | ` MCP_HOST ` | ` 0.0.0.0 ` | Server host to bind to (for HTTP-based transports) |
83+ | ` MCP_PORT ` | ` 8000 ` | Server port to bind to (for HTTP-based transports) |
8484| ` MCP_DEFAULT_IMAGE_ALIAS ` | ` python:3.11-slim ` | Default image for warm container pool |
8585| ` MCP_WARM_POOL_ENABLED ` | ` true ` | Enable warm container pool for fast attach |
8686| ` MCP_WARM_HEALTH_CHECK_INTERVAL ` | ` 60 ` | Interval in seconds for warm container health checks |
8787
88+ ### Transport Configuration
89+
90+ MCP DevBench supports multiple transport modes:
91+
92+ | Variable | Default | Description |
93+ | ----------| ---------| -------------|
94+ | ` MCP_TRANSPORT_MODE ` | ` streamable-http ` | Transport protocol: ` stdio ` , ` sse ` , or ` streamable-http ` |
95+ | ` MCP_PATH ` | ` /mcp ` | Path for HTTP-based transports (sse or streamable-http) |
96+
97+ ** Transport Modes:**
98+ - ` stdio ` : Standard input/output for local desktop clients (Claude Desktop, Cursor, etc.)
99+ - ` sse ` : Server-Sent Events (legacy HTTP transport, use streamable-http instead)
100+ - ` streamable-http ` : Recommended HTTP transport with full bidirectional streaming support
101+
102+ ### Authentication Configuration
103+
104+ MCP DevBench supports multiple authentication modes for securing your server:
105+
106+ | Variable | Default | Description |
107+ | ----------| ---------| -------------|
108+ | ` MCP_AUTH_MODE ` | ` none ` | Authentication mode: ` none ` , ` bearer ` , ` oauth ` , or ` oidc ` |
109+ | ` MCP_BEARER_TOKEN ` | (none) | Bearer token for ` bearer ` authentication mode |
110+ | ` MCP_OAUTH_CLIENT_ID ` | (none) | OAuth/OIDC client ID |
111+ | ` MCP_OAUTH_CLIENT_SECRET ` | (none) | OAuth/OIDC client secret |
112+ | ` MCP_OAUTH_CONFIG_URL ` | (none) | OIDC provider configuration URL (e.g., ` https://auth.example.com/.well-known/openid-configuration ` ) |
113+ | ` MCP_OAUTH_BASE_URL ` | (none) | Base URL of this server for OAuth callbacks |
114+ | ` MCP_OAUTH_REDIRECT_PATH ` | ` /auth/callback ` | OAuth callback redirect path |
115+ | ` MCP_OAUTH_AUDIENCE ` | (none) | OAuth audience parameter (required by some providers like Auth0) |
116+ | ` MCP_OAUTH_REQUIRED_SCOPES ` | (empty) | Comma-separated list of required OAuth scopes |
117+
118+ ** Authentication Modes:**
119+
120+ 1 . ** none** (default): No authentication required
121+ ``` bash
122+ MCP_AUTH_MODE=none
123+ ```
124+
125+ 2 . ** bearer** : Simple bearer token authentication for API keys and service accounts
126+ ``` bash
127+ MCP_AUTH_MODE=bearer
128+ MCP_BEARER_TOKEN=your-secret-token-here
129+ ```
130+
131+ 3 . ** oidc** : OpenID Connect authentication with automatic provider discovery
132+ ``` bash
133+ MCP_AUTH_MODE=oidc
134+ MCP_OAUTH_CLIENT_ID=your-client-id
135+ MCP_OAUTH_CLIENT_SECRET=your-client-secret
136+ MCP_OAUTH_CONFIG_URL=https://your-provider.com/.well-known/openid-configuration
137+ MCP_OAUTH_BASE_URL=https://your-server.com
138+ MCP_OAUTH_REDIRECT_PATH=/auth/callback
139+ # Optional:
140+ MCP_OAUTH_AUDIENCE=https://api.your-server.com
141+ MCP_OAUTH_REQUIRED_SCOPES=read,write,admin
142+ ```
143+
144+ 4 . ** oauth** : Not directly supported - use ` oidc ` mode instead for OAuth providers with OIDC discovery support
145+
146+ ** OIDC Provider Examples:**
147+
148+ - ** Auth0** : Use ` https://YOUR_DOMAIN.auth0.com/.well-known/openid-configuration `
149+ - ** Google** : Use ` https://accounts.google.com/.well-known/openid-configuration `
150+ - ** Azure AD** : Use ` https://login.microsoftonline.com/YOUR_TENANT_ID/v2.0/.well-known/openid-configuration `
151+ - ** Keycloak** : Use ` https://YOUR_KEYCLOAK_DOMAIN/realms/YOUR_REALM/.well-known/openid-configuration `
152+
88153### Example .env file
154+
155+ ** Basic configuration (no auth, HTTP transport):**
89156``` bash
90157MCP_ALLOWED_REGISTRIES=docker.io,ghcr.io,registry.example.com
91158MCP_STATE_DB=/data/state.db
92159MCP_LOG_LEVEL=DEBUG
93160MCP_LOG_FORMAT=json
94161MCP_DEFAULT_IMAGE_ALIAS=python:3.11-slim
95162MCP_WARM_POOL_ENABLED=true
163+ MCP_TRANSPORT_MODE=streamable-http
164+ MCP_HOST=0.0.0.0
165+ MCP_PORT=8000
166+ MCP_PATH=/mcp
167+ ```
168+
169+ ** With bearer token authentication:**
170+ ``` bash
171+ MCP_TRANSPORT_MODE=streamable-http
172+ MCP_HOST=0.0.0.0
173+ MCP_PORT=8000
174+ MCP_AUTH_MODE=bearer
175+ MCP_BEARER_TOKEN=my-secret-api-key-12345
176+ ```
177+
178+ ** With OIDC authentication (Auth0 example):**
179+ ``` bash
180+ MCP_TRANSPORT_MODE=streamable-http
181+ MCP_HOST=0.0.0.0
182+ MCP_PORT=8000
183+ MCP_AUTH_MODE=oidc
184+ MCP_OAUTH_CLIENT_ID=your-auth0-client-id
185+ MCP_OAUTH_CLIENT_SECRET=your-auth0-client-secret
186+ MCP_OAUTH_CONFIG_URL=https://your-tenant.auth0.com/.well-known/openid-configuration
187+ MCP_OAUTH_BASE_URL=https://your-mcp-server.com
188+ MCP_OAUTH_AUDIENCE=https://your-mcp-server.com/api
189+ MCP_OAUTH_REQUIRED_SCOPES=openid,profile,email
190+ ```
191+
192+ ** STDIO transport for local use (e.g., Claude Desktop):**
193+ ``` bash
194+ MCP_TRANSPORT_MODE=stdio
195+ MCP_AUTH_MODE=none
196+ # Host and port are not used for stdio transport
96197```
97198
98199## Development
0 commit comments