Skip to content
Dashboard

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.

mcp-service architecture — clients, DataLake Athena, and ad/commerce APIs

Three client types talk to mcp-service:

ClientRole
Claude DesktopLocal MCP client over SSE / Streamable HTTP
claude.aiRemote MCP
CursorIDE MCP client

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

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

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)

Every tools/call is logged (redacted) → Kinesis FirehoseS3Athena. That audit path sits alongside keyword routing so operators can see which tools ran and which backend (API, pipeline, or clickstream) handled them.

  • 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)