Skip to content

ComposioHQ/openai-composio-mcp-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Agent with MCP

This is a simple example of using OpenAI Agents SDK with Composio MCP, using uv for Python dependency management.

Setup

  1. Install uv:
pip install uv
  1. Create and activate a virtual environment with uv:
uv venv
  1. Install Python dependencies with uv:
uv pip install -r requirements.txt
  1. Create a .env file and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
COMPSOIO_MCP_SSE_URL=<YOUR_MCP_SERVER>

Get the MCP URL from https://mcp.composio.dev (this example is for Gmail MCP server)

Usage

Run the agent:

uv run agent.py

The agent will:

  1. Connect to the Composio MCP Server
  2. Ask to fetch all the emails and summarise them

How it works

The agent uses the OpenAI Agents SDK with MCP integration to:

  • Initialize an OpenAI model (GPT-4)
  • Create an agent to Composio MCP Server with the SSE Link
  • List and summarise all the recent emails

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published