How delee03/aws-audit-mcp-server works
Project Type and Purpose
• This is a specialized full-stack microservice project comprising:
– mcp_client: a TypeScript library / client for consuming the MCP Server via Server-Sent Events (SSE).
– mcp_server: a Python-based SSE API that fetches and serves AWS documentation.
• It ships with local‐development (Docker), production deployment (Nginx + Docker), GitHub Actions CI/CD, and Terraform for AWS infra.
Main Components
a. MCP Client (TypeScript)
– Packaged via npm (mcp_client/src/index.ts)
– Used by third-party tools (n8n, VS Code Copilot)
– Establishes an SSE connection to the server.
b. Edge Proxy / Ingress
– Nginx (with Let’s Encrypt SSL)
– Terminates HTTPS, forwards plain HTTP to the container.
c. MCP Server (Docker Container)
– Python application (mcp_server/src) exposing /sse endpoints.
– Implements three MCP tools: search_documentation, read_documentation, recommend.
– Optionally packaged as an AWS Lambda (scripts/build_lambda.sh, lambda_handler_sse.py).
d. External Service
– AWS Documentation API (external HTTP)
e. Infrastructure as Code
– Terraform (mcp_server/terraform/*.tf) provisions any AWS resources needed.
f. CI/CD Pipelines
– GitHub Actions workflows under .github/workflows/ci-cd.yml (client)
– .github/workflows/deploy-workers.yml (server)
g. Local Dev / Testing
– Docker Compose (docker-compose.yml)
– Utility scripts (run-docker.sh, get-aws-info.sh)
Relationships & Data Flow
1. MCP Client → (HTTPS/SSE) → Nginx
2. Nginx → (HTTP) → Docker Container (MCP Server)
3. MCP Server → (HTTP) → AWS Documentation API
4. Terraform → AWS (infra provisioning)
5. GitHub Actions → (build & deploy) → Docker registry / AWS / Cloudflare Workers / Lambda
Architectural Patterns & Design Principles
• Microservice / API-Gateway pattern (server behind Nginx)
• Client-Server SSE transport (unidirectional stream)
• Containerization (Docker), with optional serverless Lambda target
• Infrastructure-as-Code (Terraform)
• CI/CD-driven deployments (GitHub Actions)
Technologies & Frameworks
• Frontend/Client: Node.js, TypeScript, npm
• Backend: Python 3.x, FastAPI/Starlette (or similar) under SSE
• Proxy: Nginx + Let’s Encrypt
• Containerization: Docker, Docker Compose
• Cloud Infra: AWS (Terraform), optional Lambda
• CI/CD: GitHub Actions
What
– e.g., Client → HTTPS/SSE → Nginx → HTTP → MCP Server → HTTPS → AWS Docs API
– Green for user-facing components
– Blue for internal services
– Gray for external dependencies
– Orange for CI/CD/IaC pipelines
• Notes or annotations for:
– Ports (8000), endpoints (/sse)
– File tree pointers (e.g., mcp_server/src, mcp_client/src)
– Build/deploy scripts