devenv-mcp
Provides isolated Docker-based sandbox sessions for running shell commands against task repositories, with network disabled, CPU/memory/PID limits, and automatic cleanup.
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., "@devenv-mcp start task 004-quadratic-dedupe and run the tests"
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.
devenv-mcp
A Model Context Protocol server that gives an AI agent a safe place to do software-engineering work. The agent can browse tasks, open a sandboxed copy of a broken repository, run commands in it, and diagnose CI failures, all through typed MCP tools.
It is the agent-facing half of rl-env-benchmark and reads the same task format, and it calls ci-doctor for CI log diagnosis.
Tools
Tool | What it does |
| List tasks with id, title, category and difficulty |
| Full prompt for one task |
| Create a fresh sandbox holding the task's starting repo; returns |
| Run a shell command in the session's repo root; returns exit code and output |
| Destroy the sandbox |
| Classify failures in a CI log or JUnit XML and suggest a next step |
| Run the hidden grader. Off by default, see below |
Every tool declares a zod input schema, returns structuredContent alongside
readable text, and reports failures in-band with isError, so the model can
read what went wrong and recover instead of the call failing outright.
Related MCP server: ctxkit
Design decisions
Isolation by default. Sessions run in Docker with
--network none, 1 CPU, 1 GB of memory and a PID limit. Alocalmode exists for task authoring, but it runs commands on the host and is clearly labelled as not isolated.Grading is opt-in. If an agent under evaluation can call the grader, it can iterate against hidden tests until they pass, which measures persistence rather than skill.
run_graderis only registered whenDEVENV_ALLOW_GRADING=1, for task authors and human reviewers.The grader never enters the workspace early. It is copied in only when grading runs, and a test asserts the agent cannot find it beforehand.
Bounded output. Command output is collected in a head-plus-tail buffer (the end of a log is usually where the error is), so a runaway process cannot exhaust memory or flood the model's context.
Real timeouts. Commands start in their own process group and the whole group is killed on timeout. Killing only
shwould leave grandchildren such aspytestholding the pipes open, and the call would hang.Capped, cleaned-up sessions. A session limit prevents runaway container creation, and all sandboxes are destroyed on SIGINT, SIGTERM or client disconnect.
stdout is the protocol. All logging goes to stderr.
Install
git clone https://github.com/TyllerDaniel/devenv-mcp
cd devenv-mcp && npm install && npm run buildUse with Claude Desktop or Claude Code
{
"mcpServers": {
"devenv": {
"command": "node",
"args": ["/path/to/devenv-mcp/dist/index.js"],
"env": {
"DEVENV_TASKS_DIR": "/path/to/rl-env-benchmark/tasks",
"DEVENV_SANDBOX": "docker"
}
}
}
}With Claude Code: claude mcp add devenv -e DEVENV_TASKS_DIR=/path/to/tasks -- node /path/to/devenv-mcp/dist/index.js
Configuration
Variable | Default | Meaning |
|
| Directory of tasks ( |
|
| Base images, |
|
|
|
|
|
|
|
| Concurrent sandbox limit |
|
| Path to the ci-doctor binary |
Invalid values fail fast at startup with a message naming the variable.
Example session
From npm run build and a client connected over stdio, against the
rl-env-benchmark tasks with grading enabled:
> start_session {"task_id": "004-quadratic-dedupe"}
Started session 72721590 for 004-quadratic-dedupe (local sandbox).
> run_in_sandbox {"session_id": "72721590", "command": "python3 -m pytest -q tests | tail -1"}
[exit code 0]
1 passed in 0.01s
> run_grader {"session_id": "72721590"}
FAILED <- visible tests pass, but the hidden 300k-event test times out
> run_in_sandbox {..., "command": "sed -i 's/seen = \\[\\]/seen = set()/; s/seen.append/seen.add/' ingest/dedupe.py"}
> run_grader {"session_id": "72721590"}
PASSEDDevelopment
npm test # vitest: unit tests plus a real MCP client over an in-memory transport
npm run typecheck
npm run buildThe server tests connect an actual MCP Client to the server, so they cover
schemas, error handling and the full start, run, grade and end loop rather than
calling handlers directly.
License
MIT
Available Tools
6 toolsdiagnose_ciDiagnose CI failureARead-only
Classify the failures in a CI log or JUnit XML report (flaky test, dependency conflict, timeout, compile error, assertion, ...) and suggest a next step. Uses the ci-doctor CLI.
Inputs: log (required), input_format.
end_sessionEnd sessionADestructive
Destroy a session's sandbox and free its resources.
Inputs: session_id (required).
get_taskGet taskARead-only
Get the full prompt and metadata for one task.
Inputs: task_id (required).
list_tasksList tasksARead-only
List every available task with its id, title, category and difficulty.
Inputs: no named parameters.
run_in_sandboxRun command in sandboxA
Run a shell command from the repository root inside a session's sandbox. Returns the exit code and combined stdout/stderr, truncated in the middle if very long. No network access.
Inputs: command (required), session_id (required), timeout_s.
start_sessionStart sessionA
Create a fresh sandbox containing the task's starting repository. Returns a session_id for run_in_sandbox. Each session is independent; end it with end_session.
Inputs: task_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The task-browsing pair (list_tasks/get_task) and the sandbox lifecycle trio (start_session/run_in_sandbox/end_session) are clearly delineated by resource and action. diagnose_ci sits in a slightly separate domain (CI log analysis) but its description makes its purpose distinct from run_in_sandbox.
All names use snake_case verb_noun form (list_tasks, get_task, start_session, run_in_sandbox, end_session, diagnose_ci). No mixing of conventions or vague bare verbs.
Six tools is a tight, well-scoped set that covers task discovery, sandbox execution lifecycle, and CI diagnosis without redundancy.
The core workflow (find task, start sandbox, run commands, end sandbox, diagnose failures) is fully covered. Minor gaps exist: no session status/list tool and no explicit submit/evaluate step to confirm a solution, though the latter may be out of scope.
Related MCP Connectors
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to perform file, search, patch, git, process, test, package, network, and system operations through 60 typed MCP tools with structured inputs/outputs, structured errors, and a full event journal, replacing terminal use with a typed machine API.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to retrieve repository context through stdio-based MCP tools, including ranked repo maps, context packs, and live symbol search.7 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to perform software engineering tasks inside an isolated, deterministic sandbox—exploring repositories, reproducing failures, applying patches, running tests, and verifying solutions against hidden suites through MCP tools.8MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to create isolated Docker runtimes, execute commands, manage workspace files, drive a headed browser, and retrieve artifacts through eight semantic MCP tools, with progressive capability discovery and explicit sandbox lifecycle.Apache 2.0