Version: v0.2.0 (Phase 3: MCP Server Wiring)
# 1. Clone the repository
git clone https://github.com/DojoGenesis/gateway.git
cd AgenticGatewayByDojoGenesis
# 2. Set environment variables (optional)
export LANGFUSE_NEXTAUTH_SECRET="your-random-secret-min-32-chars"
export LANGFUSE_SALT="your-random-salt-min-32-chars"
# 3. Start the stack
docker-compose up -d
# 4. Verify all services are running
docker-compose ps
# 5. Check MCP server status
curl http://localhost:8080/admin/mcp/status
# 6. View observability in Langfuse
open http://localhost:3000# 1. Install MCPByDojoGenesis binary (if not already installed)
go install github.com/TresPies-source/MCPByDojoGenesis@latest
# 2. Create config directory and copy config
mkdir -p config
cp gateway-config.yaml config/mcp_servers.yaml
# 3. Set environment variables
export MCP_CONFIG_PATH=config/mcp_servers.yaml
export MCP_BY_DOJO_BINARY=$(which mcp-by-dojo-genesis)
export OTEL_ENABLED=false # or configure OTEL endpoint
# 4. Run the gateway
go run main.go
# 5. Verify MCP status
curl http://localhost:8080/admin/mcp/statusThe gateway reads MCP server configuration from:
- Docker:
/etc/gateway/gateway-config.yaml(mounted via volume) - Local:
config/mcp_servers.yaml(default) or path specified inMCP_CONFIG_PATH
See docs/mcp-configuration.md for detailed configuration options.
Required for Docker Compose:
MCP_BY_DOJO_BINARY— Path to MCPByDojoGenesis binary (set automatically in docker-compose)OTEL_EXPORTER_OTLP_ENDPOINT— OTEL collector endpoint (default:http://otel-collector:4318)
Optional:
MCP_CONFIG_PATH— Path to MCP configuration file (default:config/mcp_servers.yaml)MCP_LOG_LEVEL— Log level for MCP servers (default:info)LANGFUSE_NEXTAUTH_SECRET— Langfuse authentication secret (required for production)LANGFUSE_SALT— Langfuse encryption salt (required for production)COMPOSIO_API_KEY— Composio API key (if enabling Composio integration)
The docker-compose stack includes:
| Service | Port | Description |
|---|---|---|
| gateway | 8080 | Main AgenticGateway API |
| mcp-by-dojo | N/A | Binary provider (exits after copying binary) |
| otel-collector | 4318 | OTLP HTTP receiver for traces |
| langfuse | 3000 | Observability UI and trace storage |
| postgres | 5432 | Langfuse database |
curl http://localhost:8080/healthExpected response:
{
"status": "healthy",
"version": "v0.2.0"
}curl http://localhost:8080/admin/mcp/statusExpected response:
{
"servers": {
"mcp_by_dojo": {
"server_id": "mcp_by_dojo",
"display_name": "MCP By Dojo Genesis",
"state": "connected",
"tool_count": 14,
"last_health_check": "2026-02-13T12:00:00Z"
}
},
"total_servers": 1,
"total_tools": 14,
"healthy": true
}curl http://localhost:13133/curl http://localhost:3000/api/healthSymptom: "state": "disconnected" in /admin/mcp/status
Solutions:
-
Check binary exists:
docker-compose exec gateway ls -la /opt/mcp-servers/ -
Check logs:
docker-compose logs gateway | grep MCP -
Verify environment variables:
docker-compose exec gateway env | grep MCP
-
Restart gateway:
docker-compose restart gateway
Symptom: "tool_count": 0
Solutions:
- Check allowlist/blocklist in
gateway-config.yaml - Verify MCP server implements
list_toolscorrectly - Check gateway logs for registration errors
- Increase startup timeout in config
Symptom: No traces in Langfuse UI
Solutions:
-
Check OTEL collector is running:
docker-compose logs otel-collector
-
Verify OTEL endpoint:
docker-compose exec gateway env | grep OTEL
-
Check sampling rate in
gateway-config.yaml:observability: tool_span_sample_rate: 1.0 # 1.0 = trace all
-
Test OTEL endpoint:
curl http://localhost:4318/v1/traces -X POST \ -H "Content-Type: application/json" \ -d '{"resourceSpans": []}'
Symptom: Langfuse container exits or fails to start
Solutions:
-
Set required environment variables:
export LANGFUSE_NEXTAUTH_SECRET="random-32-char-minimum-secret" export LANGFUSE_SALT="random-32-char-minimum-salt" docker-compose up -d
-
Check PostgreSQL is healthy:
docker-compose logs postgres
-
Verify database connection:
docker-compose exec langfuse env | grep DATABASE_URL
# Stop all services
docker-compose down
# Stop and remove volumes (⚠️ deletes all data)
docker-compose down -v-
Set strong secrets:
export LANGFUSE_NEXTAUTH_SECRET=$(openssl rand -base64 32) export LANGFUSE_SALT=$(openssl rand -base64 32)
-
Use environment-specific configs:
- Development:
gateway-config.dev.yaml - Staging:
gateway-config.staging.yaml - Production:
gateway-config.prod.yaml
- Development:
-
Enable authentication on admin endpoints (future enhancement)
-
Use secrets management:
- Kubernetes: Use
kubectl create secret - AWS: Use AWS Secrets Manager
- Docker Swarm: Use
docker secret create
- Kubernetes: Use
-
Gateway horizontal scaling:
gateway: deploy: replicas: 3
-
PostgreSQL replication for Langfuse
-
OTEL collector clustering for high throughput
-
Prometheus metrics:
curl http://localhost:8080/admin/metrics/prometheus
-
Langfuse analytics:
- Go to http://localhost:3000
- Filter by
mcp.server_id - Analyze tool latency, error rates
-
Log aggregation:
- Ship logs to ELK, Loki, or CloudWatch
- Configure structured logging
- MCP Configuration Guide — Add custom MCP servers
- Composio Setup — Enable Composio integration
- Architecture Overview — Understand system design
Questions? Open an issue on GitHub or consult the documentation.