gpt-chat MCP server
Commit Oct 14, 2026Enables AI clients to interact with OpenAI's API for chat completions, vision analysis, text embeddings, and model discovery.
Also known as codeChap/mcp-server-gpt-chat, mcp-server-gpt-chat
- Stars
- 0
- Tools
- 14
- Downloads, 30 days
- —
- Latest version
- 0.1.0
- Last commit
- Oct 14, 2026
- License
- —
What is gpt-chat MCP?
gpt-chat enables AI clients to interact with OpenAI's API for chat completions, vision analysis, text embeddings, and model discovery. It exposes 14 tools, such as chat, chat_with_vision, embedding.
Summary generated from the project's README
About gpt-chat MCP server
Connecting AI clients to OpenAI capabilities allows developers to extend their local environments with advanced language and vision processing. This Rust-based server uses stdio to provide tools for chat completions, image analysis, and text embeddings directly through the Model Context Protocol. Users must provide an OpenAI API key in a local config.toml file to authenticate requests.
Developers can use the chat tool to manage multi-turn conversations, set system prompts, or enforce structured outputs using JSON schema. The vision tool processes images via URLs with adjustable detail levels, while the embedding tool generates vector representations of text. You can also use the list_models tool to discover available model IDs like gpt-4o. This setup works by adding the compiled binary to your Claude Desktop configuration.
What you can do with it
- 1Generate structured dataAsk the AI to return information following a specific JSON schema.
- 2Analyze visual contentProvide an image URL and a prompt to have the model describe or interpret the picture.
- 3Create text embeddingsConvert strings or arrays of strings into vector embeddings for semantic search.
- 4Discover available modelsRetrieve a list of all OpenAI model IDs to use in your requests.
Written from the project's README. Every use case is checked against a quote from it.
gpt-chat MCP tools 14
Detected from the READMEchatchat_with_visionembeddinglist_modelspromptmodelsystem_promptmessagestemperaturemax_tokensresponse_schemaimage_url
| chat | — | |
| chat_with_vision | — | |
| embedding | — | |
| list_models | — | |
| prompt | — | |
| model | — | |
| system_prompt | — | |
| messages | — | |
| temperature | — | |
| max_tokens | — | |
| response_schema | — | |
| image_url | — |
Show all 14 toolsShow fewer tools
detailinput
| detail | — | |
| input | — |
Configuration
RUST_LOG
| Name | Description | |
|---|---|---|
| RUST_LOG | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablecodechap/mcp-server-gpt-chat is public and reachablegithub.com/codechap/mcp-server-gpt-chat ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-10-14github.com/codechap/mcp-server-gpt-chat ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model14 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubmcp-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
| Tool | Description |
|---|---|
chat |
Send a chat completion request to ChatGPT with optional multi-turn history, system prompt, structured output (JSON schema), and model selection |
chat_with_vision |
Analyse an image with ChatGPT's vision capabilities given an image URL and text prompt |
embedding |
Generate text embeddings using OpenAI's embedding model |
list_models |
List 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:
| Name | Type | Required | Description |
|---|---|---|---|
prompt |
string | yes | The user message to send |
model |
string | no | Model to use (default: gpt-4o) |
system_prompt |
string | no | System prompt to set context |
messages |
string | no | Full conversation history as JSON array of {role, content} objects |
temperature |
float | no | Sampling temperature (0.0 - 2.0) |
max_tokens |
integer | no | Maximum tokens to generate |
response_schema |
string | no | JSON schema string to enforce structured output |
chat_with_vision
Analyse an image using ChatGPT's vision capabilities.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
prompt |
string | yes | Text prompt describing what to analyse |
image_url |
string | yes | URL of the image (must be http:// or https://) |
model |
string | no | Model to use (default: gpt-4o) |
detail |
string | no | Image detail level: low or high (default: high) |
temperature |
float | no | Sampling temperature (0.0 - 2.0) |
max_tokens |
integer | no | Maximum tokens to generate |
embedding
Generate text embeddings.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
input |
string | yes | Text to embed as JSON: a single string or array of strings |
model |
string | no | Embedding model to use (default: text-embedding-3-small) |
list_models
List all available OpenAI models. No parameters.
Prerequisites
- Rust (edition 2024)
- An OpenAI API key from platform.openai.com
Setup
Create the config file:
mkdir -p ~/.config/mcp-server-gpt-chat
Create ~/.config/mcp-server-gpt-chat/config.toml:
api_key = "sk-..."
Build
cargo build --release
This produces target/release/gpt-chat.
For development:
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):
{
"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
gpt-chat MCP questions
What tools does gpt-chat MCP provide?
It exposes 14 tools, including chat, chat_with_vision, embedding, list_models, prompt.
What tools does this server provide?
The server provides tools for chat completions, vision analysis, generating text embeddings, and listing available OpenAI models.
How do I configure my OpenAI API key?
You need to create a config.toml file in ~/.config/mcp-server-gpt-chat/ and add your API key there.
Can I use structured output with the chat tool?
Yes, the chat tool supports enforcing structured output using a JSON schema string.