Cover image
Try Now
2024-12-01

Demo del MCP de código abierto de Anthrope utilizado con Amazon Bedrock Converse API

3 years

Works with Finder

5

Github Watches

22

Github Forks

81

Github Stars

Amazon Bedrock Converse API MCP Demo

This is a demo of Anthropic's open source MCP used with Amazon Bedrock Converse API. This combination allows for the MCP to be used with any of the many models supported by the Converse API.

Prerequisites

  • Python 3.8+
  • AWS account with Bedrock access
  • AWS credentials configured locally
  • SQLite database (Follow the instructions in the MCP Quick Start Guide to set this up.)

Installation

  1. Clone the repository:
git clone <repository-url>
cd <project-directory>
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install required packages:
pip install -r requirements.txt

Configuration

  1. Ensure AWS credentials are properly configured in ~/.aws/credentials or via environment variables:
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_DEFAULT_REGION=us-west-2
  1. The default configuration uses:
  • Model: anthropic.claude-3-5-sonnet-20241022-v2:0
  • Region: us-west-2
  • SQLite database path: ~/test.db

Project Structure

  • app.py: Main application entry point and interactive loop
  • converse_agent.py: Core agent implementation with Bedrock integration
  • converse_tools.py: Tool management and execution system
  • mcp_client.py: MCP (Model Control Protocol) client implementation

Usage

  1. Start the application:
python app.py
  1. Enter prompts when prompted. The agent will:
  • Process your input
  • Execute any necessary tools
  • Provide responses
  • Maintain conversation context
  1. Exit the application by typing 'quit', 'exit', 'q', or using Ctrl+C

Key Components

ConverseAgent

The main agent class that:

  • Manages conversation flow
  • Integrates with Bedrock
  • Handles tool execution
  • Processes responses

Reference:

startLine: 3
endLine: 109

ConverseToolManager

Manages tool registration and execution:

  • Tool registration with schemas
  • Name sanitization
  • Tool execution handling

Reference:

startLine: 5
endLine: 76

MCPClient

Handles communication with the MCP server:

  • Tool discovery
  • Tool execution
  • Server connection management

Reference:

startLine: 6
endLine: 48

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

  • Mintplex-Labs
  • La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.

    Reviews

    3 (1)
    Avatar
    user_DgLW4Kkh
    2025-04-17

    I have been using amazon-bedrock-mcp for a while, and it has truly transformed my workflow. The integration and functionality provided by mikegc-aws are impressive. The documentation is thorough, and the support is outstanding. Highly recommend checking it out at https://github.com/mikegc-aws/amazon-bedrock-mcp.