MCP Code Executor enables LLMs to execute Python code within specified environments (Conda, virtualenv, or UV virtualenv) with support for incremental code generation to overcome token limitations.
Executes Python code in the configured environment.
Installs Python packages in the environment.
Checks if packages are already installed in the environment.
Dynamically changes the environment configuration.
Gets the current environment configuration.
Creates a new Python file with initial content.
Appends content to an existing Python code file.
Executes an existing Python file.
Reads the content of an existing Python code file.
{
"mcpServers": {
"mcp-code-executor": {
"command": "node",
"args": [
"/path/to/mcp_code_executor/build/index.js"
],
"env": {
"CODE_STORAGE_DIR": "/path/to/code/storage",
"ENV_TYPE": "conda",
"CONDA_ENV_NAME": "your-conda-env"
}
}
}
}