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 modeclient_sse.py
: Main client implementation for interacting with Bedrock and MCP tools using sse modemcp_simple_tool/
: Directory containing the MCP tool implementationserver.py
: MCP tool server implementation__main__.py
: Entry point for the tool
pyproject.toml
: Project dependencies and configuration
Usage
Run the stdio client with:
uv pip install boto3
uv run client_stdio.py
The client will:
- Initialize a connection to AWS Bedrock
- Start the MCP tool server
- List available tools and convert them to the format required by Bedrock
- Handle communication between Bedrock and the MCP tools
Run the sse client with:
# server
uv pip install boto3 uvicorn
uv run mcp-simple-tool --transport sse --port 8000
# client
uv run client_sse.py
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
- Anthropic MCP
- MCP Python SDK
- AWS Bedrock
MCP Tool Server
Project Details
- davidshtian/MCP-on-AWS-Bedrock
- MIT License
- Last Updated: 4/19/2025
Recomended MCP Servers
Connect Supabase to your AI assistants
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
OpenAI Code Assistant Model Context Protocol (MCP) Server
基于 Model Context Protocol (MCP) 的服务器,提供对神岛引擎开放接口整合工具。
An mcp server that provides read-only access to MariaDB.
MCP tool for building Xcode iOS workspace/project and feeding back error to LLMs.
Provide latest cryptocurrency news to AI agents.
An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL)...
An MCP server to create secure code sandbox environment for executing code within Docker containers. This MCP server...
Configurable Puppeteer MCP Server