Run a multi-tenant MCP gateway for different teams
Quando usar: Design and Eng need different MCPs, but you don't want to run two gateways.
Pré-requisitos
- A host with Node 20+ or Docker — Any small VM
- OAuth IdP (or use built-in for local) — Dex, Auth0, Okta — anything that speaks OIDC
Fluxo
-
Define scopes in the agent configDraft an agent config where 'design' scope exposes figma and davinci-resolve MCPs, 'eng' scope exposes github, sentry, postgres.✓ Copiado→ Config with scoped upstream mappings
-
Wire OAuthConnect the agent to our Auth0 tenant, map groups to scopes.✓ Copiado→ Users see only their scope's tools
-
Audit usageShow me the last 24h of tool calls by user, grouped by tool name.✓ Copiado→ Usage report
Resultado: One gateway, per-team tool views, full audit trail.
Armadilhas
- Scope design gets spaghetti fast — Start with 2-3 broad scopes (eng-read, eng-write, design) rather than per-tool scopes
- Audit logs balloon disk usage — Rotate logs weekly or ship to a log aggregator