AWS Bedrock 上的 MCP
一个简单清晰的示例,用于实现和理解 Anthropic MCP(在 AWS Bedrock 上)。
对于多台 MCP 服务器的管理,可以参考这个小项目 Q-2001 ~
概述
该项目演示了如何在 AWS Bedrock 中实现并使用 Anthropic 的模型上下文协议 (MCP)。它提供了一个客户端实现,可以通过 AWS Bedrock 的运行时服务与支持 MCP 的工具进行交互。
更新 2025-05-10:可流式传输的 HTTP
添加对Streamable HTTP 的支持
重写 URL 获取 MCP 服务器
fetch_url_mcp_server.py
,演示不同的传输类型
使用说明
使用默认 stdio 设置(无传输参数)运行服务器:
在默认端口(8000)上使用 streamable-http 传输运行:
在自定义端口上使用 streamable-http 传输运行:
先决条件
Python 3.10 或更高版本
具有 Bedrock 访问权限的 AWS 账户
配置 AWS 凭证
UV包管理器
特征
使用 Converse API 与 AWS Bedrock 运行时无缝集成
实现 Bedrock 兼容性的工具格式转换
异步通信处理
用于调试的结构化日志记录
贡献
请随意提交问题并请求改进实施。
执照
MIT 许可证
参考
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
通过实施 Anthropic 的模型上下文协议实现无缝工具集成和通信,促进与支持 AWS Bedrock 的工具的交互。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables Claude to execute Python code using boto3 to query and manage AWS resources directly from conversations.Last updated -122MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server enabling AI assistants to directly interact with infrastructure tools like Ansible and Terraform for executing playbooks, managing cloud resources, and performing other infrastructure operations.Last updated -1814MIT License
- -securityFlicense-qualityA web application that enables users to interact with AWS Bedrock language models through a modern interface with support for multiple models like Claude 3, Titan, and Llama 2.Last updated -
- -securityAlicense-qualityA tool that helps users easily register Anthropic's Model Context Protocol in Claude Desktop and Cursor, providing ready-made MCP tools for RAG, web search, and Dify integrations.Last updated -MIT License