Openai MCP Server

Query OpenAI models directly from Claude using MCP protocol.

Local serverstdioPython

What is the Openai MCP server?

If you want an AI assistant working directly with Openai, the openai mcp server is the bridge. Query OpenAI models directly from Claude using MCP protocol.

What Openai does

Query OpenAI models directly from Claude using MCP protocol.

Installing the openai mcp server

Setup follows the standard MCP pattern: clone or install the server, then register it in your client's configuration file and restart the client. The configuration snippets on this page cover Claude Desktop, Claude Code and Cursor.

Configuration

Before the server will start you need to supply 2 environment variables: PYTHONPATH, OPENAI_API_KEY. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

AI-service servers chain other models into your assistant, turning a single chat into a small production pipeline. Openai sits in that group. Worth comparing against the other ai services servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by pierrebrunelle, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the openai mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

How to install the Openai MCP server

{
  "mcpServers": {
    "openai-server": {
      "command": "python",
      "args": ["-m", "src.mcp_server_openai.server"],
      "env": {
        "PYTHONPATH": "C:/path/to/your/mcp-server-openai",
        "OPENAI_API_KEY": "your-key-here"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
PYTHONPATHFilesystem location the server is allowed to use.Optional
OPENAI_API_KEYCredential the server authenticates with.Yes

Frequently asked questions

It connects Openai to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Openai directly.