AI Tools Infrastructure

Serverless MCP Server on Amazon ECS Fargate Gives AI Agents Shared Data Lake Access

AWS describes a serverless MCP server on Amazon ECS Fargate where a JSON metadata file, not custom code, exposes a new data lake dataset to AI agents.

Illustration of a serverless MCP server connecting AI agents to a data lake
AI-generated editorial illustration.

What problem does this serverless MCP server solve?

A serverless MCP server is a shared gateway that lets AI agents reach company data through one controlled entry point. AWS describes a version built on Amazon ECS Fargate, a service that runs containers without the team managing servers. The Model Context Protocol (MCP) is an open standard that lets AI clients discover and call tools in a consistent way.

AWS explains that many teams wire agents straight to databases and APIs. Each new dataset then needs custom code, and each agent implements its own access control. As datasets and agents multiply, permission enforcement drifts, and adding a data source can take several days of engineering.

Who built it and why?

The AWS team supports Amazon’s North America Sort Center network, where planning teams use operational data to manage capacity, labor and package flow. They built the gateway so those teams could ask questions of the data conversationally.

Separate teams had built their own assistants, each with its own SQL generation, schema knowledge and connection handling. A schema change meant patching every agent, and no single place recorded data access decisions.

What were the design goals?

AWS lists four requirements:

  • Configuration-driven access, where adding a dataset takes a metadata file instead of code.
  • Agent-agnostic tools, so any MCP-compatible client can call the same ones.
  • Permission enforcement at the MCP server layer.
  • Infrastructure that scales with bursty AI workloads.

How does the metadata-driven approach work?

A metadata catalog sits under the tools. It stores schema descriptions, column-level meanings and table relationships. The agent reads this catalog when it generates SQL, so table structures are not hardcoded and schema changes do not force a redeployment.

Exposing a new dataset requires one JSON metadata file. AWS says the server discovers it automatically on the next pipeline sync. A knowledge-base refresh layer indexes new dataset metadata as it arrives, keeping the catalog current.

What are the four layers?

AWS separates the system into a client layer, an MCP server layer, a tools layer and a knowledge-base refresh layer. Each can be scaled and deployed independently.

Client layer

A user sends a query from a web chat, Slack, an IDE plugin or an external agent. The request passes through Amazon Route 53 for DNS and reaches a load balancer configured with HTTPS and AWS WAF, a web firewall. Amazon Cognito authenticates the user with JSON Web Tokens, and Amazon DynamoDB stores session state.

A context mapping file scopes each query to relevant tables. It groups tables into business domains such as package data or labor planning. AWS reports that in its testing this scoping keeps end-to-end interaction latency at 15 to 20 seconds. Adding a new domain means adding one entry to the mapping.

MCP server layer

The server runs on its own ECS Fargate cluster, isolated from the client layer behind an internal load balancer in a private subnet. It handles query analysis, tool selection, execution and response generation. An agent powered by Amazon Bedrock orchestrates tools built with FastMCP, a Python framework for MCP servers. Amazon Bedrock Guardrails is applied to every model interaction.

Through an MCP endpoint, external MCP-compatible clients such as Amazon Q Developer or IDE extensions can discover and call the tools directly.

Fargate tasks are stateless, with conversation history kept in DynamoDB. Tasks can therefore be replaced or scaled without losing data. On each request, the agent retrieves session history, interprets intent, invokes tools and streams results back.

Tools and data layer

Tools are registered with FastMCP and discoverable at runtime. SQL query tools run against Amazon Athena and Amazon Redshift for datasets in the data lake. Amazon Bedrock Knowledge Bases, a managed retrieval augmented generation (RAG) capability, handles semantic search. AWS Lambda handles ingestion into Amazon S3 and the knowledge bases.

What does this change for data access?

Access control moves into one layer. Instead of each agent carrying its own rules, the MCP server enforces permissions centrally, which gives a single audit point for data access decisions. Onboarding shifts from a multi-day effort per table to adding a metadata file.

The account comes from a single AWS description of its own internal deployment. AWS has not published the full tool table or any cost figures, so the broader market effect of the pattern is not established.

Sources