Skip to main content
Glama

AWS Bedrock 上的 MCP

一个简单清晰的示例,用于实现和理解 Anthropic MCP(在 AWS Bedrock 上)。

对于多台 MCP 服务器的管理,可以参考这个小项目 Q-2001 ~

概述

该项目演示了如何在 AWS Bedrock 中实现并使用 Anthropic 的模型上下文协议 (MCP)。它提供了一个客户端实现,可以通过 AWS Bedrock 的运行时服务与支持 MCP 的工具进行交互。

Related MCP server: AWS MCP Server

更新 2025-05-10:可流式传输的 HTTP

  • 添加对Streamable HTTP 的支持

  • 重写 URL 获取 MCP 服务器fetch_url_mcp_server.py ,演示不同的传输类型

使用说明

使用默认 stdio 设置(无传输参数)运行服务器:

uv run fetch_url_mcp_server.py

# client
uv run client_stdio.py

在默认端口(8000)上使用 streamable-http 传输运行:

python fetch_url_mcp_server.py --transport streamable-http

# client
uv run client_streamablehttp.py

在自定义端口上使用 streamable-http 传输运行:

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

先决条件

  • Python 3.10 或更高版本

  • 具有 Bedrock 访问权限的 AWS 账户

  • 配置 AWS 凭证

  • UV包管理器

特征

  • 使用 Converse API 与 AWS Bedrock 运行时无缝集成

  • 实现 Bedrock 兼容性的工具格式转换

  • 异步通信处理

  • 用于调试的结构化日志记录

贡献

请随意提交问题并请求改进实施。

执照

MIT 许可证

参考

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      Implements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.
      1
      153
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with AWS services (EC2, S3, Lambda, DynamoDB, etc.) through the Model Context Protocol, allowing natural language management of cloud resources.
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a standardized interface for interacting with Rocketlane's tools and services through the Model Context Protocol, enabling unified API access.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a standardized interface for interacting with Falai's tools and services through the Model Context Protocol, enabling AI assistants to leverage Falai capabilities.
      2
      MIT