MCP OpenAI Server is an MCP server that connects Claude Desktop and other Model Context Protocol clients directly to the OpenAI API. Built for developers, technical writers, and AI researchers, it enables users to invoke OpenAI chat and reasoning models directly within their primary conversational interface. Through a unified tool call, users can route queries to specific models without switching browser tabs or managing separate applications. The server exposes the openai_chat tool, which accepts an array of messages and an optional model parameter. Supported targets include gpt-4o as the standard default, the lightweight gpt-4o-mini, and advanced reasoning options such as o1-preview and o1-mini. By handling API requests and message formatting locally using Node.js, the integration provides a straightforward bridge for comparing model responses, offloading complex logic problems to specialized reasoning engines, and accessing OpenAI completions while working inside Claude.
Category: AI & LLM Tooling
Tags: chat-completions, gpt, llm, openai
Follow these steps to configure MCP OpenAI Server in Claude Desktop: 1. Ensure you have Node.js 18 or higher installed on your system. 2. Obtain an API key from the OpenAI platform. 3. Open your Claude Desktop configuration file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS). 4. Add the server under the mcpServers object: json { "mcpServers": { "mcp-openai": { "command": "npx", "args": ["-y", "@mzxrai/mcp-openai@latest"], "env": { "OPENAI_API_KEY": "your-api-key-here" } } } } 5. Save the file and restart Claude Desktop.
Part of MCP Servers
You can install and run the server by configuring Claude Desktop to execute npx with @mzxrai/mcp-openai@latest. Add the server entry into your claude_desktop_config.json configuration file alongside your OPENAI_API_KEY environment variable. Node.js version 18 or higher is required.
The server supports multiple OpenAI chat and reasoning models. These include gpt-4o, which acts as the default model, along with gpt-4o-mini, o1-preview, and o1-mini. You can specify the desired model argument when invoking the tool.
The server provides the openai_chat tool. It sends message arrays to OpenAI's chat completion API and accepts two arguments: a required messages array and an optional model parameter to designate which model should process the request.
Yes, MCP OpenAI Server is open source and available under the MIT license. You can view the code, report issues, and follow development updates on GitHub at https://github.com/gto1seoul/openai-mcp.