Model Context Protocol Samples logo

Model Context Protocol Samples

by aws-samples

This repository provides a collection of examples demonstrating how to use the Model Context Protocol (MCP) with AWS services. It includes various modules showcasing different implementations and use cases of MCP with Amazon Bedrock and Spring AI.

View on GitHub

Last updated: N/A

What is Model Context Protocol Samples?

This repository contains sample code for implementing the Model Context Protocol (MCP) with AWS services like Amazon Bedrock and ECS. It provides examples of MCP client and server implementations in different languages and frameworks, including TypeScript, Python, Spring AI, and Java.

How to use Model Context Protocol Samples?

Each module within the repository provides a specific example of using MCP. To use a module, navigate to its directory and follow the instructions in the README file. Generally, you'll need to configure AWS credentials, install dependencies, and deploy the code to AWS services like ECS or run it locally.

Key features of Model Context Protocol Samples

  • Demonstrates MCP client and server implementations

  • Provides examples in multiple languages (TypeScript, Python, Java, Kotlin)

  • Integrates with Amazon Bedrock for AI model interaction

  • Shows how to deploy MCP servers on ECS

  • Includes a RAG example using pgvector with PostgreSQL

Use cases of Model Context Protocol Samples

  • Building conversational AI applications with Amazon Bedrock

  • Creating agents that manage context and state using MCP

  • Deploying MCP servers on scalable infrastructure like ECS

  • Implementing RAG (Retrieval Augmented Generation) with pgvector

  • Integrating AI models with existing applications using MCP

FAQ from Model Context Protocol Samples

What is Model Context Protocol (MCP)?

MCP is a protocol for managing context and state in AI applications.

What AWS services are used in these examples?

Amazon Bedrock and ECS are the primary AWS services used.

What programming languages are used?

TypeScript, Python, Java, and Kotlin are used in the examples.

How do I deploy these examples?

Refer to the README file in each module for specific deployment instructions. Most examples involve deploying to ECS or running locally.

Where can I find more information about MCP?

Refer to the official MCP documentation and related AWS resources.