OpenAI MCP Server

OpenAI MCP Server

openai-mcp-server-akiojin•byakiojin

A Model Context Protocol server that lets AI assistants call OpenAI's ChatGPT API for chat completion, model listing, and image generation.

License: MIT License•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Provides a chat_completion tool that generates text using ChatGPT models with configurable model, messages, temperature, max tokens, and reasoning effort.
  • •Provides a list_models tool that lists all available OpenAI models.
  • •Provides a generate_image tool using the gpt-image-1 model that saves generated images to temporary files and returns file paths.
  • •Allows choosing among OpenAI models such as GPT-4.1, o1, and o3 for different purposes.

BEST FOR

  • •Validating Claude Code output by having ChatGPT check results.
  • •Generating images via ChatGPT's gpt-image-1 model when the assistant cannot generate images directly.
  • •Using different OpenAI models suited to different tasks.

ABOUT OPENAI-MCP-SERVER-AKIOJIN

OpenAI MCP Server is cataloged as an MCP server attributed to akiojin. A Model Context Protocol server that lets AI assistants call OpenAI's ChatGPT API for chat completion, model listing, and image generation. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for OpenAI MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How are generated images returned?

Generated images are saved as temporary files, and the response includes file paths instead of base64 data to minimize token usage.

Does the chat_completion tool support reasoning effort settings?

Yes, reasoning_effort is a GPT-5 only parameter controlling reasoning depth from minimal to high.

上游原版 README

在 GitHub 查看同一版本原文

README.md · ed5c48f592f3 · 采集于 2026-11-13 13:50:06 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

OpenAI MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with OpenAI's ChatGPT API.

Features

  • Chat Completion: Generate text using OpenAI's latest language models (GPT-4.1, GPT-4.1-mini, GPT-4.1-nano, GPT-4o, o1, o1-pro, o3, o4-mini)
  • List Models: Retrieve available OpenAI models
  • Configurable Parameters: Control temperature, max tokens, and other generation settings

Prerequisites

  • Node.js 18 or higher
  • OpenAI API key

Installation

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

# Install dependencies
npm install

# Build the project
npm run build

Configuration

  1. Create a .env file in the project root:
cp .env.example .env
  1. Add your OpenAI API key to the .env file:
OPENAI_API_KEY=your_api_key_here

Usage

使用例

このMCPサーバーは、Claude CodeなどのAIアシスタントから呼び出して使用することを想定しています:

  • 出力結果の検証: Claude Codeの出力結果をChatGPTに検証させることができます
  • 画像生成: Claude Codeでは直接画像生成ができませんが、このMCPサーバー経由でChatGPTのgpt-image-1モデルを使用した画像生成が可能です
  • 異なるモデルの活用: 用途に応じて様々なOpenAIモデル(GPT-4.1、o1、o3など)を使い分けることができます

As an MCP Server

Add the server to your MCP client configuration:

{
  "servers": {
    "openai": {
      "command": "node",
      "args": ["path/to/openai-mcp-server/dist/index.js"]
    }
  }
}

Available Tools

chat_completion

Generate text using ChatGPT.

Parameters:

  • model (string, optional): Model to use (default: "gpt-4.1")
  • messages (array, required): Chat history with role and content
  • temperature (number, optional): Sampling temperature 0-2 (default: 0.7)
    • Note: GPT-5 models only support temperature=1
  • max_tokens (number, optional): Maximum tokens to generate
    • For GPT-4 models: defaults to 1000
    • For GPT-5 models: optional - if not specified, model automatically allocates necessary tokens
  • reasoning_effort (string, optional): GPT-5 only - Controls reasoning depth
    • minimal: Fast responses, no reasoning tokens
    • low: Light reasoning
    • medium: Standard reasoning (default)
    • high: Deep reasoning for complex analysis
  • verbosity (string, optional): GPT-5 only - Response length (low/medium/high)

list_models

List all available OpenAI models.

generate_image

Generate images using gpt-image-1 model. Returns file paths for generated images saved in temporary directory.

Parameters:

  • prompt (string, required): Text description of the desired image(s). Maximum 1000 characters.
  • model (string, optional): Model to use (default: "gpt-image-1")
  • n (number, optional): Number of images to generate 1-10 (default: 1)
  • size (string, optional): Size of images - "1024x1024", "1024x1536", "1536x1024", or "auto" (default: "1024x1024")
  • quality (string, optional): Quality - "low", "medium", "high", or "auto" (default: "auto")
  • background (string, optional): Background type - "opaque" or "transparent" (default: "opaque")

Note: Generated images are saved as temporary files to minimize token usage. The response includes file paths instead of base64 data.

Example:

{
  "prompt": "A beautiful sunset over mountains",
  "size": "1024x1024",
  "quality": "high",
  "background": "opaque"
}

Development

# Run in development mode with hot reload
npm run dev

# Build for production
npm run build

# Watch mode for development
npm run watch

Project Structure

openai-mcp-server/
├── src/
│   └── index.ts       # Main server implementation
├── dist/              # Compiled JavaScript (generated)
├── .env               # Environment variables (create from .env.example)
├── .env.example       # Example environment configuration
├── package.json       # Project dependencies and scripts
├── tsconfig.json      # TypeScript configuration
└── README.md          # This file

License

MIT License - see LICENSE file for details

Release Process

This project uses semantic-release for automated versioning and publishing.

Commit Message Format

Follow Conventional Commits format:

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Commit Types

  • feat: new feature (minor version bump)
  • fix: bug fix (patch version bump)
  • BREAKING CHANGE: breaking change (major version bump)
  • docs: documentation changes (patch version bump)
  • style: formatting changes (patch version bump)
  • refactor: code refactoring (patch version bump)
  • test: adding tests (patch version bump)
  • chore: maintenance tasks (patch version bump)

Examples

# New feature (0.1.0 → 0.2.0)
feat: add streaming support for chat completion

# Bug fix (0.1.0 → 0.1.1)
fix: handle connection timeout properly

# Breaking change (0.1.0 → 1.0.0)
feat: redesign API interface

BREAKING CHANGE: The chat_completion tool now requires a different parameter structure

Helper Scripts

# Interactive commit with commitizen
npm run commit

# Test release without publishing
npm run release:dry-run

# Manual release (usually handled by CI)
npm run release

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Follow conventional commit format for your commits
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

For issues and feature requests, please use the GitHub issue tracker.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for OpenAI MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/openai-mcp-server-akiojin)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent