aws bedrock.com
aws bedrock.com logo

AWS Bedrock

Integrates AWS Bedrock, enabling natural language processing and task automation.

Created byApr 22, 2025

MCP on AWS Bedrock

A simple and clear example for implementation and understanding Anthropic MCP (on AWS Bedrock).
For multiple MCP servers management, this tiny project Q-2001 could be referred~

Overview

This project demonstrates how to implement and use Anthropic's Model Context Protocol (MCP) with AWS Bedrock. It provides a client implementation that can interact with MCP-enabled tools through AWS Bedrock's runtime service.

Prerequisites

  • Python 3.10 or higher
  • AWS account with Bedrock access
  • Configured AWS credentials
  • UV package manager

Project Structure

  • client_stdio.py: Main client implementation for interacting with Bedrock and MCP tools using stdio mode
  • client_sse.py: Main client implementation for interacting with Bedrock and MCP tools using sse mode
  • mcp_simple_tool/: Directory containing the MCP tool implementation
  • pyproject.toml: Project dependencies and configuration

Usage

Run the stdio client with:
The client will:
  1. Initialize a connection to AWS Bedrock
  1. Start the MCP tool server
  1. List available tools and convert them to the format required by Bedrock
  1. Handle communication between Bedrock and the MCP tools
Run the sse client with:

Features

  • Seamless integration with AWS Bedrock runtime using Converse API
  • Tool format conversion for Bedrock compatibility
  • Asynchronous communication handling
  • Structured logging for debugging

Contributing

Feel free to submit issues and pull requests to improve the implementation.

License

MIT License

References

MCP on AWS Bedrock

A simple and clear example for implementation and understanding Anthropic MCP (on AWS Bedrock).
For multiple MCP servers management, this tiny project Q-2001 could be referred~

Overview

This project demonstrates how to implement and use Anthropic's Model Context Protocol (MCP) with AWS Bedrock. It provides a client implementation that can interact with MCP-enabled tools through AWS Bedrock's runtime service.

Prerequisites

  • Python 3.10 or higher
  • AWS account with Bedrock access
  • Configured AWS credentials
  • UV package manager

Project Structure

  • client_stdio.py: Main client implementation for interacting with Bedrock and MCP tools using stdio mode
  • client_sse.py: Main client implementation for interacting with Bedrock and MCP tools using sse mode
  • mcp_simple_tool/: Directory containing the MCP tool implementation
  • pyproject.toml: Project dependencies and configuration

Usage

Run the stdio client with:
The client will:
  1. Initialize a connection to AWS Bedrock
  1. Start the MCP tool server
  1. List available tools and convert them to the format required by Bedrock
  1. Handle communication between Bedrock and the MCP tools
Run the sse client with:

Features

  • Seamless integration with AWS Bedrock runtime using Converse API
  • Tool format conversion for Bedrock compatibility
  • Asynchronous communication handling
  • Structured logging for debugging

Contributing

Feel free to submit issues and pull requests to improve the implementation.

License

MIT License

References