Best MCP Servers for Code Execution (2026)

The best MCP servers for code execution — let AI agents run code, shell commands, and scripts in sandboxed environments and get results back.

Top 10 · ranked by installs, upvotes, stars and views · refreshed hourly

  1. MCP Run Python logo

    #1 MCP Run Python

    pydantic/pydantic-ai

    Why it’s hereMost popular in this category on AllMCPs

    Run Python code in a secure sandbox via MCP tool calls

    Upvotes: 0Installs: 0GitHub stars: 20k
    Install
  2. Why it’s hereCommunity pick

    Sandboxed runtime for programming languages and WASI binaries. Works in the browser, on your server, or via MCP.

    Upvotes: 0Installs: 0GitHub stars: 775
    Install
  3. Why it’s hereCommunity pick

    Enhanced Godot 4.5-4.7 MCP: headless+editor+bridge, secure GDScript sandbox, closed-loop AI dev.

    Upvotes: 0Installs: 0GitHub stars: 103
    Install
  4. MCP Server logo

    #4 MCP Server

    mavdol/capsule

    Why it’s hereCommunity pick

    Run untrusted Python/JavaScript code in WebAssembly sandboxes.

    Upvotes: 0Installs: 0GitHub stars: 299
    Install
  5. Why it’s hereCommunity pick

    Containerized environments for coding agents. Multiple agents can work independently, isolated in fresh containers and git branches. No conflicts, many experiments. Full execution history, terminal access to agent environments, git workflow. Any agent/model/infra stack.

    Upvotes: 0Installs: 0GitHub stars: 4.1k
    Install
  6. Why it’s hereCommunity pick

    Connect AI coding agents to MATLAB. Run code, tests, and analysis via MCP.

    Upvotes: 0Installs: 0GitHub stars: 1.7k
    Install
  7. Edict logo

    #7 Edict

    Sowiedu

    Why it’s hereCommunity pick

    Agent-first programming language: agents produce JSON AST, the compiler validates, type-checks, effect-checks, verifies contracts via Z3/SMT, and compiles to WASM. 19 MCP tools for the full compile-and-execute loop.

    Upvotes: 0Installs: 0GitHub stars: 13
    Install
  8. Why it’s hereCommunity pick

    Securely run LLM-generated code in isolated containers across 7 languages and 4 backends.

    Upvotes: 0Installs: 0GitHub stars: 1.1k
    Install
  9. Why it’s hereCommunity pick

    Execute any LLM-generated code in a secure and scalable sandbox environment and create your own MCP tools using JavaScript or Python, with full support for NPM and PyPI packages

    Upvotes: 0Installs: 0GitHub stars: 47
    Install
  10. Why it’s hereCommunity pick

    Linux microVM sandboxes for AI agents: run commands, files, processes, pause and wake.

    Upvotes: 0Installs: 0GitHub stars: 1
    Install

Which Code Execution MCP server should you use?

When choosing a Model Context Protocol server for Code Execution, select verified or official listings if you need strict API security guarantees. For rapid local dev testing with Claude or Cursor, community-maintained tools offer zero-setup configuration blocks ready to copy-paste.

Frequently asked questions about Code Execution MCP servers

What is the best MCP server for running code?

Sandboxed code-execution servers that support Python and JavaScript are the most installed. This page ranks code-execution MCP servers by real usage.

Is it safe to let an AI agent execute code?

Only inside a sandbox. Prefer servers that run code in an isolated container or ephemeral environment, never with direct access to your host, credentials, or production data.

Which languages do code-execution MCP servers support?

Python and JavaScript are the most common; several also handle shell commands or arbitrary languages via a container. Check each listing for the exact runtime.