MCP ExplorerExplorer

Mcp On Aws Bedrock

@davidshtianon 9 months ago
49 MIT
FreeCommunity
AI Systems
A simple and clear example for implementation and understanding Anthropic MCP (on AWS Bedrock).

Overview

What is Mcp On Aws Bedrock

MCP-on-AWS-Bedrock is a project that provides a simple and clear example for implementing and understanding Anthropic’s Model Context Protocol (MCP) using AWS Bedrock. It includes a client implementation that interacts with MCP-enabled tools through AWS Bedrock’s runtime service.

Use cases

Use cases for MCP-on-AWS-Bedrock include developing applications that leverage multiple machine learning tools, creating interactive AI systems, and facilitating communication between different AI models in a cloud environment.

How to use

To use MCP-on-AWS-Bedrock, ensure you have Python 3.10 or higher, an AWS account with Bedrock access, and configured AWS credentials. You can run the stdio client using the command ‘uv run client_stdio.py’ or the sse client with ‘uv run client_sse.py’ after setting up the MCP tool server.

Key features

Key features of MCP-on-AWS-Bedrock include seamless integration with AWS Bedrock runtime, tool format conversion for Bedrock compatibility, asynchronous communication handling, and structured logging for debugging purposes.

Where to use

MCP-on-AWS-Bedrock can be used in various fields that require integration of machine learning models with cloud services, particularly in applications that utilize the Model Context Protocol for enhanced model interactions.

Content

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.

Updates 2025-05-10: Streamable HTTP

  • Add support for Streamable HTTP
  • Rewrite the URL fetching MCP server fetch_url_mcp_server.py that demonstrates different transport types

Usage Instructions

Run the server with default stdio settings (no transport parameter):

uv run fetch_url_mcp_server.py

# client
uv run client_stdio.py

Run with streamable-http transport on default port (8000):

python fetch_url_mcp_server.py --transport streamable-http

# client
uv run client_streamablehttp.py

Run with streamable-http transport on custom port:

python fetch_url_mcp_server.py --transport streamable-http --port 8080

Prerequisites

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

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers