kenneth-tao/openai-agents-sdk-mcp-server
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.
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
andDocumentationSections
- ā 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 URI | Description | Category |
---|---|---|
openai-agents://docs/overview | SDK Overview and Introduction | Getting Started |
openai-agents://docs/quickstart | Step-by-step Quickstart Guide | Getting Started |
openai-agents://docs/agents | Agent Creation and Configuration | Core Concepts |
openai-agents://docs/running-agents | Running Agents with Runner | Core Concepts |
openai-agents://docs/tools | Function Tools and Hosted Tools | Core Concepts |
openai-agents://docs/handoffs | Agent-to-Agent Delegation | Core Concepts |
openai-agents://docs/guardrails | Input/Output Validation | Core Concepts |
openai-agents://docs/models | Model Configuration | Configuration |
openai-agents://docs/context | Context Management | Advanced |
openai-agents://docs/tracing | Built-in Tracing | Debugging & Monitoring |
openai-agents://docs/visualization | Agent Visualization | Debugging & Monitoring |
openai-agents://docs/config | SDK Configuration | Configuration |
openai-agents://docs/mcp | Model Context Protocol | Integration |
openai-agents://docs/examples | Example Implementations | Examples |
openai-agents://docs/api-* | API References | API Reference |
Tools Available
š search_documentation
Search across all OpenAI Agents SDK documentation.
Parameters:
query
(string, required): Search querycategory
(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
- Open the project in VS Code
- Press
F5
or go to Run & Debug - Select "Debug MCP Server"
- 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! š