Skip to content

Conversation

CryptoCultCurt
Copy link

This PR adds support for MCP Servers in OpenAI agents by bumping the openai-agents dependency to v0.0.7. This enables users to integrate MCP servers directly into their agent configurations.

Changes

  • Bumped openai-agents to v0.0.7 in pyproject.toml
  • Updated uv.lock to reflect the new dependency version
  • Added changelog entry documenting the new MCP Servers support

Example Usage

Users can now integrate MCP servers with a simple configuration:

agent = Agent(
    name="Assistant",
    instructions="Use the tools to answer any questions.",
    mcp_servers=[mcp_server],
)

Testing

  • Manually tested the MCP Server integration
  • Verified the agent successfully initializes with MCP servers
  • Confirmed the dependency update resolves correctly

Documentation

  • Added a changelog entry under changelog.d/123.feature
  • The changelog entry includes a basic example of the new functionality

Dependencies

  • Bumped openai-agents from previous version to v0.0.7

Related Issues

N/A

@cb-heimdall
Copy link

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions bot added the framework extension New framework extension label Apr 2, 2025
CryptoCultCurt added a commit to CryptoCultCurt/agentkit that referenced this pull request Apr 2, 2025
@CryptoCultCurt CryptoCultCurt force-pushed the feature/update-openai-agent branch from 69e7467 to 41faac5 Compare April 2, 2025 23:23
Copy link
Contributor

@CarsonRoscoe CarsonRoscoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, happy to see Agent supports MCP servers so easily.

Would you be willing to add an example showcasing this? Hopefully the lift is very small considering how simple your code snippet provided is.

  1. Duplicate the /python/examples/openai-agents-sdk-smart-wallet-chatbot
  2. Rename your copy to something like openai-agents-model-context-protocol-smart-wallet-server (Verbose, I know... first time having two AI framework integrations in one folder name)
  3. Update the code to a MCP Server showcase. Whatever is needed to showcase running AgentKit using the OpenAI Agents and MCP. We have one on the Typescript side for reference
  4. In the examples README, include the steps needed to get the example running

There would be a lot of value in showcasing such a cool feature :)

@github-actions github-actions bot added example New example agent python labels Apr 10, 2025
@CryptoCultCurt
Copy link
Author

I added a simple example of a fear and greed index. No API key required so easier for people to run.

Fantastic, happy to see Agent supports MCP servers so easily.

Would you be willing to add an example showcasing this? Hopefully the lift is very small considering how simple your code snippet provided is.

  1. Duplicate the /python/examples/openai-agents-sdk-smart-wallet-chatbot
  2. Rename your copy to something like openai-agents-model-context-protocol-smart-wallet-server (Verbose, I know... first time having two AI framework integrations in one folder name)
  3. Update the code to a MCP Server showcase. Whatever is needed to showcase running AgentKit using the OpenAI Agents and MCP. We have one on the Typescript side for reference
  4. In the examples README, include the steps needed to get the example running

There would be a lot of value in showcasing such a cool feature :)

@phdargen
Copy link
Contributor

Hi @CryptoCultCurt, could you please rebase against main and bump openai-agents to the latest version?

@phdargen
Copy link
Contributor

Please move openai-agents-model-context-protocol-smart-wallet-server.py out of examples/openai-agents-sdk-smart-wallet-chatbot into a new directory examples/openai-agents-sdk-smart-wallet-chatbot/openai-agents-model-context-protocol-smart-wallet-server and rename to chatbot.py. Add README and .env-local etc files as in other examples


# Configure a file to persist the agent's CDP API Wallet Data.
wallet_data_file = "wallet_data.txt"
mcp_server_path = "/Users/curtfluegel/Documents/Development/crypto-feargreed-mcp/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to use a remote mcp server here, for example from coingecko: https://docs.coingecko.com/reference/mcp-server#remote-server-public-keyless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

example New example agent framework extension New framework extension python

Development

Successfully merging this pull request may close these issues.

4 participants