MCP Code Executor
@bazinga012
About MCP Code Executor
The MCP Code Executor is an MCP server that allows LLMs to execute Python code within a specified Conda environment.
Basic information
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP Code Executor?
MCP Code Executor is an MCP server that lets LLMs execute Python code inside a specified Python environment (Conda, virtualenv, or UV virtualenv). It also supports incremental code generation for handling large code blocks that may exceed token limits.
How to use MCP Code Executor?
Install Node.js dependencies, build the project (npm install && npm run build), then configure the server in your MCP clients by adding a JSON block with environment variables (required: CODE_STORAGE_DIR; environment type: ENV_TYPE plus corresponding path or name). LLMs can then call tools like execute_code, or use the incremental file approach (initialize_code_file → append_to_code_file → execute_code_file).
Key features of MCP Code Executor
- Execute Python code from LLM prompts.
- Incremental code generation to overcome token limits.
- Run code in Conda, virtualenv, or UV virtualenv.
- Install and check dependencies dynamically.
- Configure the environment at runtime.
- Configurable code storage directory.
Use cases of MCP Code Executor
- LLM writing and running short Python snippets.
- Generating multi‑file scripts incrementally to avoid token limits.
- Testing code with specific library dependencies in a tailored environment.
- Automating data analysis tasks by executing code on demand.
- Enabling LLM‑driven development with a full Python environment.
FAQ from MCP Code Executor
What Python environments does MCP Code Executor support?
It supports Conda environments, standard virtualenv (venv), and UV virtualenv (venv-uv). You select one at configuration time using the ENV_TYPE environment variable.
How can I execute a very large code block?
Use the incremental generation workflow: create a file with initialize_code_file, add content with append_to_code_file across multiple turns, and finally run it with execute_code_file.
What are the prerequisites to use MCP Code Executor?
You need Node.js installed, plus one of: Conda (with a created environment), a Python virtualenv, or a UV virtualenv.
Can I change the environment after starting the server?
Yes. Use the configure_environment tool to dynamically switch the environment type, Conda name, or virtualenv path.
Where are the generated code files stored?
All generated files are stored in the directory specified by the CODE_STORAGE_DIR environment variable (required in configuration).
More Developer Tools MCP servers
Golf
golf-mcpProduction-Ready MCP Server Framework • Build, deploy & scale secure AI agent infrastructure • Includes Auth, Observability, Debugger, Telemetry & Runtime • Run real-world MCPs powering AI Agents
Burp Suite MCP Server Extension
PortSwiggerMCP Server for Burp
OpenSumi
opensumiA framework helps you quickly build AI Native IDE products. MCP Client, supports Model Context Protocol (MCP) tools via MCP server.
MCP-Bridge
SecretiveShellA middleware to provide an openAI compatible endpoint that can call MCP tools
Comments