Cover image
Try Now
2025-03-20

The MCP Code Executor is an MCP server that allows LLMs to execute Python code within a specified Conda environment.

3 years

Works with Finder

1

Github Watches

12

Github Forks

46

Github Stars

MCP Code Executor

smithery badge

The MCP Code Executor is an MCP server that allows LLMs to execute Python code within a specified Conda environment. This enables LLMs to run code with access to libraries and dependencies defined in the Conda environment.

Code Executor MCP server

Features

  • Execute Python code from LLM prompts
  • Run code within a specified Conda environment
  • Configurable code storage directory

Prerequisites

  • Node.js installed
  • Conda installed
  • Desired Conda environment created

Setup

  1. Clone this repository:
git clone https://github.com/bazinga012/mcp_code_executor.git
  1. Navigate to the project directory:
cd mcp_code_executor
  1. Install the Node.js dependencies:
npm install
  1. Build the project:
npm run build

Configuration

To configure the MCP Code Executor server, add the following to your MCP servers configuration file:

{
  "mcpServers": {
    "mcp-code-executor": {
      "command": "node",
      "args": [
        "/path/to/mcp_code_executor/build/index.js" 
      ],
      "env": {
        "CODE_STORAGE_DIR": "/path/to/code/storage",
        "CONDA_ENV_NAME": "your-conda-env"
      }
    }
  }
}

Replace the placeholders:

  • /path/to/mcp_code_executor with the absolute path to where you cloned this repository
  • /path/to/code/storage with the directory where you want the generated code to be stored
  • your-conda-env with the name of the Conda environment you want the code to run in

Usage

Once configured, the MCP Code Executor will allow LLMs to execute Python code by generating a file in the specified CODE_STORAGE_DIR and running it within the Conda environment defined by CONDA_ENV_NAME.

LLMs can generate and execute code by referencing this MCP server in their prompts.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

相关推荐

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • 林乔安妮
  • A fashion stylist GPT offering outfit suggestions for various scenarios.

  • 1Panel-dev
  • 💬 MaxKB is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • open-webui
  • User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

  • Dhravya
  • Collection of apple-native tools for the model context protocol.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • GLips
  • MCP server to provide Figma layout information to AI coding agents like Cursor

  • activepieces
  • AI Agents & MCPs & AI Workflow Automation • (280+ MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

    Reviews

    3 (1)
    Avatar
    user_7Yto4dGI
    2025-04-17

    As a dedicated user of mcp_code_executor, I can't praise it enough. This tool, created by bazinga012, is a must-have for anyone who works with code execution. It's reliable, efficient, and simplifies the entire process. The seamless integration and user-friendly interface make it my go-to choice for all my coding needs. Highly recommend checking it out!