MCP-AWS

by anirban1592
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Uses .ENV files for configuration and secure storage of AWS credentials and API keys needed for the MCP server operation.

  • Integrates with GitHub repositories for code access and deployment, allowing users to clone the necessary code components for the MCP server implementation.

  • Incorporates Google's A2A (Agent-to-Agent) protocol for enabling robust multi-agent communication between AI systems.

🚀 多智能体系统:A2A 和 MCP 集成 POC

POC:集成 A2A、MCP 和 OpenAI 代理以执行 AWS 任务🖥️✨


🎥 演示视频

观看演示视频,了解 MCP-AWS 的实际操作!🚀


🌟 功能

  1. 🚀无缝协议集成:演示了代理到代理 (A2A) 协议与模型上下文协议 (MCP) 服务器的成功集成,以实现强大的多代理通信。
  2. 🧠利用 OpenAI Agents SDK :基于强大的 OpenAI Agents SDK 构建能够理解和根据用户提示采取行动的智能代理。
  3. ☁️自动化云管理:通过简单的用户交互实现 AWS EC2 实例的直接配置和终止,展示通过 MCP 的实用工具执行。

🛠️ MCP 服务器中的工具

MCP 服务器是一个自定义服务器,具有两个工具:

  1. initiate_aws_ec2_instance :创建 AWS EC2 实例。
  2. terminate_aws_ec2_instance :通过 ID 终止 AWS EC2 实例。

🚀 入门

先决条件

  1. Python 3.12+ (用于本地设置)或Docker (用于容器化设置)
  2. AWS IAM 角色:创建具有管理 EC2 实例所需权限的 IAM 角色。
  3. 环境变量:准备一个包含以下变量的.env文件:
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
    • AWS_DEFAULT_REGION
    • OPENAI_API_KEY
    • AMI_ID
    • INSTANCE_TYPE
    • KEY_NAME
    • SECURITY_GROUP_IDS
    • AWS_REGION

🏃‍♂️ 运行应用程序

  1. 在根目录克隆存储库:
    git clone https://github.com/anirban1592/google_openai_mcp.git cd google_openai_mcp
  2. 按照先决条件所示创建.env文件
  3. 运行远程代理示例:
    cd openai-agent/ uv run .
  4. 在根目录克隆 A2A 客户端代码(由谷歌提供):
    git clone https://github.com/google/A2A.git cd demo/ui
  5. 使用您的 API 密钥创建环境文件,或在出现提示时直接在 UI 中输入:
    echo "GOOGLE_API_KEY=your_api_key_here" >> .env
  6. 运行前端示例:
    uv run main.py
  7. 请参阅附件视频来查看实际效果

💬 使用AI代理

  1. 要创建 EC2 实例:
    Enter your command: Create an EC2 instance
  2. 要终止 EC2 实例:
    Enter your command: Terminate EC2 instance with ID <instance-id>

⚠️ 警告

  • IAM 角色和凭证:请自行承担创建 AWS IAM 角色和凭证的风险。请确保遵循 AWS 安全最佳实践。
  • 计费与安全:本应用为概念验证 (POC),仅供学习之用。我们对任何计费问题或安全事故概不负责。

📚 学习内容

该项目表明:

  1. 如何将 MCP 服务器与 OpenAI Agents SDK 集成
  2. 如何为 AWS 资源管理构建一个简单的 AI 驱动应用程序

尽情探索 AI 和 MCP 服务器的强大功能吧!🌟

-
security - not tested
F
license - not found
-
quality - not tested

自定义服务器,带有可使 AI 代理通过自然语言命令配置和终止 AWS EC2 实例的工具。

  1. 🎥 Demo Video
    1. 🌟 Features
      1. 🛠️ Tools in the MCP Server
        1. 🚀 Getting Started
          1. Prerequisites
          2. 🏃‍♂️ Running the App
          3. 💬 Using the AI Agent
        2. ⚠️ Word of Caution
          1. 📚 Learnings
            ID: 6ta4sr54fm