Openai Compatible Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Openai Compatible Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that bridges to any OpenAI-compatible chat API — DeepSeek, OpenAI, Azure OpenAI, OpenRouter, Together, Groq, local llama.cpp, and friends.
Default provider: DeepSeek. Switch to any OpenAI-compatible endpoint with a single environment variable. Version: v0.2.21 — see CHANGELOG.md for recent fixes.
The package ships two ways to integrate with MCP-aware clients:
| Mode | When to use | Status |
|---|---|---|
| MCP server | Client launches python -m openai_compatible_mcp as a child | ✅ Stable, stdio |
| Direct API | Client calls your already-running openai-compatible-mcp proxy at http://127.0.0.1:7878/v1 | ✅ v0.2.21+, recommended for Codex CLI |
The wizard at <http://127.0.0.1:8989> auto-detects which mode your client needs and writes the right config.
pip install --upgrade openai-compatible-mcp
python -m openai_compatible_mcpA browser opens at <http://127.0.0.1:8989>.
The wizard writes the right config for:
~/.codex/config.toml (using direct API mode, no MCP sub-process)claude_desktop_config.json~/.cursor/mcp.json~/.claude.json…and does not overwrite any other servers you've configured.
codex # or restart Claude Desktop / CursorThat's it.
Heads up — Codex 0.140+: the wizard uses provider idopenai_compatible(notopenai_compatible_mcp) because codex reserves theopenaiprefix for built-ins. If you have an older config from a pre-v0.2.21 wizard, the next "Apply" will auto-migrate it.
Wizard writes this into ~/.codex/config.toml:
# written by openai-compatible-mcp v0.2.21 (utf-8, no BOM)
model = "deepseek-v4-pro"
model_provider = "openai_compatible"
[projects.'c:\users\you']
trust_level = "trusted"
[windows]
sandbox = "elevated"
[model_providers.openai_compatible]
name = "OpenAI Compatible"
base_url = "http://127.0.0.1:7878/v1"
api_key = "sk-..."Codex talks straight to the local proxy at http://127.0.0.1:7878/v1. No MCP sub-process, no 30-second startup timeout.
Wizard writes a [mcp_servers.X] block in your client config that launches python -m openai_compatible_mcp as a stdio child. The MCP server then opens its own HTTP listener for chat-completion calls.
{
"mcpServers": {
"openai-compatible": {
"command": "python",
"args": ["-m", "openai_compatible_mcp"],
"env": { "DEEPSEEK_API_KEY": "sk-..." }
}
}
}┌──────────────────┐ stdio JSON-RPC ┌─────────────────────┐
│ Claude Desktop │ ───────────────────────────▶│ │
│ Cursor / VSCode │ │ openai-compatible- │
│ Claude Code │ │ mcp │
└──────────────────┘ │ │
│ ┌─────────────┐ │
┌──────────────────┐ HTTP /v1/chat/... │ │ Proxy │ │
│ Codex CLI 0.140+ │ ───────────────────────────▶│ │ 127.0.0.1 │ │
│ (direct API) │ │ │ :7878 │ │
└──────────────────┘ │ └──────┬──────┘ │
│ │ │
┌──────────────────┐ http://127.0.0.1:8989 │ ▼ │
│ Your browser │ ───────────────────────────▶│ Upstream API │
│ (wizard UI) │ one-time setup │ (DeepSeek etc.) │
└──────────────────┘ └─────────────────────┘the local proxy (port 7878) in the same process.
set up auto-start (the wizard offers this).
git clone https://github.com/xiaobaotalks/openai-compatible-mcp.git
cd openai-compatible-mcp
pip install -e .
# Set your key
export DEEPSEEK_API_KEY="sk-..." # or OPENAI_COMPATIBLE_MCP_API_KEY
# Smoke test
PYTHONPATH=src python tests/smoke_test.py| Setting | Variables tried (in order) |
|---|---|
| API key | OPENAI_COMPATIBLE_MCP_API_KEY → DEEPSEEK_API_KEY → OPENAI_API_KEY |
| Base URL | OPENAI_COMPATIBLE_MCP_BASE_URL → DEEPSEEK_API_BASE → OPENAI_BASE_URL |
| Default model | OPENAI_COMPATIBLE_MCP_DEFAULT_MODEL → DEEPSEEK_DEFAULT_MODEL |
/v1/chat/completionsdeepseek-v4-flash → deepseek-v4-flash, r1 → deepseek-reasoner)chatSend a chat completion to the configured provider.
| Field | Type | Required | Description | |
|---|---|---|---|---|
messages | array | yes | List of {role, content} messages (oldest first). | |
model | string | no | Model name or alias (e.g. deepseek-v4-flash, o1-mini). | |
temperature | number | no | 0-2, lower = more deterministic. | |
max_tokens | integer | no | Maximum tokens to generate. | |
top_p | number | no | Nucleus sampling cutoff. | |
stop | string \ | array | no | Stop sequence(s). |
system | string | no | System prompt (prepended to the conversation). | |
include_reasoning | boolean | no | Wrap reasoning content in <think>...</think>. |
Example:
{
"method": "tools/call",
"params": {
"name": "chat",
"arguments": {
"messages": [
{"role": "user", "content": "Write a haiku about Python."}
],
"model": "deepseek-v4-flash",
"temperature": 0.7
}
}
}list_modelsReturns the default model and the alias table.
| Alias | Resolves to |
|---|---|
deepseek-v4-pro | deepseek-v4-pro |
deepseek-v4-flash | deepseek-v4-flash |
deepseek-v3 | deepseek-v4-pro |
deepseek-chat | deepseek-v4-pro |
deepseek-reasoner | deepseek-reasoner |
deepseek-r1 | deepseek-reasoner |
gpt-4o | gpt-4o |
gpt-4o-mini | gpt-4o-mini |
o1 | o1 |
o1-mini | o1-mini |
o3-mini | o3-mini |
Any name not in the table is passed through unchanged.
The wizard has gone through several bug fixes in the past week. If you have an older version, upgrading and re-applying the wizard is the fastest way out of most "Codex says invalid TOML" or "wizard won't start" problems.
| Version | Fix |
|---|---|
| 0.2.13 | Initial Codex support (writes ~/.codex/config.toml) |
| 0.2.14 | wire_api = "responses" (Codex 0.140+ deprecates "chat") |
| 0.2.15 | Strip child sections (e.g. [mcp_servers.X.env]) to avoid duplicate keys |
| 0.2.16 | Strip UTF-8 BOM (PowerShell Set-Content -Encoding UTF8 adds one) |
| 0.2.17 | Add written by openai-compatible-mcp vX.Y.Z marker + 3-layer BOM defense |
| 0.2.18 | Strip all Unicode invisible chars (ZWSP, ZWNBSP, LRM, …) — line 2 of user's config had a ZWNBSP that broke TOML |
| 0.2.19 | Add import re (typo in v0.2.18 broke wizard on startup) + port fallback |
| 0.2.20 | Robust relative import (top-level script mode) |
| 0.2.21 | Rename provider `openai_compatible_mcp` → `openai_compatible` (Codex reserved `openai` prefix) + stop writing `[mcp_servers.X]` by default + new `_strip_any_section` to clear any leftover blocks |
See CHANGELOG.md for the full history.
python -m venv .venv
.venv\Scripts\activate # Windows
source .venv/bin/activate # macOS / Linux
pip install -e ".[dev]"
PYTHONPATH=src python tests/smoke_test.pyMIT — see LICENSE.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.