vibe-mcp
This server lets you delegate well-specified coding work (implementation, refactoring, cleanup, review) to the Mistral Vibe CLI running in isolated sandboxes, while you keep planning and reviewing.
Submit jobs asynchronously with
vibe_submit(spec, title?, scope?, base_job?, max_turns?, time_limit?, max_price?, skill?)— returns a job id immediately;specmust be self-contained since Vibe sees neither the chat nor project docs.Use skills by name (
simplify,code-review, fan-out variants, or your own) to prepend reusable instructions; a skill with anangles/folder runs parallel read-only reviewers plus a merge job.Restrict and parallelize work with
scope(repo-relative paths): disjoint scopes run in parallel, overlapping ones queue.Chain jobs via
base_jobto build on another job's result.Wait for completion with
vibe_wait(job_ids?, timeout=120, wait_all=false);timeout=0is a status check.Inspect outcomes with
vibe_result(job_id, diff=false, full=false)— summary, diffstat, added files, scope violations, tokens, cost, and optionally the capped diff.Cancel jobs with
vibe_cancel(job_id); the worktree is preserved.Apply or discard results with
vibe_apply(job_id, discard=false)— stages changes viagit merge --squash(never commits), or drops the worktree/branch.Run safely: every job gets its own git worktree and branch inside a bubblewrap sandbox; the server never runs tests or Vibe's code, so you must review the diff and run checks yourself.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vibe-mcp have vibe refactor the logging module and show me the diffstat"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vibe-mcp
An MCP server that lets Claude Code hand well-specified coding work (implement, simplify, mechanical refactors) to the Mistral Vibe CLI, so the expensive model plans and reviews while a cheaper one writes the code.
Asynchronous.
vibe_submitreturns at once; Claude keeps working and callsvibe_wait.Isolated. Every job runs in its own git worktree and branch, inside a bubblewrap sandbox.
Compact. Results are short plain text (summary, diffstat, cost). The full diff is on request.
Safe to merge.
vibe_applystages a job's changes in your checkout and never commits.
Status: unit-tested against a fake sandbox (no network, no cost), and smoke-tested against real Vibe 3.1.0 with the reference sandbox by a script driving the server over stdio: parallel jobs, apply, conflict report, cancel (no processes left behind), writes outside the worktree, and serial chaining. It has also been used from a live Claude Code session on Linux: the server served the repo Claude Code was started in, the keyring login reached the jobs, and a cleanup, a review,
vibe_applyand a four-minute job all worked. Only Vibe 3.1.x andmistral-large-4have been tried.
Requirements
You need | Why | Check |
Linux | the reference sandbox uses bubblewrap | |
git 2.22+, and a repo with at least one commit | each job is a worktree branched from |
|
installs this tool; it downloads Python 3.14 itself if you lack it | ||
bubblewrap ( | the sandbox; some distros restrict namespaces and need extra setup |
|
Mistral Vibe, installed with | the reference sandbox binds |
|
A Mistral login: the system keyring ( | Vibe calls the Mistral API |
|
for the keyring login: | the sandbox reaches the keyring through a filtered D-Bus proxy; |
|
| the reference sandbox uses it to read Vibe's export |
Only Vibe 3.1.x has been tested. On the common distros the packages are called bubblewrap and
xdg-dbus-proxy.
Related MCP server: worker-mcp
Install
# 1. Vibe, then log in (skip the login if you will use MISTRAL_API_KEY instead)
uv tool install mistral-vibe # see Mistral's docs if the package name changes
vibe --setup
# 2. this project, and the reference sandbox from the same clone
git clone https://github.com/idaho06/vibe-mcp && cd vibe-mcp
install -m755 contrib/vibe-sandbox ~/.local/bin/
uv tool install .
# 3. check the machine; every failing line says how to fix it
vibe-mcp doctor
# 4. register the server with Claude Code for all your projects
claude mcp add --scope user vibe -- vibe-mcp
claude mcp list # should show `vibe` as connectedTo update later: git pull && uv tool install --force .
If you use MISTRAL_API_KEY, the server process must receive it. Pass it when registering (see
claude mcp add --help for the environment-variable option) instead of relying on your shell.
Using it
Start Claude Code inside the repository you want to work on (it needs at least one commit). The
server works on the git repository of its working directory and prints serving git repo <path> on
stderr at startup; check that line. Do not wrap the command in something that changes directory (for
example uv run --directory; use uv run --project instead), or it will serve the wrong repository.
Claude Code asks before using MCP tools. Allow the five tools (named like mcp__vibe__vibe_submit)
in its permission settings if you do not want a prompt for each call.
Using a different sandbox
sandbox_cmd in the config can point to any wrapper that behaves like this. The doctor checks that
are specific to the reference sandbox are skipped for other commands.
It is called as
vibe-sandbox RUN_DIR [vibe arguments...]with the current directory inside a git repo.RUN_DIRis namedvibe-run.*, and the wrapper makes Vibe writeRUN_DIR/export/export.json(Vibe's--output-dir RUN_DIR/export).It exits with Vibe's exit code (0 finished, 3 stopped at a limit, anything else failed).
It should let Vibe write only the current directory (the job's worktree) and the git directory.
Keep
data_dirshort: the wrapper may create a Unix socket inRUN_DIR(108-character limit).
Read contrib/vibe-sandbox before you rely on it: it decides what Vibe can see and write.
Tools
Tool | Purpose |
| Queue a task and return its job id at once. |
| Block until any (or all) of the jobs end, or |
| Vibe's own summary (unverified), diffstat, added files, scope violations, tokens, cost. |
| Cancel a queued job or kill a running one. Its worktree is kept. |
| Stage the job's changes in your checkout ( |
Typical flow: vibe_submit (one or several jobs) → vibe_wait → vibe_result → review the diff →
vibe_apply → you run the tests and git commit.
Scopes and parallel jobs
scope lists the repo-relative paths a job may touch. Jobs whose scopes overlap run one after
another; jobs with disjoint scopes run in parallel (up to max_concurrent). A job with no scope
counts as the whole repo. A waiting job reserves its scope, so it cannot be starved by later jobs.
After the run, changed files outside the scope are reported as SCOPE VIOLATIONS (not blocked).
base_job starts a job from another job's result. It waits until that job ends, and fails with a
clear message if that job failed, was cancelled, applied or discarded.
Isolation modes
isolation = "worktree"(default): every job starts from the currentHEAD.isolation = "serial": one job at a time, and each job starts from the latest finished job's branch, so work accumulates like a single shared worktree.
Using it day to day
Claude does the thinking and the checking; Vibe does the typing. A delegation is five calls:
vibe_submit(spec, scope, ...)returns a job id at once.vibe_waitblocks until the job ends (Claude Code moves a long wait to the background for you).vibe_result(job_id, diff=true): read the diff. Vibe's own summary is unverified.vibe_applystages the changes. It never commits.Run the tests. The server never runs tests or the code Vibe wrote.
A request that works
Vibe sees neither your conversation nor your project docs, only the text Claude sends it, so the spec decides the result. A bare "implement X" leaves Claude to improvise one. Something like this works:
Use the vibe tools to implement <feature>. Spec for Vibe (self-contained):
- Goal: ...
- Scope (the only files it may touch): src/inventory/, tests/test_inventory.py
- Conventions to follow: ...
- Done when: `uv run pytest tests/test_inventory.py` passes
- Do not: change public APIs, add dependencies.
Then review the diff yourself, apply it, run the tests, and simplify the result.Feature, then cleanup
A job's worktree starts at the committed HEAD, so staged but uncommitted changes are invisible to the
next job. There are two ways to follow an implementation with a cleanup:
Chain with
base_job: submitsimplifywithbase_job=<implementation job>and the spec "Simplify the changes inHEAD~1..HEAD". The worktree starts from the implementation's branch, so the last commit is Vibe's own work. Apply the final job, thendiscardthe first one. This works with the single-agent skills but not with fan-out skills.Apply, commit, then clean up: apply and commit the implementation first, then submit the cleanup (or
simplify-fanout) againstHEAD~1..HEAD.
Rules of thumb
Delegate bounded, well-specified work: a feature with clear acceptance criteria, a mechanical refactor, a cleanup or review pass. Keep design decisions, vague tasks and tiny edits for Claude: every job pays Vibe's fixed per-session overhead (see Cost), so a one-line change is cheaper done directly.
Always set
scope. Jobs with disjoint scopes run in parallel (max_concurrent, default 3), and files changed outside the scope are flagged.Name the target and give the test command. Vibe only runs commands the task supplies. If the tests cannot run in the sandbox, tell it not to run them and run them yourself after
vibe_apply.Pick the skill by size:
simplifyandcode-reviewfor routine work,simplify-fanoutandreview-fanoutfor large or important changes. Fan-out costs several times more.Allow the five
mcp__vibe__*tools in Claude Code's permission settings, or you will be asked before every call.Measure. Each result shows its cost, and
vibe-mcp statstotals everything. Try two or three real tasks before you rely on the savings.
In plans and in CLAUDE.md
If you work from written plans, add a delegation policy next to your commit and test policies, and mark each step with who does it:
Delegation policy: bounded implementation steps run through the vibe MCP; design and integration stay with Claude.
Per delegated step: a Scope disjoint from other steps, a self-contained Spec, an acceptance test command.
After each: vibe_result diff -> review -> vibe_apply -> run the tests -> (simplify via vibe) -> commit.
Step N - <title> Executor: vibe | claude
Scope: <paths> Test: <command>
Spec: goal / conventions / done-when / must-notA natural split under test-driven development: Claude writes the failing tests and the spec, Vibe makes them pass and simplifies, and Claude reviews and runs the suite.
To have Claude do this by default, put a few lines in your user-level ~/.claude/CLAUDE.md. It loads in
every session, so keep it short and conditional on the tools being present:
When the `vibe` MCP tools (`vibe_submit`, `vibe_wait`, `vibe_result`, `vibe_apply`, `vibe_cancel`) are
available, use them for bounded implementation, cleanup and review work, to save tokens. Keep design
decisions, ambiguous tasks and tiny edits for yourself. Vibe sees neither this conversation nor the
project docs: write a self-contained `spec` and always set `scope`. A job starts at the committed `HEAD`,
so name the commits or files to work on. Read `vibe_result(diff=true)` before `vibe_apply`, and run the
tests yourself afterwards: the server never runs them.Skills and project context
A job runs in a fresh worktree, which holds only the files git tracks. Anything kept out of git
(a gitignored .vibe/ folder, an untracked AGENTS.md) is missing there, and Vibe cannot see your
main checkout. Two features bring that material in. Both read from your main checkout when the job
is submitted, so they work even for files git ignores.
Skills
A skill is a SKILL.md file of instructions. vibe_submit(skill="simplify", spec="...") puts the
skill's text (without its frontmatter) in front of your task. The server looks for it in:
<repo>/.vibe/skills/<name>/SKILL.md(per project; wins), then~/.vibe/skills/<name>/SKILL.md(global).
These are Vibe's own skill folders, so the same files also work in interactive Vibe. A wrong name is rejected at once with the list of available skills, and nothing is queued.
Shipped skills. contrib/skills has two lightweight skills written for
unattended jobs, plus the two fan-out packs described below.
The server finds a skill by name in <repo>/.vibe/skills/<name>/, then in ~/.vibe/skills/<name>/,
and nowhere else, so copy the folders you want into one of them:
mkdir -p ~/.vibe/skills
cp -r contrib/skills/simplify contrib/skills/code-review ~/.vibe/skills/ # single agent
cp -r contrib/skills/simplify-fanout contrib/skills/review-fanout ~/.vibe/skills/ # parallel reviewersCopy each folder whole: a fan-out skill needs its angles/ subfolder, and review-fanout its
fanout.toml. A skill of the same name that is already there is overwritten, so run
ls ~/.vibe/skills first if you keep your own simplify or code-review.
simplifycleans up the code your task names (reuse, dead code, nesting, wasted work) without changing behavior, and edits the files in place.code-reviewis read-only and reports real defects, each with the input that triggers it.
Both never ask questions, stay inside the scope the task names, run only the commands the task gives them, and end with a short fixed-format report. They are single-agent: one session does the whole job. For several reviewers working in parallel, see Fan-out skills below. Write your own for anything else, or override these per project.
A third, code-simplifier, is in contrib/skills-apache: an adaptation of
Anthropic's Apache-2.0 code-simplifier
agent, kept under that license with a notice of what changed. It is also single-agent.
Writing a skill. Create <name>/SKILL.md with frontmatter holding a name (lowercase letters,
digits and hyphens) and a description, then the instructions. The frontmatter is YAML: quote the
description if it contains : (a colon followed by a space), or Vibe rejects the file. Remember the
job is headless: the skill should say not to ask questions, how to find its target, and how short the
final report must be, because Claude pays for every line of the result.
Fan-out skills (parallel reviewers)
Experimental. Tested with a fake sandbox, and in one run each against the real model (Vibe 3.1.0,
mistral-large-4). The measured numbers are at the end of this section; a larger sample would be better.
A skill whose folder has an angles/ subfolder is run by the server as a team: one read-only
reviewer per angle, all in parallel, then one merge job that reads their reports. The model is
not asked to spawn anything itself. Claude sees a single job:
vibe_submit(skill="review-fanout", spec="Review the changes in HEAD~3..HEAD ...") -> job id
vibe_wait / vibe_result -> one reportreview-fanout/
SKILL.md instructions for the merge job (verify, merge, report)
fanout.toml optional: `readonly = true` if the merge job only reports
angles/
logic.md what one reviewer looks for: one file per reviewer
security.mdAngle names are the file names (letters, digits, hyphens and underscores). The server adds a standard wrapper to every reviewer: read-only, never ask questions, do not carry out the task text (it only names the target), and report findings in one fixed line format.
Two packs are shipped in contrib/skills; install them with the second cp above:
simplify-fanout: four reviewers (duplication,dead-weight,structure,wasted-work). The merge job checks their findings against the code and applies the safe ones.vibe_applyworks on it as on any other job.review-fanout: five reviewers (logic,callers,state-and-timing,edges,security). The merge job verifies each candidate, drops the ones the code refutes, and reports up to 8 findings, short enough to fit the result limit. It is read-only, so there is nothing to apply.
How it behaves:
One commit for everyone. The base is pinned to the commit that is
HEADwhen you submit, so the reviewers and the merge job see the same code even if you commit meanwhile. For the same reasonbase_jobcannot be combined with a fan-out skill.Reviewers are hidden.
vibe_waitwithout ids lists only the merge job, which shows progress such asqueued (reviewers 2/5 done). Its time and cost cover the whole team, counted from submit. Asking for a reviewer by its id still works.Failures are tolerated. If some reviewers fail, the merge job still runs and its prompt names the missing angles. If all of them fail, the merge job fails with a message saying so. Cancelling the merge job cancels its reviewers.
Reviewers are read-only by instruction, not by the sandbox. A reviewer runs in a throwaway detached worktree with no branch. If it changes files anyway, the changes are discarded and the job carries a warning. Its worktree is removed as soon as it ends.
Cost. A fan-out is one session per reviewer plus the merge job, so the cost scales with the number of angles, and
vibe_resultshowsreviewers: 5 jobs, $… (merge $…, total $…). The limitsmax_turns,time_limitandmax_priceapply to each job, andcontext_filesare sent to every one of them.max_concurrent(default 3) decides how many run at once, andisolation = "serial"runs them one after another. For a small change, a single-agent skill is much cheaper.What we measured, one run each, costs as Vibe reports them (they may exclude some overhead):
Case
Single-agent skill
Fan-out
Review of a 45-line file with a planted off-by-one
about 30 s, $0.02 to $0.03
81 s, $0.17 (5 reviewers $0.14, merge $0.03)
Cleanup of a 439-line, copy-pasted file
about 2 min, $0.12 (439 to 128 lines)
101 s, $0.21 (4 reviewers $0.13, merge $0.08), 439 to 105 lines
All nine reviewers stayed read-only, even though the cleanup task said "edit only big.py". Both groups found the planted bug or the main duplication; the review fan-out also found more edge cases, with some severity inflation. The fan-out costs several times more for a modest gain on small inputs, so use it where breadth matters: large diffs and changes you want checked twice.
Project context
context_files in the config lists repo files to put in front of every task, for example your coding
standards when AGENTS.md is not tracked in git:
context_files = ["AGENTS.md"]Missing or empty files are skipped, and each file is cut at 50,000 characters. List only files Vibe
cannot see by itself: a tracked file is already in the worktree, and AGENTS.md is one Vibe reads on
its own. The default is empty, so specs stay self-contained unless you opt in.
Naming the target of a cleanup or review
The worktree starts at HEAD, so uncommitted changes in your checkout are not in the job. Commit
first, then say exactly what to work on in the spec: "simplify the changes in HEAD~3..HEAD" or "review
src/parser.py". The shipped skills do nothing and say so when the task names no target.
Cost
Every job pays Vibe's fixed per-session overhead, and a skill adds its own text (about 400 to 600
tokens for the shipped ones). In tests with Vibe 3.1.0 and mistral-large-4 on a 45-line change, using
larger skills than the shipped ones, a review cost about $0.02 to $0.03 and a cleanup $0.04 to $0.06.
Vibe's cost report may not include subagents, so treat figures as lower bounds, and check
vibe-mcp stats on your own work.
Configuration
Optional file ~/.config/vibe-mcp/config.toml (or the path in $VIBE_MCP_CONFIG). Unknown keys and
wrong types are rejected at startup.
Key | Default | Meaning |
|
|
|
|
| parallel jobs (forced to 1 in serial mode) |
|
| Vibe model alias |
|
| sandbox wrapper command (may include arguments) |
|
| run directories and worktrees |
|
| default per-job turn budget (per-call override) |
|
| default per-job time limit in seconds (per-call override) |
|
| default per-job price cap in dollars; 0 = no cap |
|
| cap on Vibe's final message in results |
|
| cap on the diff in results |
|
| repo files whose text is put in front of every task (see Skills) |
Things to know
Long waits are fine in Claude Code. It moves a tool call that runs longer than about 120 seconds to the background and tells Claude when it finishes. A
vibe_waiton a four-minute job returned its result that way, as a notification, without an error. (Seen in one session; other clients may differ.)Vibe's code is unreviewed. The server never runs tests or the code Vibe wrote. Read the diff (
vibe_result diff=true), then run your own checks before committing.Trust the diff, not Vibe's report. Vibe can say it wrote files outside its worktree, such as into your checkout or another job's worktree. With the reference sandbox those writes land in a throwaway in-memory filesystem and vanish, but Vibe still reports success. Only the committed diff counts.
Every job has a cost floor. A one-line fix cost about 33K tokens (mostly Vibe's cached system prompt) and $0.013 in a test with Vibe 3.1.0. Delegate medium and large tasks, not one-liners.
Jobs live with the server. Closing Claude Code kills running jobs; queued and running jobs left behind show up as
loston the next start. Their worktrees are kept until you discard them.Main checkout guard. The sandbox must share the git directory, so a job could in principle move your branch. If your checkout's branch or
HEADchanged while a job ran, the result starts with aWARNING(it also fires when you committed meanwhile).Vibe's streaming output is undocumented. It is only used for live progress and the final message; the outcome, cost and tokens come from Vibe's
export.json.
Measuring the savings
vibe-mcp stats (add --json for scripts) sums up every saved job: counts by state, total and
average cost, tokens and duration. To compare with another delegation setup, run the same tasks
through both and compare wall time and Vibe cost from stats, plus the Claude tokens in the session
transcripts.
Development
uv sync
uv run pytest # no network, no cost: uses tests/fake_sandbox.py
uv run ruff check && uv run ruff format --checkTests drive a fake sandbox (tests/fake_sandbox.py) that takes JSON directives, so the whole
scheduler, git handling and MCP surface are covered without running Vibe.
License
MIT, except contrib/skills-apache/, which is Apache-2.0 (see its README).
Available Tools
5 toolsvibe_applyA
Stage a finished job's changes in the main checkout (git merge --squash, no commit).
Conflicts are reported and nothing changes. discard=true drops the job's worktree and branch instead.
Inputs: job_id (required), discard.
vibe_cancelA
Cancel a queued job, or kill a running one. Its worktree is kept.
Inputs: job_id (required).
vibe_resultA
Outcome of a job: Vibe's own summary (unverified), diffstat, added files, scope violations, tokens and cost. diff=true appends the diff (capped). A long summary is cut at a line boundary; full=true returns all of it.
Inputs: job_id (required), diff, full.
vibe_submitA
Queue a coding task for Mistral Vibe (a cheaper model) in an isolated git worktree.
spec: complete and self-contained; Vibe sees neither this chat nor project docs. skill: name of a Vibe skill (.vibe/skills//SKILL.md in the repo or ~) to follow. A skill folder with angles/ runs parallel read-only reviewers, then a merge job: you get the merge job's id. scope: repo-relative paths the task may touch; jobs with overlapping scopes run one after another (omit = whole repo). base_job: build on another job's result. Returns at once. Then: vibe_wait, vibe_result, vibe_apply.
Inputs: spec (required), scope, skill, title, +4 more.
vibe_waitA
Wait until any job (every job if wait_all) in job_ids ends, or timeout seconds pass.
Default job_ids: all active jobs. timeout=0 just reports status. One line per job.
Inputs: job_ids, timeout, wait_all.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The five tools map cleanly to distinct lifecycle stages (queue, block, inspect, integrate/discard, cancel). There is mild overlap between vibe_wait (reports status, especially with timeout=0) and vibe_result (detailed outcome), and between vibe_cancel (keeps worktree) and vibe_apply's discard=true (drops it), though descriptions clarify both cases.
All tools share a consistent vibe_ prefix and a single-word suffix. Four are verbs (submit, wait, apply, cancel) while vibe_result is a noun, a minor deviation but still predictable and readable.
Five tools is a tight, well-scoped set that covers exactly one async job workflow. Every tool earns its place with no redundant or filler operations.
The core lifecycle is fully covered: submit -> wait -> result -> apply/cancel, including skill, scope, and base_job chaining. The only real gap is an explicit list/history operation for jobs, which agents must approximate via vibe_wait with default job_ids or timeout=0.
Maintenance
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Multi-brand AI code review for Claude: up to 12 reviewers and a judge, no install.
Shared work memory for Claude Code, Codex, Cursor and chat, scoped to each repository.
Claude Code / MCP skills for the dev pipeline: discover, spec, design, build, ship, operate.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude to create, manage, and clean up git worktrees automatically, including dependency installation and GitHub PR creation.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to delegate coding tasks to a worker CLI, handling actual code modifications and command execution while Claude supervises and verifies results.-
- AlicenseNot gradedqualityCmaintenanceTurns Claude Code into an engineering project manager by orchestrating feature development with isolated Git worktrees, structured task validation, and approval-gated integration.1MIT
- AlicenseNot gradedqualityFmaintenanceEnables Codex to delegate bounded engineering jobs to Claude Code CLI in isolated Git worktrees with strict security and allowance pacing.MIT