openai-agents-sdk-mcp-server

kenneth-tao/openai-agents-sdk-mcp-server

3.2

If you are the rightful owner of openai-agents-sdk-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The OpenAI Agents SDK MCP Server provides access to comprehensive documentation for AI coding assistants, enabling them to utilize the OpenAI Agents Python SDK effectively.

Tools
2
Resources
0
Prompts
0

OpenAI Agents SDK MCP Server

A comprehe## šŸ“š Documentation

- Complete installation, configuration, and usage instructions

This guide covers everything you need:

  • Quick installation and setup
  • Configuration for all AI assistants (Cursor, Cline, Claude Desktop)
  • Available tools and usage examples
  • Troubleshooting common issues

šŸ“‹ PrerequisitesCP (Model Context Protocol) server that provides access to the complete OpenAI Agents Python SDK documentation for AI coding assistants like Cursor, Cline, and Roo.

šŸŽÆ Overview

This MCP server enables AI coding assistants to access up-to-date OpenAI Agents SDK documentation, including:

  • 15+ Documentation Sections: Complete coverage from quickstart to advanced topics
  • API References: Detailed documentation for Agent, Runner, Tools, and Models
  • Smart Search: Intelligent search with relevance scoring across all documentation
  • Code Examples: Extraction and delivery of relevant code examples
  • Intelligent Caching: 30-minute cache to minimize API calls while staying current

šŸš€ Features

šŸ“š Complete Documentation Coverage

  • Getting Started: Overview, Quickstart Guide
  • Core Concepts: Agents, Running Agents, Tools, Handoffs, Guardrails
  • Configuration: Models, SDK Configuration
  • Advanced: Context Management
  • Debugging & Monitoring: Tracing, Agent Visualization
  • Integration: Model Context Protocol (MCP)
  • Examples: Real-world implementation patterns
  • API Reference: Complete API documentation for all classes

šŸ” Smart Search Capabilities

  • Keyword Search: Find relevant documentation sections
  • Category Filtering: Filter by documentation category
  • Relevance Scoring: Results ranked by relevance
  • Multi-term Search: Handle complex queries effectively

šŸ’» Code Example Extraction

  • Targeted Examples: Get examples for specific topics
  • Code Block Extraction: Automatically extract Python code blocks
  • Topic Mapping: Intelligent mapping of topics to relevant sections

⚔ Performance Optimized

  • Intelligent Caching: 30-minute TTL to balance freshness and performance
  • Efficient Fetching: Only fetch content when requested
  • Error Handling: Graceful degradation when content is unavailable

ļæ½ Documentation

  • - Detailed usage examples and integration instructions
  • - Complete setup instructions for all AI assistants
  • - Technical deep dive and architecture overview

ļæ½šŸ“‹ Prerequisites

  • Node.js 18+
  • npm or yarn

šŸ›  Installation & Quick Start

Option 1: Install from npm (Recommended)

# Install globally for easy access
npm install -g openai-agents-sdk-mcp-server

# Get your configuration
npx openai-agents-mcp-config

Option 2: Clone and Build

# Clone the repository
git clone https://github.com/kenneth-tao/openai-agents-sdk-mcp-server.git
cd openai-agents-sdk-mcp-server

# Install dependencies and build
npm install
npm run build

# Get your configuration
node get-config.js

Test the Installation

# Test the server (for global install)
openai-agents-mcp

# Or for local install
npm start

The server will start and display: OpenAI Agents Python MCP Server running on stdio

āœ… Issues Fixed

The following TypeScript issues have been resolved:

  • āœ… Type Safety: Added proper interfaces for DocumentationSection and DocumentationSections
  • āœ… Object Indexing: Fixed unsafe object property access with proper type guards
  • āœ… Argument Validation: Added proper type checking for tool arguments
  • āœ… Error Handling: Improved error handling with proper type guards
  • āœ… Resource Annotations: Fixed missing URL property in resource annotations
  • āœ… Map Type Issues: Fixed category grouping with proper array-based Map structure

šŸ”§ MCP Server Configuration

Resources Available

The server provides access to 15+ documentation resources:

Resource URIDescriptionCategory
openai-agents://docs/overviewSDK Overview and IntroductionGetting Started
openai-agents://docs/quickstartStep-by-step Quickstart GuideGetting Started
openai-agents://docs/agentsAgent Creation and ConfigurationCore Concepts
openai-agents://docs/running-agentsRunning Agents with RunnerCore Concepts
openai-agents://docs/toolsFunction Tools and Hosted ToolsCore Concepts
openai-agents://docs/handoffsAgent-to-Agent DelegationCore Concepts
openai-agents://docs/guardrailsInput/Output ValidationCore Concepts
openai-agents://docs/modelsModel ConfigurationConfiguration
openai-agents://docs/contextContext ManagementAdvanced
openai-agents://docs/tracingBuilt-in TracingDebugging & Monitoring
openai-agents://docs/visualizationAgent VisualizationDebugging & Monitoring
openai-agents://docs/configSDK ConfigurationConfiguration
openai-agents://docs/mcpModel Context ProtocolIntegration
openai-agents://docs/examplesExample ImplementationsExamples
openai-agents://docs/api-*API ReferencesAPI Reference

Tools Available

šŸ” search_documentation

Search across all OpenAI Agents SDK documentation.

Parameters:

  • query (string, required): Search query
  • category (string, optional): Filter by category

Categories:

  • Getting Started, Core Concepts, Configuration, Advanced
  • Debugging & Monitoring, Integration, Examples, API Reference

Example:

{
  "name": "search_documentation",
  "arguments": {
    "query": "function tools with validation",
    "category": "Core Concepts"
  }
}
šŸ“ get_code_examples

Get code examples for specific SDK functionality.

Parameters:

  • topic (string, required): Topic to get examples for

Supported Topics:

  • basic agent, function tools, handoffs, guardrails
  • tracing, models, context, mcp

Example:

{
  "name": "get_code_examples",
  "arguments": {
    "topic": "function tools"
  }
}

šŸ”Œ Integration with AI Assistants

Quick Configuration

After installation, get your configuration:

# Get configuration for your system
npx openai-agents-mcp-config

This will output the correct command and args for your installation type.

Cursor Configuration

Add to your Cursor settings (settings.json):

{
  "mcp.servers": {
    "openai-agents-sdk": {
      "command": "openai-agents-mcp",
      "args": [],
      "description": "OpenAI Agents SDK documentation",
      "disabled": false
    }
  }
}

Cline Configuration

Add to your Cline MCP settings:

{
  "mcpServers": {
    "openai-agents-sdk": {
      "command": "openai-agents-mcp",
      "args": [],
      "env": {},
      "disabled": false
    }
  }
}

Roo Configuration

Configure Roo to use this MCP server with the same command and arguments.

šŸ“– For detailed configuration instructions for all AI assistants, see

šŸŽÆ Usage Examples

Once configured with your AI assistant, you can ask questions like:

Basic Usage

  • "How do I create a basic Agent with the OpenAI Agents SDK?"
  • "Show me how to add function tools to an agent"
  • "What's the syntax for running an agent?"

Advanced Features

  • "How do I implement handoffs between agents?"
  • "Show me how to set up guardrails for input validation"
  • "How do I enable tracing for my agent workflow?"

API References

  • "What are the parameters for the Agent class constructor?"
  • "How do I configure the Runner class?"
  • "What methods are available on the Tool class?"

šŸ“– For more detailed examples and integration guides, see

šŸ“ Project Structure

ā”œā”€ā”€ src/
│   └── index.ts              # Main MCP server implementation
ā”œā”€ā”€ dist/                     # Compiled JavaScript files
ā”œā”€ā”€ docs/                     # Documentation
│   ā”œā”€ā”€ USAGE.md             # Detailed usage guide
│   ā”œā”€ā”€ CONFIGURATION.md     # Setup and configuration
│   └── IMPLEMENTATION_REVIEW.md # Technical architecture review
ā”œā”€ā”€ .vscode/
│   ā”œā”€ā”€ launch.json          # Debug configuration
│   ā”œā”€ā”€ tasks.json           # Build tasks
│   └── mcp.json             # MCP server configuration
ā”œā”€ā”€ .github/
│   └── copilot-instructions.md  # Copilot instructions
ā”œā”€ā”€ package.json             # Project configuration
ā”œā”€ā”€ tsconfig.json            # TypeScript configuration
ā”œā”€ā”€ README.md                # This file
└── test.js                  # Test script

šŸ”§ Development

Build Commands

# Build the project
npm run build

# Start the server
npm start

# Development mode (auto-rebuild)
npm run dev

# Run tests
npm test

Debug in VS Code

  1. Open the project in VS Code
  2. Press F5 or go to Run & Debug
  3. Select "Debug MCP Server"
  4. The server will build automatically and start in debug mode

šŸ¤ Contributing

This MCP server is designed to be robust and comprehensive. If you notice any issues or have suggestions for improvements, please feel free to contribute.

šŸ“„ License

MIT License


Ready to supercharge your AI coding assistant with OpenAI Agents SDK knowledge! šŸš€