Architecture
Cloud AI is powered by mcp-service, a Spring AI MCP server. AI clients connect over SSE / Streamable HTTP (/stream). Keyword routing (api / pipeline / clickstream) selects the backend for each tool call.

Clients
Section titled “Clients”Three client types talk to mcp-service:
| Client | Role |
|---|---|
| Claude Desktop | Local MCP client over SSE / Streamable HTTP |
| claude.ai | Remote MCP |
| Cursor | IDE MCP client |
mcp-service hub
Section titled “mcp-service hub”The service sits in the center and orchestrates:
- dashboard-backend — REST with JWT + OAuth; backed by PostgreSQL (RDS) for auth and application context
- Redis cluster — Cache and RAG vectors
- OpenAI — Embeddings used for retrieval-augmented context
- EdgeTag — Script / tag overview and OAuth-related edge integration
- Kinesis Firehose — Redacted tool-usage logs streamed to S3 (analytics Parquet) for later Athena analysis
Data lake (Athena)
Section titled “Data lake (Athena)”For pipeline and clickstream queries, mcp-service runs SQL against:
- Amazon Athena — Serverless SQL
- Amazon S3 — Data lake storage feeding Athena
- Glue Data Catalog / AWS Glue — Schema catalog and ETL for the lake
Ad & commerce APIs
Section titled “Ad & commerce APIs”For live channel and store data, mcp-service calls APIs directly over REST:
- Google Ads (Ads API)
- Meta (Graph API)
- TikTok (Marketing API)
- Shopify (Admin API)
Tool-call logging
Section titled “Tool-call logging”Every tools/call is logged (redacted) → Kinesis Firehose → S3 → Athena. That audit path sits alongside keyword routing so operators can see which tools ran and which backend (API, pipeline, or clickstream) handled them.
Technology stack
Section titled “Technology stack”- Spring Boot 3.3 / Spring AI (MCP starter), Java 17
- AWS SDK (Athena, S3, IAM, Firehose)
- Redis (Jedis) for cache and RAG vectors
- Dedicated Athena workgroup for MCP query cost isolation (see service config
ATHENA_MCP_WORKGROUP_NAME)