Gpt Chat

io.github.codeChap由 GitHub 帳號 codeChap 發布v0.1.0更新於 Oct 24, 2026

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

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

一個本機 MCP 伺服器,將助理連接到 OpenAI ChatGPT API,用於對話補全、影像分析、嵌入與模型清單。

可以做什麼
送出對話補全請求,可附帶多輪歷史、系統提示、溫度、token 上限與 JSON Schema 結構化輸出,並可選擇模型(預設 gpt-4o)。依 http 或 https 圖片網址與文字提示分析影像,可選擇低或高細節層級。為單一字串或字串陣列產生文字嵌入。列出可用的 OpenAI 模型及其 ID。
適用情境
適合希望助理在本機環境直接呼叫 OpenAI 模型的情境:起草或延續對話、依網址描述或分析影像、為搜尋或分群產生嵌入,或查看有哪些可用模型。
執行需求
以 stdio 方式作為本機程序執行。需要 Rust 工具鏈來建置執行檔,以及來自 platform.openai.com 的 OpenAI API 金鑰,放在 ~/.config/mcp-server-gpt-chat/config.toml 設定檔中。需要連線至 OpenAI API 的網路,並在 MCP 用戶端設定中登錄執行檔路徑。
安裝前請注意
OpenAI API 金鑰以明文保存在設定檔中,請妥善保護該檔案。請求會將提示、對話歷史與圖片網址傳送給 OpenAI,API 用量會計入你的 OpenAI 帳戶費用。此伺服器只從 OpenAI 讀取,不會寫入或刪除本機資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Gpt Chat,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

來源:README.md,提交 1e8a772

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。