MCP ExplorerExplorer

Google Openai Mcp

@anirban1592on a year ago
1 MIT
FreeCommunity
AI Systems
This is a simple App which showcases how google's A2A protocol works along with Anthropic's MCP protocol with a simple EC2 creation mcp tool

Overview

What is Google Openai Mcp

google_openai_mcp is a simple application that demonstrates the integration of Google’s Agent-to-Agent (A2A) protocol with Anthropic’s Model Context Protocol (MCP) for managing AWS EC2 instances.

Use cases

Use cases include creating and managing AWS EC2 instances through intelligent agents, automating cloud tasks, and demonstrating the interaction between different protocols in a multi-agent system.

How to use

To use google_openai_mcp, clone the repository, set up the required environment variables in a .env file, and run the application using Python or Docker. Follow the instructions in the README for detailed steps.

Key features

Key features include seamless protocol integration for multi-agent communication, leveraging OpenAI Agents SDK for intelligent agent capabilities, and automated cloud management for provisioning and terminating AWS EC2 instances.

Where to use

google_openai_mcp can be used in cloud computing environments, particularly for automating AWS resource management and enhancing multi-agent systems.

Content

🚀 Multi-Agent System: A2A & MCP Integration POC

POC: Integrating A2A, MCP, and OpenAI Agents for AWS Tasks 🖥️✨


🎥 Demo Video

Watch the demo video to see MCP-AWS in action! 🚀

Watch the Demo


🌟 Features

  1. 🚀 Seamless Protocol Integration: Demonstrates the successful integration of the Agent-to-Agent (A2A) protocol with a Model Context Protocol (MCP) server for robust multi-agent communication.

  2. 🧠 Leverages OpenAI Agents SDK: Built upon the powerful OpenAI Agents SDK to create intelligent agents capable of understanding and acting on user prompts.

  3. ☁️ Automated Cloud Management: Enables direct provisioning and termination of AWS EC2 instances through simple user interactions, showcasing practical tool execution via the MCP.


🛠️ Tools in the MCP Server

The MCP server is a custom server with two tools:

  1. initiate_aws_ec2_instance: Creates an AWS EC2 instance.
  2. terminate_aws_ec2_instance: Terminates an AWS EC2 instance by its ID.

🚀 Getting Started

Prerequisites

  1. Python 3.12+ (for local setup) or Docker (for containerized setup)
  2. AWS IAM Role: Create an IAM role with the necessary permissions to manage EC2 instances.
  3. Environment Variables: Prepare a .env file with the following variables:
    • 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

🏃‍♂️ Running the App

  1. Clone the repository at the root:

    git clone https://github.com/anirban1592/google_openai_mcp.git
    cd google_openai_mcp
    
  2. Create .env file as shown in prerequisites

  3. Run the remote agent example:

    cd openai-agent/
    uv run .     
    
  4. Clone the A2A client code(by google) at the root dir:

    git clone https://github.com/google/A2A.git
    cd demo/ui
    
  5. Create an environment file with your API key or enter it directly in the UI when prompted:

    echo "GOOGLE_API_KEY=your_api_key_here" >> .env
    
  6. Run the front end example:

    uv run main.py
    
  7. Refer to the attached video to see it in action

💬 Using the AI Agent

  1. To create an EC2 instance:

    Enter your command: Create an EC2 instance
    
  2. To terminate an EC2 instance:

    Enter your command: Terminate EC2 instance with ID <instance-id>
    

⚠️ Word of Caution

  • IAM Role and Credentials: Please create AWS IAM roles and credentials at your own risk. Ensure you follow AWS best practices for security.
  • Billing and Security: This app is a proof of concept (POC) and is intended for learning purposes only. We are not responsible for any billing issues or security incidents.

📚 Learnings

This project demonstrates:

  1. How to integrate MCP servers with OpenAI Agents SDK
  2. How to build a simple AI-driven application for AWS resource management

Enjoy exploring the power of AI and MCP servers! 🌟

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers