Isolator MCP Server
The Isolator MCP Server allows secure execution of code snippets in an isolated container environment through the execute_code MCP tool.
Multi-Language Support: Run Python, Go, or JavaScript code (configurable via
isolator_config.json)Execution Methods: Process code provided directly as a string or from pre-configured snippets
Security Features: Configurable resource limits, timeout, and network restrictions
File Handling: Include additional files required for execution
Structured Results: Returns execution results (stdout, stderr, status) with error handling
Integration: Easily integrates with LLM applications (MCP Hosts) like the VS Code extension
Provides secure code execution in isolated Docker containers, used for safely running user-provided code snippets.
Enables running JavaScript code snippets within isolated containers for secure execution.
Supports execution of Node.js code in secure, isolated containers with controlled resource limits.
Supports execution of Python code snippets in a secure sandbox environment.
Uses Zod for validation of arguments in the code execution tool.
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., "@Isolator MCP Serverexecute a Python snippet to calculate the factorial of 10"
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.
Isolator MCP Server
isolator-mcp is a Model Context Protocol (MCP) server written in TypeScript. It acts as a wrapper around the embedded isolator Go CLI tool, providing a secure code execution sandbox accessible via MCP.
LLM applications (MCP Hosts) can connect to this server and use its execute_code tool to safely run Python, Go, or JavaScript code snippets provided directly or loaded from predefined snippet files.
Features
Provides the
execute_codeMCP tool.Supports executing code provided directly (
language,entrypoint_code) or via named snippets (snippet_name).Supports multiple languages (Python, Go, JavaScript, configurable).
Uses the embedded
isolatorGo CLI (isolator-cli/) for secure Docker container execution.Configurable security defaults (timeout, resource limits, network) via
isolator_config.json.Manages temporary directories on the host for code execution.
Handles file copying into containers (by instructing the
isolatorCLI).Returns structured results (stdout, stderr, status) via MCP, setting
isError: trueon tool-level failures.
Related MCP server: SQL MCP Server
Prerequisites
Docker: Required for container creation and execution by the
isolator-cli. Ensure the Docker daemon is running.Go: Required to build the embedded
isolator-cliGo binary.Node.js and npm: Required to install dependencies, build, and run the
isolator-mcpTypeScript server.
Installation
Build
isolatorGo CLI: Navigate to the embedded Go CLI directory and build the binary:cd isolator-cli go build -o isolator main.go cd ..This creates the
./isolator-cli/isolatorexecutable needed by the server.Configure
isolator-mcp:Edit
isolator_config.json: UpdateisolatorPathto point to the absolute path of the built binary (e.g.,/Users/ompragash/Documents/Cline/MCP/isolator-mcp/isolator-cli/isolator). Adjust default limits, container workdir, language images, or thepromptsDir(used for snippets) location if needed.Ensure the
promptsdirectory exists (default:./prompts). Add code snippet files (e.g.,hello_world.py). The filename base (e.g.,hello_world) is used as thesnippet_name.
Install Server Dependencies: Navigate to the main directory (
isolator-mcp) and run:npm installBuild Server: Compile the TypeScript code:
npm run buildThis creates the executable script at
build/index.js.Configure MCP Host: Add the server to your MCP client's settings file (e.g.,
cline_mcp_settings.jsonfor the VS Code extension):{ "mcpServers": { "isolator": { "command": "node", "args": ["/Users/ompragash/Documents/Cline/MCP/isolator-mcp/build/index.js"], "env": {}, "disabled": false, "autoApprove": [] } } }(Adjust the path in
argsif necessary). The MCP Host should automatically detect and start the server.
Important Note: Ensure the Docker images specified in isolator_config.json (e.g., python:3.11-alpine, golang:1.21-alpine) are pulled onto your system beforehand using docker pull <image_name>. The isolator tool does not automatically download missing images.
Local Development / Testing
To run the server locally for development or testing (without installing it via MCP Host settings):
Build Go CLI: Ensure the
isolatorGo CLI is built within its subdirectory:cd isolator-cli go build -o isolator main.go cd ..Build TS Server: In this main directory (
isolator-mcp), runnpm installandnpm run build.Configure: Make sure
isolator_config.jsoncorrectly points to the built./isolator-cli/isolatorbinary via theisolatorPathkey (use the absolute path).Run Server: Execute the built server directly using Node:
node build/index.jsThe server will start, connect via stdio, and print logs (including
console.errormessages fromindex.ts) to the console.Interact (Manual): You can manually send JSON-RPC messages (e.g.,
tools/list,tools/call) to the server's standard input to test its responses. Tools like@modelcontextprotocol/inspectorcan also be helpful (npm run inspector).
(Remember to stop this manually run server before relying on the MCP Host to start it via the settings file.)
Architecture & Flow
MCP Host Request: An LLM asks the MCP Host (e.g., VS Code Extension) to call the
isolatorserver'sexecute_codetool with arguments.Server Processing (
index.ts):Receives the
tools/callrequest via stdio.Validates arguments using Zod.
Loads configuration from
isolator_config.json.Determines the code source:
If
snippet_nameis provided, reads the corresponding file from the configuredpromptsDirand determines the language from the file extension.If
entrypoint_codeandlanguageare provided, uses them directly.
Creates a temporary directory on the host.
Writes the entrypoint code and any
additional_filesinto the temporary directory.Constructs the command-line arguments for the embedded
isolatorGo CLI, including security flags from the config and the path to the temporary directory.Spawns the
isolatorprocess using Node.jschild_process.spawn.
Go CLI Execution (
isolator-cli/isolator run):Parses flags (including the new
--envflag).Creates a tar stream of the temporary directory contents.
Uses the Docker SDK to create a container with specified image, resource limits, environment variables (from
--env), and security settings (NO bind mount).Uses
CopyToContainerto copy the tar stream into the container's working directory.Starts the container, which executes the requested command (e.g.,
python /workspace/hello_world.py).Waits for completion, captures stdout/stderr.
Removes the container.
Prints the result (status, output, etc.) as JSON to its stdout.
Server Result Handling (
index.ts):Reads the JSON output from the finished
isolatorprocess stdout.Parses the JSON result.
Formats the
CallToolResultfor MCP, combining stdout/stderr and settingisErrorif the Go CLI reported a non-success status.Sends the result back to the MCP Host.
Cleans up the temporary directory on the host.
MCP Host Response: Relays the result back to the LLM, which then formulates a response for the user.
execute_code Tool
Description
Executes code (Python, Go, JavaScript) in a secure, isolated container environment.
Input Schema (arguments)
language(string, optional): The programming language (e.g., "python", "go", "javascript"). Required ifsnippet_nameis not provided.entrypoint_code(string, optional): The main code content to execute. Required ifsnippet_nameis not provided.entrypoint_filename(string, optional): Filename for the main code (e.g., "main.py", "script.js"). Defaults based on language if not provided.additional_files(array, optional): Array of objects, each with:filename(string, required): Name of the additional file.content(string, required): Content of the additional file.
snippet_name(string, optional): Name of a pre-defined code snippet file (without extension) located in the configuredpromptsDir. Mutually exclusive withlanguageandentrypoint_code.
Constraint: Either snippet_name OR both language and entrypoint_code must be provided.
Output (CallToolResult)
content: An array containing a singleTextContentobject.type: "text"text: A string containing the combined stdout and stderr from the execution, formatted like:--- stdout --- [Actual stdout output] --- stderr --- [Actual stderr output]If an error occurred during execution (non-zero exit code, timeout), the text will be prepended with
Execution Failed (status): [error message]\n\n.
isError(boolean):trueif the execution status reported by theisolatorCLI was "error" or "timeout",falseotherwise.
(Protocol-level errors, like invalid arguments or failure to start the process, will result in a standard MCP error response instead of a CallToolResult).
Available Tools
1 toolexecute_codeC
Executes code (Python, Go, JavaScript) in a secure, isolated container environment.
| Name | Required | Description | Default |
|---|---|---|---|
| additional_files | No | Optional array of additional files needed for execution | |
| entrypoint_code | No | The main code content to execute. Required unless using snippet_name. | |
| entrypoint_filename | No | Optional filename for the main code (defaults based on language). | |
| language | No | The programming language (python, go, javascript). Required unless using snippet_name. | |
| snippet_name | No | Name of a pre-defined code snippet to execute (e.g., 'hello_world'). Mutually exclusive with entrypoint_code/language. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'secure, isolated container environment' which hints at safety, but doesn't disclose critical behaviors like execution time limits, resource constraints, output handling, error behavior, or authentication needs. For a code execution tool with zero annotation coverage, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place, with no redundancy or unnecessary elaboration. It's appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a code execution tool with no annotations and no output schema, the description is incomplete. It lacks details on return values, error handling, execution constraints, and safety guarantees. The description doesn't compensate for the missing structured data, leaving significant gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description doesn't add any parameter-specific details beyond what's in the schema, such as explaining mutual exclusivity rules or language-specific defaults. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Executes code') and resource ('in a secure, isolated container environment'), specifying supported languages (Python, Go, JavaScript). It distinguishes from potential alternatives by mentioning the execution environment, but without sibling tools, full differentiation isn't possible.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives is provided. The description mentions the execution environment but doesn't specify use cases, prerequisites, or limitations. Without siblings, this is less critical, but still a gap in usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
execute_code
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to compare it to. The tool's purpose is clearly defined and distinct by default.
Since there is only one tool, it inherently follows a consistent naming pattern with itself. The tool name 'execute_code' uses a clear verb_noun structure, which is appropriate and consistent in this minimal context.
A single tool for a server named 'Isolator MCP Server' suggests a very narrow scope, but it may be too minimal for practical use. While the tool handles code execution, the server's purpose might imply broader isolation features, making the count feel thin and potentially under-scoped.
The tool surface is severely incomplete for a server focused on isolated code execution. There are obvious gaps, such as no tools for managing containers, listing available environments, checking execution status, or handling input/output beyond the single execute command, which will limit agent capabilities.
Maintenance
Related MCP Connectors
Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
- mcp-serverOAuthai.cdbx
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA TypeScript implementation of a Model Context Protocol server that provides a frictionless framework for developers to build and deploy AI tools and prompts, focusing on developer experience with zero boilerplate and automatic tool registration.681 npm14MIT
- AlicenseNot gradedqualityCmaintenanceA TypeScript implementation of a Model Context Protocol server that enables language models to securely query PostgreSQL databases, including those behind SSH bastion tunnels.9 npm1MIT

Akash MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceA TypeScript server implementing the Model Context Protocol that enables AI agents to interact with the Akash Network, allowing them to deploy applications, create leases, manage deployments, and access other Akash services through typed tools.58 npm13Apache 2.0- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.121MIT