Serverless MCP server for AI agent data lake access on Amazon ECS Fargate

Amazon's North America Sort Center (NASC) team has described a serverless Model Context Protocol (MCP) server, built on Amazon Elastic Container Service with AWS Fargate, that sits between AI agents and the organization's enterprise data lake. The write-up, published on the AWS Machine Learning Blog, targets planning teams in the NASC network who manage capacity, labor and package flow and wanted conversational access to operational data. The central claim is that exposing a new dataset now requires only a JSON metadata file, which the server picks up automatically on its next pipeline sync.
The problem the team describes is a familiar one. The lake holds thousands of datasets, and multiple teams each built their own agent integration from scratch, embedding SQL generation, schema knowledge and connection handling. A schema change meant patching every agent, access control was fragmented with no single audit point, and onboarding one table typically took days of custom tool code, query validation and redeployment.
Four design goals followed: configuration-driven access where a dataset is a metadata file rather than code; agent-agnostic tool interfaces so any MCP-compatible client invokes the same tools; permission enforcement centralized at the server layer; and elastic infrastructure matched to bursty AI workloads.
The deployment splits into four independently scalable layers. On the client side, requests resolve through Route 53 to a public Application Load Balancer with HTTPS and AWS WAF, then pass to an ECS Fargate client service that uses Amazon Cognito for JWT authentication and DynamoDB for session storage. That layer forwards traffic through an internal load balancer into a separate Fargate cluster running the MCP server, which is powered by Amazon Bedrock for orchestration and uses FastMCP, a Python framework for building MCP servers, to expose tools over a JSON-RPC endpoint at /mcp. Backends include Amazon Athena and Amazon Redshift for SQL, and Amazon Bedrock Knowledge Bases for semantic search. Lambda handles ingestion into S3 and the knowledge bases.
Fargate tasks on the MCP server are stateless, with conversation state persisted in DynamoDB, so tasks can be replaced or scaled without losing context. On each request the agent pulls session history, analyzes intent with Bedrock, selects and invokes tools, and streams results back.
The metadata design is the part most teams will study. Each dataset gets a JSON file with database and table names, a business description, per-column descriptions with sample values, load type, refresh frequency, table size and timestamps. The description field can carry engine-specific hints, such as wrapping string literals in date() when comparing against timestamp columns, which the team says reduces SQL validation failures. Sample values help WHERE clause generation by showing that an identifier column holds codes like FC-EAST-07 rather than spelled-out region names. A pipeline embeds the files with Amazon Titan Text Embeddings and indexes them into Bedrock Knowledge Bases, after which every connected agent can discover the table without a restart.
An optional context mapping narrows search to relevant tables and can be added later without touching the metadata files. A query flow works like this: the question is embedded into a vector, the catalog is searched for matching schemas, a lightweight model call picks a table, Bedrock generates SQL using the schema, column descriptions and hints, the statement is validated and auto-corrected for Athena compatibility, then executed. In the team's testing the full interaction lands in the 15 to 20 second range.
The same agent can mix tools in one turn. Asked for a return rate alongside the product team's analysis of root causes, it runs an Athena query and a knowledge base document search, then merges the answers.
Security is layered rather than concentrated at one point. The MCP server sits in private subnets behind an internal load balancer and cannot be reached from the internet; only the client tier, itself behind WAF, can route to it. Athena tools reject anything but SELECT statements at the tool level. Bedrock Guardrails applies to all model interactions to filter harmful content, enforce grounding checks and help block prompt injection. Every tool invocation is logged to CloudWatch as structured JSON, giving one audit trail across agents.
Scaling is split by workload: the client service uses ECS Service Auto Scaling at 50 percent CPU utilization, the MCP server scales on CPU and memory, and Athena and Bedrock scale on their own. The architecture is available in Regions where Bedrock and Bedrock Knowledge Bases are available.
In practice, this pattern is a reference architecture rather than a product. A developer could reproduce it, but the latency figure suggests it suits analyst-style answers, not sub-second lookups, and my reading is that a 15 to 20 second round trip constrains interactive use. The reliance on model-generated SQL validated and auto-corrected against a catalog is a reasonable trade-off: accuracy improves with better descriptions, but the system's behavior depends on metadata quality, which becomes a new kind of maintenance work. SELECT-only enforcement and single audit logging address real governance gaps that per-agent integrations create.
The team lists two extensions in progress: column-level restrictions per permission group, with the agent excluding restricted columns from generated SQL without prompt changes, and a feedback loop that captures failed or low-confidence queries and suggests fixes to column descriptions or query hints.
Why it matters: Teams wiring agents to data warehouses face the same duplication problem, and this shows a workable shape for a shared MCP gateway where onboarding is configuration rather than code. Developers building agent backends can borrow the stateless task plus external session store pattern and the idea of embedding table metadata as discoverable knowledge. My inference is that metadata quality, not orchestration code, becomes the main operational lever once a system like this is live.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Learn how to build a serverless Model Context Protocol (MCP) server on Amazon ECS with AWS Fargate that gives AI agents secure, metadata-driven access to an enterprise data lake. Exposing a new dataset requires only a JSON file, with no per-dataset integration code.