LogoSTMCP
Download
mcp_code_executor

MCP Code Executor

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.

Tools

1. execute_code

Executes Python code in the configured environment.

2. install_dependencies

Installs Python packages in the environment.

3. check_installed_packages

Checks if packages are already installed in the environment.

4. configure_environment

Dynamically changes the environment configuration.

5. get_environment_config

Gets the current environment configuration.

6. initialize_code_file

Creates a new Python file with initial content.

7. append_to_code_file

Appends content to an existing Python code file.

8. execute_code_file

Executes an existing Python file.

9. read_code_file

Reads the content of an existing Python code file.

Open Graph image for MCP Code Executor

JSON Config

{
  "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"
      }
    }
  }
}

Useful Links

Information

Categories