Gpt Chat logo

Gpt Chat

MCP server for the OpenAI ChatGPT API — chat, vision, and embeddings

Install Gpt Chat

Run the project’s own setup commands, in order.

Setup steps from the project

gpt-chat installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Configure
    mkdir -p ~/.config/mcp-server-gpt-chat
    
  2. 2. Install
    cargo build --release
    
  3. 3. Install
    cargo build              # debug build
    
  4. 4. Start the server
    cargo run                # run in dev mode
    
  5. 5. Start the server
    RUST_LOG=debug cargo run # run with debug logging
    

Overview

Tools14

What Gpt Chat lets your agent do. Expand a tool for its parameters.

Self-reported~218 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 74d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit1mo agoMost recent push to the default branch.
Tools exposed14Callable tools this server registers over MCP.
Directory activity10 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

mcp-server-gpt-chat

An MCP (Model Context Protocol) server for the OpenAI ChatGPT API. Built in Rust, exposes chat completions, vision, embeddings, and model listing as MCP tools.

Communicates via stdio using JSON-RPC 2.0, like all MCP servers.

Tools

ToolDescription
chatSend a chat completion request to ChatGPT with optional multi-turn history, system prompt, structured output (JSON schema), and model selection
chat_with_visionAnalyse an image with ChatGPT's vision capabilities given an image URL and text prompt
embeddingGenerate text embeddings using OpenAI's embedding model
list_modelsList all available OpenAI models and their IDs

chat

Send a chat completion request. Supports multi-turn conversations via a JSON message history array, system prompts, structured output via JSON schema, temperature control, and model selection.

Parameters:

NameTypeRequiredDescription
promptstringyesThe user message to send
modelstringnoModel to use (default: gpt-4o)
system_promptstringnoSystem prompt to set context
messagesstringnoFull conversation history as JSON array of {role, content} objects
temperaturefloatnoSampling temperature (0.0 - 2.0)
max_tokensintegernoMaximum tokens to generate
response_schemastringnoJSON schema string to enforce structured output

chat_with_vision

Analyse an image using ChatGPT's vision capabilities.

Parameters:

NameTypeRequiredDescription
promptstringyesText prompt describing what to analyse
image_urlstringyesURL of the image (must be http:// or https://)
modelstringnoModel to use (default: gpt-4o)
detailstringnoImage detail level: low or high (default: high)
temperaturefloatnoSampling temperature (0.0 - 2.0)
max_tokensintegernoMaximum tokens to generate

embedding

Generate text embeddings.

Parameters:

NameTypeRequiredDescription
inputstringyesText to embed as JSON: a single string or array of strings
modelstringnoEmbedding model to use (default: text-embedding-3-small)

list_models

List all available OpenAI models. No parameters.

Prerequisites

Setup

Create the config file:

bash
mkdir -p ~/.config/mcp-server-gpt-chat

Create ~/.config/mcp-server-gpt-chat/config.toml:

toml
api_key = "sk-..."

Build

bash
cargo build --release

This produces target/release/gpt-chat.

For development:

bash
cargo build              # debug build
cargo run                # run in dev mode
RUST_LOG=debug cargo run # run with debug logging

MCP Configuration

Add to your Claude Desktop config (~/.config/Claude/claude_desktop_config.json):

config.json
{
  "mcpServers": {
    "gpt-chat": {
      "command": "/path/to/gpt-chat"
    }
  }
}

Project Structure

Code
src/
  main.rs    - entry point, config loading, stdio transport setup
  server.rs  - MCP tool definitions (chat, chat_with_vision, embedding, list_models)
  api.rs     - OpenAI HTTP client, request/response types, response formatters
  params.rs  - tool parameter types with serde and JSON Schema derives
  config.rs  - TOML config loading

License

MIT

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Gpt Chat

gpt-chat is an MCP server that connects MCP-compatible clients to the OpenAI ChatGPT API. Built in Rust, it communicates over stdio using JSON-RPC 2.0 and provides tools for chat completions, image analysis, text embeddings, and listing available OpenAI models. It requires an OpenAI API key.

gpt-chat provides four MCP tools: chat for conversational completions, chat_with_vision for analyzing images from HTTP or HTTPS URLs, embedding for generating text embeddings, and list_models for retrieving available OpenAI models and their IDs.

Configure the API key in ~/.config/mcp-server-gpt-chat/config.toml using the api_key = "sk-..." setting. The server requires an OpenAI API key, and the configuration directory must be created before adding the TOML file.

The chat tool requires a prompt and optionally supports model selection, a system prompt, multi-turn messages supplied as a JSON array, temperature, maximum output tokens, and structured responses enforced with a JSON schema. The default model is gpt-4o.

Add gpt-chat to the client configuration with its executable path as the command, such as "command": "/path/to/gpt-chat" in the MCP server entry. Build the project with cargo build --release first; the executable is produced at target/release/gpt-chat.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGpt Chat AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gpt-chat?style=directory)](https://allmcps.com/mcp/gpt-chat)
HTML Embed
<a href="https://allmcps.com/mcp/gpt-chat"><img src="https://allmcps.com/api/badge/gpt-chat?style=directory" alt="Gpt Chat on AllMCPs" /></a>