Architecture: How to implement Cloud MCP Intelligence System for global, m...
Documentation for Sessions
🏗️ Architecture: How to implement Cloud MCP Intelligence System for global, m...
Date: 2026-01-17
Time: 17:03:27 UTC
Session: editor2-50.8
Agent: backend
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How to implement Cloud MCP Intelligence System for global, multi-tenant AI access?
Task: Implement Cloud MCP Intelligence System (Session 51.2)
🎯 Decision Made
Chosen:
Three-tier architecture: (1) Development MCP (ai-mcp-dev) for internal team, (2) Platform MCP (ai-agents) for infrastructure, (3) User MCP (space-agents_{spaceId}) for per-space AI learning. Implemented as NestJS module in backend-ai-api with HTTP + WebSocket transport, OAuth authentication, usage-based billing, and Super Intelligence exposure.
Options Considered:
- Independent microservice
- Module in backend-ai-api (extractable)
- NPM package only
- Separate cloud service
💭 Reasoning
Leveraged existing infrastructure: Super Intelligence services already existed, database segregation (ai-mcp-dev, ai-agents, space-agents_{spaceId}) already implemented, Command Center WebSocket ready for reuse, JWT auth ready. Module-first approach with MCP_STANDALONE_MODE feature flag allows future extraction when traffic justifies. 70% of infrastructure pre-existing meant rapid implementation. Privacy-first with opt-in sharing. Usage-based billing (500 free, 10K builder, 50K pro, enterprise unlimited) with soft limits. Exposed Super Intelligence (Episodic Memory, Causal Reasoning, Simulation) as differentiator.
📁 Files Involved
apis/backend-ai-api/src/app/mcp-gateway/mcp-gateway.module.tsapis/backend-ai-api/src/app/mcp-gateway/services/mcp-transport.service.tsapis/backend-ai-api/src/app/mcp-gateway/services/mcp-usage.service.tslibs/libs-ai/gograb-ai/src/lib/components/usage-dashboard/usage-dashboard.component.ts
🔗 Related
- Decision ID:
dev_1768669404352_clpqjls - Session: 50
- Workspace: editor2
Auto-generated by MCP Smart Consolidation