npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openai-agents-mcp

v0.1.0

Published

MCP server that wraps OpenAI's Agents SDK to enable advanced AI capabilities in Claude Code

Readme

OpenAI Agents MCP 🤖

npm version License: MIT

A Model Context Protocol (MCP) server that bridges OpenAI's Agents SDK with Claude Code and other MCP clients. Enable powerful AI agent capabilities including web search, file search, and computer use directly in your development environment.

🚀 Quick Start

npx openai-agents-mcp

That's it! The server will start and be ready to accept MCP connections.

🎯 Features

  • 🔍 Web Search - Search the web using OpenAI's integrated web search capability
  • 📁 File Search - Analyze and search through files with AI-powered understanding
  • 💻 Computer Use - Interact with computer interfaces (preview feature, requires tier 3-5)
  • ⚡ Real-time Streaming - Stream responses for better user experience
  • 🔧 Claude Code Ready - Works seamlessly with Claude Code via stdio transport
  • 🧪 Test-Driven - Comprehensive test suite with high coverage
  • 📦 NPX Compatible - Run directly without installation

📋 Prerequisites

  • Node.js 18.0.0 or higher
  • OpenAI API key
  • For computer use: OpenAI usage tier 3-5

🔧 Installation & Setup

Option 1: NPX (Recommended)

No installation needed! Just run:

npx openai-agents-mcp

Option 2: Global Installation

npm install -g openai-agents-mcp
openai-agents-mcp

Option 3: From Source

git clone https://github.com/merlinrabens/openai-agents-mcp.git
cd openai-agents-mcp
npm install
npm run build
npm start

⚙️ Configuration

Environment Variables

Create a .env file in your project root:

# Required
OPENAI_API_KEY=sk-...your-key-here

# Optional
OPENAI_ORGANIZATION=org-...         # Your org ID
ENABLE_COMPUTER_USE=true            # Enable computer use (requires tier 3-5)
LOG_LEVEL=info                      # debug | info | warn | error

Claude Code Integration

Add to your Claude Code configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "openai-agents": {
      "command": "npx",
      "args": ["openai-agents-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-...your-key-here"
      }
    }
  }
}

Then restart Claude Code to activate the server.

💡 Usage Examples

Once configured, you can use these commands in Claude Code:

Web Search

Use the web_search tool to find the latest news about AI developments

File Search

Use the file_search tool to analyze this codebase and find all API endpoints

Computer Use (if enabled)

Use the computer_use tool to take a screenshot of the current screen

🏗️ Architecture

┌─────────────┐     MCP Protocol     ┌──────────────┐     OpenAI API     ┌──────────┐
│ Claude Code │ ◄──────────────────► │  This Server │ ◄─────────────────► │  OpenAI  │
│   or other  │      stdio/HTTP       │              │    Agents SDK       │  Agents  │
│ MCP Client  │                       │              │                     │          │
└─────────────┘                       └──────────────┘                     └──────────┘

Key Components

  • MCP Server Core - Handles MCP protocol using @modelcontextprotocol/sdk
  • OpenAI Integration - Uses @openai/agents SDK for agent capabilities
  • Tool Translation - Maps MCP tool calls to OpenAI function calls
  • Stream Handler - Manages real-time streaming responses
  • Error Handler - Provides retry logic and graceful error handling

🧪 Development

Setup Development Environment

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

# Install dependencies
npm install

# Run in development mode
npm run dev

Available Scripts

npm run dev          # Development mode with hot reload
npm test            # Run test suite
npm run test:watch  # Run tests in watch mode
npm run test:coverage # Generate coverage report
npm run build       # Build for production
npm run lint        # Run ESLint
npm run format      # Format with Prettier

Project Structure

src/
├── server/         # MCP server implementation
│   └── index.ts    # Main server class
├── openai/         # OpenAI Agents SDK integration
│   └── client.ts   # OpenAI client wrapper
├── tools/          # Tool definitions
├── config/         # Configuration management
└── utils/          # Utilities and helpers

tests/              # Test suite
bin/               # CLI entry point
examples/          # Usage examples

📊 Testing

The project follows Test-Driven Development (TDD) principles:

# Run all tests
npm test

# Watch mode for development
npm run test:watch

# Coverage report
npm run test:coverage

Current test coverage: ~71%

💰 Pricing

This server uses OpenAI's API, which has the following pricing (as of March 2025):

  • Input: $3 per 1M tokens
  • Output: $12 per 1M tokens
  • Computer Use: Research preview (requires tier 3-5)

🤝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Write tests first (TDD approach)
  4. Implement your feature
  5. Ensure all tests pass
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

📝 License

MIT License - see LICENSE file for details

🙏 Acknowledgments

Built with:

🐛 Troubleshooting

Server won't start

  • Ensure OPENAI_API_KEY is set correctly
  • Check Node.js version is 18.0.0 or higher
  • Run npm run build if running from source

Claude Code doesn't see the server

  • Restart Claude Code after updating configuration
  • Check the configuration file path is correct
  • Verify the server starts without errors: npx openai-agents-mcp

Computer use not working

  • Verify your OpenAI account is tier 3-5
  • Set ENABLE_COMPUTER_USE=true in environment

📧 Support

🚦 Status

  • ✅ Web Search - Fully functional
  • ✅ File Search - Fully functional
  • ⚠️ Computer Use - Preview (requires tier 3-5)
  • 🚧 OpenAI Agents SDK - Preview as of March 2025

Note: The OpenAI Agents SDK is currently in preview. Features and pricing may change. The deprecated Assistants API will be sunset by mid-2026 in favor of the Agents SDK.