Vibe Gate Mcp

io.github.mustafacagriv0.1.12更新於 Oct 7, 2026

Adversarial Quality Gate MCP for vibe-coding: IDE AI vs Critic AI, human decides on deadlock

已驗證STDIO僅桌面Developer ToolsAI & ML

概覽

AI 產生的概覽

讓 IDE 代理提交的程式碼變更由第二個 LLM 進行對抗式審查,僅在僵局時由人工裁決。

功能
Vibe-Gate 是針對 AI 輔助編碼的對抗式品質閘門。IDE 代理提交階段報告與變更的原始碼路徑,由 Critic LLM 審查程式碼並回傳結論與關注點。只有雙方陷入僵局時才需要人工介入。審查可設為唯讀,因此不會更動工作區與審查狀態。
適用情境
當你希望在採納 AI 編碼代理的產出之前,由另一個獨立模型提出質疑時使用。適合已在 AI IDE 中工作、希望在審查環節加入人工仲裁而非只信任單一代理的團隊。
執行需求
透過 npx 以 stdio 在本機執行(需要 Node.js)。需要 Critic 提供者:直接使用 API 金鑰,例如 OPENAI_API_KEY、ANTHROPIC_API_KEY、GOOGLE_GENERATIVE_AI_API_KEY、MINIMAX_API_KEY 或 OPENCODE_API_KEY;或使用已安裝並登入的本機 CLI,例如 Codex、Claude Code、Cursor Agent 或 OpenCode CLI。VIBE_WORKSPACE_ROOT 指向專案根目錄。
安裝前請注意
直接提供者需要 API 金鑰,屬於機密資訊,應放在本機 .env 或 MCP env 中,切勿提交到版本庫。呼叫 API 可能產生費用,OPENCODE_PLAN 用於選擇訂閱制或按量付費方案。此伺服器會從磁碟讀取完整原始碼檔案並將其內容傳送給所選 Critic 提供者,程式碼會離開本機。除非設定 readOnly,審查會寫入工作階段、狀態與債務紀錄。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

Vibe-Gate (MCP)

An Adversarial Quality Gate for AI-assisted IDEs: the IDE agent and a Critic LLM debate code; the human decides only on deadlock.

Quick start (npm / npx)

1. Choose a Critic provider

Use a direct API provider with its key, or use a local CLI that is already installed and signed in. Local CLI providers do not need a separate provider API key. If CRITIC_PROVIDER is omitted, Vibe-Gate selects the first installed local CLI in this order: Codex, Claude Code, Cursor Agent, then OpenCode CLI. OpenCode CLI moves to the front when CRITIC_MODEL is in provider/model form. The first review response includes a notice naming the selected CLI. If none is found, OpenAI remains the default and requires OPENAI_API_KEY. Set CRITIC_PROVIDER to choose explicitly.

Copy from the package’s .env.example:

bash
# Direct API exampleCRITIC_PROVIDER=openaiOPENAI_API_KEY=YOUR_OPENAI_API_KEY
# Or use the signed-in Codex CLI account (no API key)# CRITIC_PROVIDER=codex-cli
# Or another signed-in local CLI (no separate API key)# CRITIC_PROVIDER=claude-code# CRITIC_PROVIDER=cursor-agent# CRITIC_PROVIDER=opencode-cli# CRITIC_MODEL=provider/model  # required for opencode-cli; see `opencode models`
# Or OpenCode (https://opencode.ai/auth)# CRITIC_PROVIDER=opencode# OPENCODE_API_KEY=...# OPENCODE_PLAN=go# CRITIC_MODEL=minimax-m3
ProviderCRITIC_PROVIDERAuthentication
OpenAIopenaiOPENAI_API_KEY
AnthropicanthropicANTHROPIC_API_KEY
Google GeminigoogleGOOGLE_GENERATIVE_AI_API_KEY
MiniMaxminimaxMINIMAX_API_KEY
OpenCodeopencodeOPENCODE_API_KEY (+ optional OPENCODE_PLAN)
Codex CLIcodex-cliExisting codex login session
Claude Codeclaude-codeExisting Claude Code account session
Cursor Agentcursor-agentExisting agent login session
OpenCode CLIopencode-cliSaved opencode auth login credentials + model

For Cursor Agent, Vibe-Gate runs agent first and falls back to the legacy cursor-agent executable if the primary command is unavailable.

opencode is still the separate Zen/Go HTTP provider and needs OPENCODE_API_KEY. opencode-cli runs the local CLI and requires a provider/model value in CRITIC_MODEL; see the CLI guide for details.

CRITIC_MODEL is passed to the selected provider or CLI without a Vibe-Gate model allowlist; the provider must support that model ID. The OpenAI API provider uses the Responses API. See provider configuration.

See CLI provider setup and alternatives for CLI installation, login, configuration, OpenCode session details, and other candidates we evaluated. Full variable list: docs/project/VARIABLES.md.

2. Configure Cursor MCP (any consumer repo)

Project or user .cursor/mcp.json for Codex CLI (or use the API-key example):

json
{  "mcpServers": {    "vibe-gate": {      "command": "npx",      "args": ["-y", "vibe-gate-mcp"],      "env": {        "VIBE_WORKSPACE_ROOT": "${workspaceFolder}",        "CRITIC_PROVIDER": "codex-cli"      }    }  }}

For direct providers, prefer keys in a local .env next to the package or in the consumer project under VIBE_WORKSPACE_ROOT (never commit secrets). MCP env overrides .env. For a CLI provider, install and sign in to that CLI as the same OS user running the MCP server.

3. Call the tool (agents)

json
{  "phaseId": "phase-1-§3",  "report": "What changed, why, file:line — no TODOs",  "files": ["src/a.ts", "src/b.ts"],  "readOnly": true,  "round": 1}

Pass changed source paths in files[]. MCP reads the complete files from disk and serializes FILE/CONTENT internally for the Critic. The agent supplies paths and a completion report; it does not need to paste file bodies or generate a corpus. The example uses readOnly: true to keep review state untouched. See docs/SEMANTIC_DIFF_PAYLOAD.md.

Local development (this repo)

bash
corepack yarn installnpm run buildnpm testcp .env.example .env   # fill Critic keynpm start              # stdio MCP

User MCP while developing: examples/cursor-mcp.user-local-dev.json (node dist/index.mjs + VIBE_WORKSPACE_ROOT=${workspaceFolder}).

After npm run build, restart the vibe-gate MCP server in the IDE.

Publish

Releases are automatic. Every push to main runs .github/workflows/publish.yml: it runs yarn quality, lets semantic-release choose the version from the conventional commits (fix: is a patch, feat: a minor), publishes vibe-gate-mcp to npm with provenance, and lists that version in the MCP Registry as io.github.mustafacagri/vibe-gate-mcp. No token is stored: npm and the registry both trust the workflow through GitHub OIDC. server.json is the registry entry and is kept at the release version by scripts/sync-server-json.mjs.

bash
yarn quality          # what the workflow checks before it tags anythingnpm pack --dry-run    # inspect the exact tarball contents

Consumers then use npx -y vibe-gate-mcp as above.

Payload sources — prefer files[]

PriorityFieldUse
1files[]Normal batches
2semanticDiffPathExisting compatibility carrier
3semanticDiffExisting compatibility carrier

Use readOnly: true for probes. updateStatus: false and mcp-smoke- / vibe-gate-probe- phase prefixes only skip phase status writes.

Documentation

DocDescription
docs/INSTALLATION.mdInstall + multi-repo MCP
docs/USAGE.mdFirst run and providers
docs/CLI_PROVIDERS.mdLocal CLI providers
docs/SEMANTIC_DIFF_PAYLOAD.mdfiles[] contract
docs/ROADMAP.mdRelease checklist
docs/TROUBLESHOOTING.mdStale MCP, path errors
docs/project/VARIABLES.mdEnv SSoT
examples/Cursor mcp.json templates

Read-only review and full source slot limit

Set readOnly: true on submit_phase_review for a check that must leave the workspace untouched. It overrides updateStatus: true and prevents session clearing/saving, status updates, debt appends, conflict counter updates and deadlock case writes. Verdicts and concern verification still follow the ordinary review rules; deadlock case data is returned without saving it. Existing matching sessions can be read on later rounds, but read-only calls do not save a new round. logToDebt still expresses acceptance of debt when required, without writing the log. The default is false. updateStatus: false alone only disables phase status updates.

Every carrier (files[], inline semanticDiff, raw/JSON semanticDiffPath) is limited to ten actual FILE/CONTENT source blocks, including additional REQUEST: context on later rounds. Duplicate blocks and both rename endpoints count separately, even if their paths or bytes match. An oversized corpus fails before the enlarged Critic request; it is never reduced to the first ten blocks. Requested line ranges are read as complete files, subject to the existing file and aggregate size limits. Markdown, JSON and other document/data endpoints are rejected as source context. Callers positively classify their selected source endpoints; files[] lets MCP supply the full source bodies. For deleted files and old rename endpoints, an orchestrator such as Vibe-Pilot materializes pinned Git base blobs at real snapshot paths before passing those paths to files[]. MCP reads those files from disk; it does not read Git history itself.

來源:README.md,提交 f1972cb

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.1.12最新Oct 7, 2026