Summary
Implement multi-tenant support allowing multiple teams/organizations to share a gateway with proper isolation.
Parent Epic
Part of #1 - Production Kubernetes & Container Support
Use Cases
- Platform teams providing MCP gateway as a service
- SaaS deployments with customer isolation
- Enterprise multi-team environments
- Development/staging/production separation
Architecture
┌──────────────────────────────────────────────────────────┐
│ MCP Gateway │
├──────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Tenant A │ │ Tenant B │ │ Tenant C │ │
│ │ (team-a) │ │ (team-b) │ │ (team-c) │ │
│ ├─────────────┤ ├─────────────┤ ├─────────────┤ │
│ │ namespace: │ │ namespace: │ │ namespace: │ │
│ │ mcp-team-a │ │ mcp-team-b │ │ mcp-team-c │ │
│ │ catalog: │ │ catalog: │ │ catalog: │ │
│ │ team-a.yaml │ │ team-b.yaml │ │ team-c.yaml │ │
│ │ quota: 5 srv│ │ quota: 10srv│ │ quota: 3 srv│ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└──────────────────────────────────────────────────────────┘
Tenant Configuration
# tenants.yaml
tenants:
- id: team-a
display_name: Team Alpha
namespace: mcp-team-a
catalog_file: catalogs/team-a.yaml
api_keys:
- key_hash: "sha256:abc123..."
name: "production"
- key_hash: "sha256:def456..."
name: "development"
quotas:
max_servers: 5
max_concurrent_requests: 100
- id: team-b
display_name: Team Beta
namespace: mcp-team-b
catalog_file: catalogs/team-b.yaml
api_keys:
- key_hash: "sha256:xyz789..."
quotas:
max_servers: 10
API Changes
Tenant Identification
# Via header
X-Tenant-ID: team-a
# Via path prefix
GET /tenant/team-a/servers
# Via API key (automatic lookup)
Authorization: Bearer <team-a-api-key>
Tenant-Scoped Endpoints
GET /tenant/{tenant_id}/servers
POST /tenant/{tenant_id}/servers/{server_id}/mcp
GET /tenant/{tenant_id}/metrics
Features Required
Acceptance Criteria
Security Considerations
- API keys stored as secure hashes
- Namespace RBAC prevents cross-tenant access
- Rate limiting per tenant
- Audit logging of tenant actions
References
Summary
Implement multi-tenant support allowing multiple teams/organizations to share a gateway with proper isolation.
Parent Epic
Part of #1 - Production Kubernetes & Container Support
Use Cases
Architecture
Tenant Configuration
API Changes
Tenant Identification
Tenant-Scoped Endpoints
Features Required
Acceptance Criteria
Security Considerations
References