1. Conduid
  2. AI
  3. Openai MCP Agents
MCP server · AI

Openai MCP Agents

SDK for integrating Model Context Protocol (MCP) into OpenAI Agents

Unclaimed Apache-2.0 last commit a year ago ai
49Fair

Scored 5 months ago · breakdown

About Openai MCP Agents

Openai MCP Agents is an MCP server published by madroidmaq in the AI category: sDK for integrating Model Context Protocol (MCP) into OpenAI Agents.

Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/madroidmaq/openai-mcp-agents

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Openai MCP Agents

Powered by Claude · Grounded in docs

I know everything about Openai MCP Agents. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

3 checks have not been run yet.

README

OpenAI MCP Agents

License

This project is an SDK that integrates Model Context Protocol (MCP) into OpenAI Agents. It allows you to easily provide MCP server functionality as tools for OpenAI Agents to use.

Features

  • Supports two connection types:
    • Stdio connection: Communicate with local processes via standard input/output
    • SSE connection: Communicate with remote servers via Server-Sent Events
  • Supports two usage patterns:
    • Using async context manager (async with) for automatic connection management
    • Manual connection management via connect() and disconnect() methods
  • Support for connecting to multiple MCP servers
  • Full type hint support
  • Detailed example code provided

Installation

Using uv (Recommended)

uv install git+https://github.com/madroidmaq/openai-mcp-agents.git

Using pip

pip install git+https://github.com/madroidmaq/openai-mcp-agents.git

Development Environment Setup

If you want to contribute to the project, you can set up your development environment as follows:

# Clone the repository
git clone https://github.com/madroidmaq/openai-mcp-agents.git
cd openai-mcp-agents

# Create a virtual environment and install dependencies using uv
uv venv
source .venv/bin/activate  # On Windows use .venv\Scripts\activate
uv pip install -e .

Usage Examples

Single Server Connection

from openai_mcp_agents.mcp_agent import McpAgent
from mcp import StdioServerParameters

# Configure MCP server
server_params = StdioServerParameters(
    command="npx",
    args=["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"],
)

# Using async context manager
async with McpAgent(
    name="Filesystem Assistant",
    instructions="You are a filesystem assistant",
    mcp_server=server_params,
    model="gpt-4"
) as agent:
    result = await Runner.run(
        agent,
        input="Please list all files in the directory.",
        context={}
    )
    print(result.final_output)

Multiple Server Connection

from openai_mcp_agents.mcp_agent import MultiServerMCPClient

async with MultiServerMCPClient({
    "math": {
        "command": "python",
        "args": ["/path/to/math_server.py"],
        "transport": "stdio",
    },
    "weather": {
        "url": "http://localhost:8000/sse",
        "transport": "sse",
    }
}) as client:
    all_tools = client.get_tools()
    # Use the tools...

API Documentation

McpAgent

McpAgent class inherits from Agent class and is used to connect to a single MCP server.

class McpAgent(Agent):
    def __init__(self,
        mcp_server: Optional[Union[StdioServerParameters, StdioConnection, SSEConnection]] = None,
        **kwargs):
        ...

MultiServerMCPClient

MultiServerMCPClient class is used to connect to multiple MCP servers simultaneously.

class MultiServerMCPClient(Agent):
    def __init__(self,
        connections: Optional[Dict[str, Union[StdioConnection, SSEConnection]]] = None,
        name: str = "MultiServerMCPClient",
        **kwargs):
        ...

Contributing

Issues and Pull Requests are welcome!

Contribution Process

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

This project uses Black for code formatting and mypy for type checking. Please ensure you run these tools before submitting your code.

black src tests examples
mypy src

License

Apache License 2.0

Support

If you encounter any issues while using this project, please get support through the following channels:

  1. Check the documentation
  2. Submit an Issue
  3. Send an email to madroidmaq@gmail.com

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Openai MCP Agents

How do I install Openai MCP Agents?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Openai MCP Agents safe to use with an AI agent?

Its trust score is 49 out of 100 (fair). It passes 2 of the 3 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Openai MCP Agents still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.