Skip to content
SKILLS
MCP ServerPublisher identity verifiedNo findings from static checks

@spboucher/openai-api-mcpv1.0.0

MCP server for building with the OpenAI API: probe-verified model reference, request linter for Responses and Chat Completions, cost estimates, scaffolding, plus live responses, embeddings, batches, files, vector stores, speech and images.

  • downloadable
  • installable
  • executable

openai-api-mcp

An MCP server for building with the OpenAI API. It gives an agent two things:

  1. Knowledge that was measured, not remembered. OpenAI parameter rules differ per model and per API: reasoning effort levels vary, temperature is accepted only in specific conditions, several models are not served on Chat Completions. This server ships a knowledge base built by sending 55 request shapes to each of 29 text models and recording what the API accepted. A linter turns that into findings and fixes before a request is sent.
  2. Hands on the API. Responses, token counting, structured extraction, embeddings, moderation, batches, files, vector stores, speech and images — with a spend guard, lint-before-send, confirmation on destructive calls and file access confined to one directory.

Not affiliated with OpenAI. "OpenAI" and "GPT" are trademarks of OpenAI.

Install

Requires Node.js 20 or newer.

skills download @spboucher/openai-api-mcp --extract ./openai-api-mcp   # or download the archive and verify its SHA-256
cd openai-api-mcp
npm ci --omit=dev   # installs openai, @modelcontextprotocol/sdk and zod from the lockfile
npm test            # offline tests, no key needed

Register it (use the absolute path of server.mjs):

# Claude Code
claude mcp add --transport stdio --env OPENAI_API_KEY=$OPENAI_API_KEY openai-api -- node /abs/path/openai-api-mcp/server.mjs
# Codex: ~/.codex/config.toml
[mcp_servers.openai-api]
command = "node"
args = ["/abs/path/openai-api-mcp/server.mjs"]
env_vars = ["OPENAI_API_KEY"]
// Cursor: .cursor/mcp.json
{ "mcpServers": { "openai-api": { "type": "stdio", "command": "node", "args": ["/abs/path/openai-api-mcp/server.mjs"], "env": { "OPENAI_API_KEY": "${env:OPENAI_API_KEY}" } } } }

The key is optional: the eleven offline tools work without it.

VariablePurposeDefault
OPENAI_API_KEYKey for the live tools. Read from the environment, never returned in any outputnone
OPENAI_API_MCP_MAX_OUTPUT_TOKENSSpend guard: largest output cap the server will send32000
OPENAI_API_MCP_FILE_ROOTOnly directory the file, speech and image tools may read or writeworking directory

Tools

Offline (no key, no cost)

ToolWhat it does
model_referenceContext window, output cap, prices, reasoning effort levels, when temperature is accepted, Chat Completions support, hosted tools
recommend_modelModel and reasoning effort for a task, honouring hard requirements
lint_requestFindings for a Responses or Chat Completions request, each with a fix and the API error text observed
fix_requestApplies the mechanical fixes and reports what changed
chat_to_responsesConverts a Chat Completions request to the Responses API
migrate_requestRewrites a request for another model (converting the API when the target is Responses-only)
estimate_cost, compare_costsCost with cached input, batch, fast mode and long-context rates
scaffold_appRunnable starters: single call, streaming, structured output, function loop, conversation state, web search, Agents SDK, embeddings, batch — TypeScript or Python
explain_errorMaps a status, code or message to a cause and a fix
feature_guideShort guidance on 15 topics

Live

ToolNotes
list_models, count_tokens, moderateFree
create_responseBilled. Linted first; nothing is sent if the API would reject it. auto_fix applies fixes. Sends Chat Completions when the body has messages
extract_structuredBilled. Returns parsed JSON matching your schema (made strict automatically)
get_response, cancel_response, delete_responseStored and background responses
create_embeddingsReturns dimensions, usage and a similarity matrix; vectors only on request
batch_create, batch_get, batch_list, batch_results, batch_cancelBuilds and uploads the JSONL for you
file_upload, file_list, file_get, file_deleteUploads confined to the file root
vector_store_create, vector_store_add, vector_store_search, vector_store_list, vector_store_deleteRetrieval; stores expire after 7 days by default
text_to_speech, transcribe_audio, generate_imageBilled. Read and write only inside the file root; never overwrite

Destructive tools refuse to act without confirm: true.

What "verified" means here

  • probes/probe.mjs sends small requests to every probed model. Raw results: probes/matrix.json. probes/build-knowledge.mjs derives knowledge.json from them, from the official pricing page and from the official model pages (probes/model-pages.json).
  • test/offline.test.mjs asserts that the linter predicts accept/reject exactly as the API did for all 1,594 recorded outcomes, that the fixer yields acceptable requests, and that the chat→responses converter yields valid requests for every chat probe.
  • test/run-scaffolds.mjs executes every scaffold template against the API in both languages.
  • test/live.test.mjs drives the server through the MCP protocol with the official client: responses, function calling, stored state, vision, structured extraction, web search, embeddings, moderation, files, vector-store retrieval, speech round trip, image generation, batches.

Refresh the knowledge base yourself: OPENAI_API_KEY=… npm run probe, then npm test. Probing every model, including the -pro models, costs a few dollars.

Limits — read these

  • A snapshot. Behaviour was observed on 2026-11-10 (UTC). APIs change; model_reference reports the observation date. Re-run the probes when in doubt.
  • Only text models visible to the probing key. Audio, image, realtime, embedding and moderation models are listed by list_models but not rule-probed. Dated snapshots are assumed to behave like their alias.
  • Batch results were not verified end to end on a multi-request batch. Batches submitted while testing stayed in_progress for over half an hour. Creating, polling, listing and cancelling were verified; batch_results parsing was checked against the documented output format only.
  • Not probed: computer use, the Realtime API, fine-tuning, the Assistants API, Azure OpenAI.
  • Two models have no official price (gpt-5.3-codex, chat-latest): cost tools return an error for them rather than a guess.
  • Cost figures are estimates from list prices; hosted-tool, image and audio charges are not included. Check response.usage and your invoice.
  • recommend_model is a heuristic. Evaluate on your own data.
  • Model output, transcripts and retrieved text returned by tools are untrusted data.

Security

The server reads the key from its environment and scrubs key-, organisation- and project-shaped strings from error messages. It executes no model output and opens no listening port. Local file access is limited to OPENAI_API_MCP_FILE_ROOT: reads for uploads and transcription, writes for speech and images, never overwriting an existing file.

Install

  1. 1Register the local server

    claude mcp add --transport stdio --env OPENAI_API_KEY=<value> --env OPENAI_API_MCP_MAX_OUTPUT_TOKENS=<value> --env OPENAI_API_MCP_FILE_ROOT=<value> openai-api-mcp -- node server.mjs
  2. 2Set the required environment variables locally

    OPENAI_API_KEY, OPENAI_API_MCP_MAX_OUTPUT_TOKENS, OPENAI_API_MCP_FILE_ROOT — configured on your machine only; never sent to the registry.

  3. 3Optional: download the listing's source archive for review

    skills download @spboucher/openai-api-mcp@1.0.0
.mcp.json (project scope)
{
  "mcpServers": {
    "openai-api-mcp": {
      "command": "node",
      "args": [
        "server.mjs"
      ],
      "env": {
        "OPENAI_API_KEY": "${OPENAI_API_KEY}",
        "OPENAI_API_MCP_MAX_OUTPUT_TOKENS": "${OPENAI_API_MCP_MAX_OUTPUT_TOKENS}",
        "OPENAI_API_MCP_FILE_ROOT": "${OPENAI_API_MCP_FILE_ROOT}"
      }
    }
  }
}

Environment variables (set locally, never sent to the registry)

  • OPENAI_API_KEY · optional · secret — OpenAI API key. Needed only by the live tools; offline tools work without it.
  • OPENAI_API_MCP_MAX_OUTPUT_TOKENS · optional — Spend guard: largest output cap the server will send (default 32000).
  • OPENAI_API_MCP_FILE_ROOT · optional — Only directory the file, speech and image tools may read from or write to (default: working directory).
  • Declared permissions: network, env, filesystem:read, filesystem:write, shell.
  • This server runs locally on your machine with your user's privileges. Review the source before running it; the registry does not execute or host it.

Installing only copies or configures. Nothing is executed for you. The Skills CLI verifies the checksum before writing files.

Files

21 files · 740 kB unpacked

Select a file to preview it. Files are shown as plain text and never executed.

Security & permissions

Declared permissions

  • network
  • env
  • filesystem:read
  • filesystem:write
  • shell

Static checks

  • lowscript appears to make network requestsprobes/build-knowledge.mjs
  • lowscript spawns other processestest/run-scaffolds.mjs

Static checks are advisory. They never certify that a package is safe. Compatibility entries are publisher claims unless marked verified.

Compatibility

  • claude-code · claimed
  • codex · claimed
  • cursor · claimed
  • generic-mcp · claimed

Versions

1 release · immutable
VersionPublishedSizeSHA-256State
1.0.0latestNov 10, 202683 kB573fc176c811…published

Publication history

  1. release.publish@spboucher/openai-api-mcp@1.0.0by Simon-Pierre Boucher
  2. artifact.create@spboucher/openai-api-mcpby Simon-Pierre Boucher
  • MCP ServerVerified publisher

    @spboucher/safari-mcp

    MCP server that drives Safari on macOS through AppleScript: navigation, reading, forms, uploads, downloads with the page's session, screenshots. Works in its own window, with domain policy and sensitive-field guards.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    2 h ago
  • MCP ServerVerified publisher

    @spboucher/claude-api-mcp

    MCP server for building with the Claude API: probe-verified model reference, request linter and fixer, cost estimates, agent scaffolding, plus live messages, token counting, batches, files and Managed Agents.

    Latest version
    v1.0.1
    Licence
    MIT
    Updated
    3 h ago
  • MCP ServerVerified publisher

    @spboucher/echo-mcp-server

    Dependency-free local MCP server over stdio with a single echo tool, for testing client configuration.

    Latest version
    v1.0.0
    Licence
    MIT
    Updated
    5 h ago

↑↓ to navigate · enter to open · esc to close