Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-openai

MCP.Pizza Chef: mzxrai

The MCP OpenAI server is a lightweight Model Context Protocol server that enables direct integration of OpenAI's chat models within the Claude Desktop environment. It supports multiple advanced OpenAI models such as gpt-4o, gpt-4o-mini, o1-preview, and o1-mini, providing a simple message passing interface with basic error handling. Designed for developers and users who want to leverage OpenAI's powerful language models alongside Claude, this server requires Node.js 18+, the Claude Desktop app, and an OpenAI API key. It facilitates seamless, real-time interaction with OpenAI models, enhancing AI workflows by combining the strengths of multiple LLM providers.

Use This MCP server To

Integrate OpenAI chat models into Claude Desktop Enable multi-model OpenAI interactions in a single client Facilitate real-time message passing with OpenAI APIs Simplify error handling for OpenAI model calls Extend Claude Desktop capabilities with OpenAI models

README

MCP OpenAI Server

A Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.

Features

  • Direct integration with OpenAI's chat models
  • Support for multiple models including:
    • gpt-4o
    • gpt-4o-mini
    • o1-preview
    • o1-mini
  • Simple message passing interface
  • Basic error handling

Prerequisites

Installation

First, make sure you've got the Claude Desktop app installed and you've requested an OpenAI API key.

Add this entry to your claude_desktop_config.json (on Mac, you'll find it at ~/Library/Application\ Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "mcp-openai": {
      "command": "npx",
      "args": ["-y", "@mzxrai/mcp-openai@latest"],
      "env": {
        "OPENAI_API_KEY": "your-api-key-here (get one from https://platform.openai.com/api-keys)"
      }
    }
  }
}

This config lets Claude Desktop fire up the OpenAI MCP server whenever you need it.

Usage

Just start chatting with Claude and when you want to use OpenAI's models, ask Claude to use them.

For example, you can say,

Can you ask o1 what it thinks about this problem?

or,

What does gpt-4o think about this?

The server currently supports these models:

  • gpt-4o (default)
  • gpt-4o-mini
  • o1-preview
  • o1-mini

Tools

  1. openai_chat
    • Sends messages to OpenAI's chat completion API
    • Arguments:
      • messages: Array of messages (required)
      • model: Which model to use (optional, defaults to gpt-4o)

Problems

This is alpha software, so may have bugs. If you have an issue, check Claude Desktop's MCP logs:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

Development

# Install dependencies
pnpm install

# Build the project
pnpm build

# Watch for changes
pnpm watch

# Run in development mode
pnpm dev

Requirements

  • Node.js >= 18
  • OpenAI API key

Verified Platforms

  • macOS
  • Linux

License

MIT

Author

mzxrai

mcp-openai FAQ

How do I install the MCP OpenAI server?
Install Node.js 18 or higher, download Claude Desktop, obtain an OpenAI API key, then configure the server in claude_desktop_config.json as per the documentation.
What OpenAI models does the MCP OpenAI server support?
It supports gpt-4o, gpt-4o-mini, o1-preview, and o1-mini models.
Can I use the MCP OpenAI server with other LLM providers?
While this server specifically integrates OpenAI models, MCP supports other providers like Anthropic's Claude and Google Gemini through different servers.
What are the prerequisites for running the MCP OpenAI server?
You need Node.js version 18 or higher, the Claude Desktop app installed, and a valid OpenAI API key.
How does the MCP OpenAI server handle errors?
It includes basic error handling to manage common API issues and ensure stable communication between Claude Desktop and OpenAI models.
Is the MCP OpenAI server compatible with Claude Desktop on all platforms?
Yes, as long as Claude Desktop and Node.js 18+ are installed, it works across supported operating systems.
How do I update the MCP OpenAI server to the latest version?
Use npm or npx commands to install the latest @mzxrai/mcp-openai package, as specified in the installation instructions.
Can I customize which OpenAI model the server uses?
Yes, you can specify the desired model in the configuration file to switch between supported OpenAI models.