MCP Code Executor
@bazinga012
关于 MCP Code Executor
The MCP Code Executor is an MCP server that allows LLMs to execute Python code within a specified Conda environment.
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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).
开发工具 分类下的更多 MCP 服务器
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
test
cloudwegoThe ultimate LLM/AI application development framework in Go.
Serena
oraiosA powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent
Unity MCP (Server + Plugin)
IvanMurzakAI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for fr
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
评论