Sample Model Context Protocol Demos
@aws-samples
Collection of examples of how to use Model Context Protocol with AWS.
概要
What is Sample Model Context Protocol Demos?
A collection of sample applications demonstrating how to build Agentic AI with AWS using the Model Context Protocol (MCP). It includes multiple demo modules in TypeScript, Python, Java, and Kotlin that implement MCP clients and servers integrated with Amazon Bedrock, supporting both SSE and stdio transports, with deployment options ranging from local containers to Amazon ECS.
How to use Sample Model Context Protocol Demos?
Browse the module table in the README to select a demo that fits your language and deployment preference. Each module directory contains its own code, configuration, and instructions for setup and execution.
Key features of Sample Model Context Protocol Demos
- Multiple language implementations (TypeScript, Python, Java, Kotlin)
- MCP over both SSE and stdio transports
- Integration with Amazon Bedrock Converse API
- Local Docker and Amazon ECS deployment options
- RAG example using PostgreSQL with pgvector
- Spring AI and Anthropic Bedrock client examples
Use cases of Sample Model Context Protocol Demos
- Build an MCP client that connects to an MCP server via SSE or stdio using Bedrock
- Deploy an MCP server and client on Amazon ECS behind a public load balancer
- Create an agent that manages adoption appointments with an MCP server and a RAG database
- Experiment with MCP in different programming environments and transport modes
FAQ from Sample Model Context Protocol Demos
What languages are available in these demos?
TypeScript, Python, Java (Spring AI), and Kotlin (Spring AI) modules are provided.
What transport protocols are supported?
Both SSE (Server-Sent Events) and stdio (standard input/output) transports are demonstrated.
Does this include RAG (Retrieval-Augmented Generation)?
Yes, one module (spring-ai-java-bedrock-mcp-rag) uses PostgreSQL with pgvector for RAG in a dog adoption agent.
Can I deploy these demos to AWS?
Yes, several modules are designed to run on Amazon ECS (EC2 or Fargate) and can be exposed via an Application Load Balancer.
Are there local-only options?
Yes. The "Server Client MCP/stdio Demo" module runs locally using Python and connects directly with Amazon Bedrock.