# mzxrai/mcp-openai [Health: Active]

**Category:** 🛠️ Other Tools and Integrations  
**Repository:** https://github.com/mzxrai/mcp-openai  
**GitHub Stars:** 76  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mzxrai-mcp-openai

## Description
Chat with OpenAI models from Claude Desktop

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-openai": {
    "command": "npx",
    "args": ["-y","@mzxrai/mcp-openai@latest"],
    "env": {
      "OPENAI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `OPENAI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mzxrai/mcp-openai MCP server does

The mzxrai/mcp-openai MCP server connects Claude Desktop to OpenAI chat completion models. It gives Claude a single MCP tool for forwarding a conversation to OpenAI and receiving the model's response. The supported model list includes `gpt-4o`, `gpt-4o-mini`, `o1-preview`, and `o1-mini`; `gpt-4o` is used when no model is supplied.

This fits workflows where Claude should ask another OpenAI model for an opinion, comparison, or draft. For example, a user can ask Claude to send a problem to `o1` or ask what `gpt-4o` thinks about a topic. The README describes the interface as simple message passing rather than a broader set of OpenAI operations.

## How it works

Claude Desktop starts the server as a local Node.js process using `npx`. The server reads the OpenAI credential from the `OPENAI_API_KEY` environment variable. When Claude selects the MCP tool, the server passes the supplied messages to OpenAI's chat completion API and returns the result.

The tool accepts a required `messages` array and an optional `model` argument. The model value selects one of the supported OpenAI models. Basic error handling is included, but the project is identified as alpha software, so applications should account for possible bugs.

## Setup and configuration

Install Node.js 18 or newer, Claude Desktop, and an OpenAI API key. Add an `mcp-openai` entry to Claude Desktop's `claude_desktop_config.json`. On macOS, the README places this file under `~/Library/Application Support/Claude/`.

The configuration runs `npx -y @mzxrai/mcp-openai@latest` and supplies the key through `OPENAI_API_KEY`. After restarting or reloading Claude Desktop as needed, ask Claude to use an OpenAI model. The project specifically verifies macOS; Linux is not marked as verified in the supplied material.

The mzxrai/mcp-openai MCP server also includes development commands for installing dependencies with pnpm, building, watching for changes, and running in development mode. Those commands are for contributors rather than normal Claude Desktop installation.

## Tools and capabilities

- `openai_chat`: sends messages to OpenAI's chat completion API.
- `messages`: required array of conversation messages.
- `model`: optional model selector, defaulting to `gpt-4o`.
- Supported models: `gpt-4o`, `gpt-4o-mini`, `o1-preview`, and `o1-mini`.

## Limitations and notes

An OpenAI API key is required, so OpenAI usage is billed according to the user's OpenAI account and selected model; the supplied material does not describe any separate server pricing. The README provides no tools for image generation, embeddings, file handling, or other OpenAI APIs. It documents Claude Desktop as the client and macOS as the verified platform.

For troubleshooting, inspect Claude Desktop's MCP logs. The README gives a macOS log command using `tail` and a wildcard under `~/Library/Logs/Claude/`. The project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/mzxrai-mcp-openai/readme_

