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).
「開発者ツール」の他のコンテンツ
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
mcp-excalidraw
yctimlinMCP server and Claude Code skill for Excalidraw — programmatic canvas toolkit to create, edit, and export diagrams via AI agents with real-time canvas sync.

Sentry
modelcontextprotocolModel Context Protocol Servers
MCP Framework
QuantGeekDevThe Typescript MCP Framework
コメント