MCPSERV.CLUB
aws-samples

Spring AI MCP Server

MCP Server

Fast, scalable Model Context Protocol server for AWS ECS

Stale(60)
87stars
1views
Updated 12 days ago

About

A lightweight Spring AI MCP Server that streams conversation context over SSE, enabling real‑time agent interactions with Bedrock or Anthropic models. Ideal for deploying scalable, containerized AI services on ECS.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

The Sample Model Context Protocol Demos repository provides a curated set of end‑to‑end examples that demonstrate how to deploy and consume MCP (Model Context Protocol) servers in a variety of cloud environments. These demos illustrate the full lifecycle of an agentic AI system: from initializing a Bedrock or Anthropic client, to hosting a lightweight MCP server that exposes resources and tools over Server‑Sent Events (SSE) or standard I/O, to integrating persistent storage for retrieval‑augmented generation (RAG). By packaging each example in a Docker or ECS configuration, the repository shows how to scale these components while maintaining secure, low‑latency communication between the AI assistant and external services.

Problem Solved

Developers building conversational agents often face a fragmented stack: they must manually orchestrate communication between an LLM provider, a local tool execution layer, and any external APIs or databases. MCP abstracts this complexity by defining a single, language‑agnostic protocol that lets an AI client request resources or invoke tools without embedding vendor‑specific logic. The demos in this repository solve the pain point of “how to glue together Bedrock, Anthropic, and custom tooling” by providing ready‑made, production‑ready MCP servers that expose a consistent API surface.

Server Functionality and Value

Each MCP server in the collection implements the SSE‑based or stdio interface, enabling real‑time streaming of tool outputs back to the client. The servers expose three core capabilities:

  1. Resources – static or dynamic data that the client can query (e.g., a list of available dog breeds for an adoption agent).
  2. Tools – executable actions that the client can invoke, such as scheduling an appointment or querying a PostgreSQL vector store.
  3. Sampling – optional custom sampling strategies that influence the LLM’s response generation.

By centralizing these capabilities, developers can write a single Bedrock or Anthropic client that works across all demos, while the server handles authentication, rate‑limiting, and context propagation. This separation of concerns reduces boilerplate code, eases testing, and speeds up iteration cycles.

Key Features Explained

  • SSE Integration – The servers stream partial responses and tool execution logs directly to the client, preserving conversational context without blocking.
  • Containerized Deployments – Dockerfiles and ECS task definitions are included, allowing rapid deployment to AWS Fargate or local Docker environments.
  • RAG with pgVector – One demo couples a Spring AI MCP server with PostgreSQL’s vector extension, showcasing how to fetch relevant documents and feed them into the model.
  • Public Load Balancing – ECS‑based demos expose their MCP endpoints via an Application Load Balancer, demonstrating how to make the server reachable from external clients while still enforcing IAM policies.
  • Multi‑Language Support – The repository includes TypeScript, Python, Kotlin, and Java implementations, proving that MCP is language‑agnostic.

Real‑World Use Cases

  • Customer Support Bots – A Bedrock‑powered assistant can query a knowledge base, call external ticketing APIs, and schedule callbacks, all through the MCP server.
  • Appointment Scheduling – The dog‑adoption agent demo shows how to use MCP tools to book appointments, demonstrating a typical scheduling workflow.
  • Enterprise RAG – By integrating pgVector, developers can build domain‑specific retrieval systems that feed contextual embeddings into the LLM, improving accuracy for compliance or legal queries.
  • Hybrid Cloud Deployments – The ECS and local stdio demos illustrate how to run MCP servers in both cloud‑native and on‑premises environments, catering to data residency requirements.

Unique Advantages

The repository’s standout strength lies in its end‑to‑end reproducibility. Every demo is a single, self‑contained module that can be built and run with minimal setup, making it an excellent starting point for new MCP adopters. Additionally, the use of AWS services such as Bedrock and ECS provides a realistic production baseline, while the inclusion of a FastAPI client demonstrates how to pair MCP with popular web frameworks. For developers familiar with MCP concepts, these examples translate abstract protocol definitions into tangible, deployable architectures that accelerate the delivery of agentic AI solutions.