You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`-i`: Required for passing configuration via stdin
262
+
-`-v /var/run/docker.sock:/var/run/docker.sock`: Required for spawning backend MCP servers
263
+
-`-p <host>:<container>`: Port mapping must match `MCP_GATEWAY_PORT`
264
+
265
+
### Validation Checks
266
+
267
+
The containerized startup script performs these validations:
268
+
269
+
| Check | Description | Action on Failure |
270
+
|-------|-------------|-------------------|
271
+
| Docker Socket | Verifies Docker daemon is accessible | Exit with error |
272
+
| Environment Variables | Checks required env vars are set | Exit with error |
273
+
| Port Mapping | Verifies container port is mapped to host | Exit with error |
274
+
| Stdin Interactive | Ensures `-i` flag was used | Exit with error |
275
+
| Log Directory Mount | Verifies log directory is mounted to host | Warning (logs won't persist) |
276
+
277
+
### Non-Containerized Mode
278
+
279
+
For local development, use `run.sh` which:
280
+
281
+
1.**Warns** about missing environment variables (but continues)
282
+
2.**Provides** default configuration if no config file specified
283
+
3.**Auto-detects** containerized environments and redirects to `run_containerized.sh`
284
+
285
+
```bash
286
+
# Run locally with defaults:
287
+
./run.sh
288
+
289
+
# Run with custom config:
290
+
CONFIG=my-config.toml ./run.sh
291
+
292
+
# Run with environment variables:
293
+
MCP_GATEWAY_PORT=3000 ./run.sh
173
294
```
174
295
175
296
## Logging
@@ -178,12 +299,17 @@ MCPG provides comprehensive logging of all gateway operations to help diagnose i
178
299
179
300
### Log File Location
180
301
181
-
By default, logs are written to `/tmp/gh-aw/sandbox/mcp/mcp-gateway.log`. This location can be configured using the `--log-dir` flag:
302
+
By default, logs are written to `/tmp/gh-aw/sandbox/mcp/mcp-gateway.log`. This location can be configured using the `--log-dir` flag or `MCP_GATEWAY_LOG_DIR` environment variable:
0 commit comments