Gpt Chat

io.github.codeChapPublished by GitHub account codeChapv0.1.0Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyMedia & DesignAI & ML

Overview

AI-generated overview

A local MCP server that connects an assistant to the OpenAI ChatGPT API for chat completions, image analysis, embeddings and model listing.

What you can do
Send chat completion requests with optional multi-turn history, system prompt, temperature, token limit and JSON-schema structured output, with model selection (default gpt-4o). Analyse an image from an http or https URL with a text prompt and a low or high detail level. Generate text embeddings for a string or array of strings. List available OpenAI models and their IDs.
When to use it
Useful when you want an assistant to call OpenAI models directly from a local setup: drafting or continuing conversations, describing or analysing images by URL, producing embeddings for search or clustering, or checking which models are available.
Requirements
Runs as a local process over stdio. Requires a Rust toolchain to build the binary and an OpenAI API key from platform.openai.com, placed in a config file at ~/.config/mcp-server-gpt-chat/config.toml. Network access to the OpenAI API is needed. The binary path is registered in the MCP client configuration.
Before you install
The OpenAI API key is stored in plain text in the config file, so protect that file. Requests send prompts, conversation history and image URLs to OpenAI, and API usage is billed to your OpenAI account. The server only reads from OpenAI; it does not write or delete data on your machine.

Installation

In SourceWeft

  1. Open Gpt Chat in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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 buildcargo run                # run in dev modeRUST_LOG=debug cargo run # run with debug logging

MCP Configuration

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

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

Project Structure

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

Source: README.md at commit 1e8a772

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.