Lazy Dev
Manages task execution by creating isolated worktrees and branches, tracking file changes, and auditing worker output against allowed paths.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Lazy Dev
An MCP server where any lead agent delegates coding tasks to worker agents running in isolated git worktrees. The lead agent gets evidence-based reports back, and a human approves the merge. Lazy Dev is not a code generator: it starts workers, checks what actually changed in git and on disk, and refuses to trust a worker's own summary.
Status
This is a proof of concept. It works with OpenCode (the built-in harness) and with a generic command harness, so any CLI agent that takes a prompt can be plugged in. It has been tested on Windows only, and APIs, file layouts and messages may change.
Related MCP server: Roundtable AI MCP Server
How it works
dispatch_tasks— the lead agent sends 1–12 tasks. Each task names the files it may touch (allowed_paths) and optionally averifycommand anddepends_ontask ids. Lazy Dev creates one git worktree and onelazydev/<runId>-<taskId>branch per task, then starts a worker in each. Independent tasks run in parallel; a task withdepends_onstarts only after its dependencies commit.wait_for_run— the lead agent polls until the run is finished.get_task_report— read a task's report: status, changed files, whetherverifypassed, out-of-scope changes, and flags from the audit of the worker's shell and file tool calls.request_integration— merge the run's done task branches into a staging branch (lazydev/stage-<runId>) in a separate worktree. Your branch and working tree are never touched, and nothing is pushed.Human accept — a person reviews the staging worktree and merges it by hand if it is good.
lazydev-clean— after the review, remove that run's worktrees andlazydev/branches. It is a dry run unless you pass--yes.
Every task is judged from git and the event log, not from the worker's words: changed files are
compared with allowed_paths, Lazy Dev runs verify itself, and Lazy Dev makes the commits after
the checks pass.
Install
Requirements: Node.js 22 or newer, git, and the OpenCode CLI (or another agent CLI configured as a harness).
git clone https://github.com/shedrackfrank/lazydev-mcp.git lazydev
cd lazydev
npm install
node mcp-server.mjs # start the server by handLAZYDEV_REPO is required. LAZYDEV_OPENCODE_BIN is optional: when it is not set, Lazy Dev looks
for the installed OpenCode CLI. On Windows it checks %APPDATA%\ai.opencode.desktop\cli\*\opencode-cli.exe
and the %LOCALAPPDATA% equivalents, newest version first, skipping folders with "update" in the
name. On other platforms it looks for opencode on PATH. It never uses a .cmd or .ps1 shim.
If nothing is found, the error lists every place it looked and tells you to set
LAZYDEV_OPENCODE_BIN.
Configuration
Copy opencode.mcp.sample.json to your OpenCode config (usually opencode.json in the project or
~/.config/opencode/opencode.json) and replace the placeholders:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"lazydev": {
"type": "local",
"command": ["node", "<path-to-lazydev>/mcp-server.mjs"],
"environment": {
"LAZYDEV_REPO": "<path-to-your-repo>",
"LAZYDEV_OUT": "<path-to-your-repo>.lazydev",
"LAZYDEV_MODEL": "opencode/<provider-model>",
"LAZYDEV_MAX_PARALLEL": "3"
},
"disabled": false,
"codemode": false
}
}
}
}Keep "codemode": false: the five tools return JSON that the lead agent should read directly.
After changing the config, restart OpenCode completely. The background service keeps the old MCP server process running until it is fully stopped, so a reload alone can leave you talking to the previous version.
LAZYDEV_REPO is required; LAZYDEV_OUT defaults to <repo>.lazydev next to the repo;
LAZYDEV_MAX_PARALLEL is 1–4 (default 3); LAZYDEV_HARNESSES points at a harness config file.
Tools
Tool | Arguments |
| none |
|
|
|
|
|
|
|
|
Verify format
verify is an argument list, program first, run without a shell. There is no quoting layer, no
glob expansion and no shell built-ins.
Right:
"verify": ["node", "-e", "const {slugify}=require('./slug.js');const a=require('node:assert');a.strictEqual(slugify('Hello World'),'hello-world');console.log('verify ok')"]Wrong — one command-line string:
"verify": ["node -e \"console.log('verify ok')\""]The wrong form tries to run a program named node -e "...", which does not exist. Split the command
into its arguments instead.
Harness config
lazydev.harnesses.sample.json shows the format. Copy it to lazydev.harnesses.json next to
mcp-server.mjs; that file is git-ignored because it usually contains local paths. Three
placeholders are replaced in each argv item: {prompt} (the task prompt), {prompt_file} (a file
containing the prompt) and {cwd} (the task worktree).
{
"my-agent": {
"type": "command",
"argv": ["my-agent", "--prompt-file", "{prompt_file}"],
"version_argv": ["--version"]
}
}The example-claude-code, example-codex and example-gemini entries in the sample are
unverified guesses. Check the flags against each CLI's --help before using them.
Safety model
The worktree is a speed bump, not a sandbox. A worker that is blocked from writing outside its worktree can still use its shell to write anywhere the current user can. Lazy Dev detects and flags that after the fact, and it never commits out-of-scope files, but it cannot prevent it. Only run Lazy Dev on repositories and prompts you trust. OS-level isolation is future work.
Branches are created only under lazydev/, worktrees only under <out>/workspaces, your current
branch and working tree are never touched, and nothing is pushed.
Measured results
Single observations, not benchmarks:
Small tasks were slower and used more tokens than doing the same work in one session; the overhead of a worktree, a fresh worker and verification dominates a one-file change.
A five-module job with pre-written tests was about 1.7x faster in one run.
Cost savings are not proven. Do not assume this saves money.
Known limits
A worker can violate the frozen-file rule and write outside
allowed_paths. This is detected and flagged, not prevented.The timeout kill path is untested on Windows.
More than 4 parallel workers is untested.
The
claude,codexandgeminiharness examples are unverified guesses.Linux and macOS are untested.
Contributing
To add a harness, copy an entry from lazydev.harnesses.sample.json, set type to "command", and
put the program first in argv. Use {prompt}, {prompt_file} or {cwd} where the prompt and
folder go, then check it with list_harnesses and one small task.
Run the tests with:
npm testThat runs check (syntax-check every .mjs), selftest (pure unit tests, no git, no agent) and
smoke (starts the MCP server and exercises the tools against a throwaway folder, with no real
worker).
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Multiplayer for the coding agents your team already uses: shared tasks, decisions, skills and tools.
Hand tasks, bugs and finished work to AI coding agents, and get back a write-up with evidence.
Source control for coding agents: declare an intent, settle overlaps before code, verify each push.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceOrchestrates multiple coding agents at once so an MCP client can delegate implementation work while retaining judgment: each agent runs in its own isolated git worktree and branch, claims the files it edits, and communicates via a mailbox and shared board. Supports blocking questions to the orchestrator, Codex-written acceptance tests locked before workers start, scope validation, and reporting on first-pass success.1Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables a primary AI coding assistant to delegate tasks to specialized sub-agents in parallel, share project context, and synthesize their responses. It uses existing local CLI tools and API subscriptions to coordinate Codex, Claude, Cursor, and Gemini without extra cost.-
- AlicenseAqualityCmaintenanceEnables a planning agent to delegate research and implementation to lower-cost worker models in isolated git worktrees, monitor job progress, respond to blocked jobs, and land verified changes for review.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to spawn, parallelize, and synchronize multi-agent programming swarms through a stdio MCP interface. Provides tools for DAG-scheduled task dispatch, isolated Git worktree execution, atomic file locking, shared blackboard memory, and clean merging of completed agent work back to the main repository.1MIT