Skip to content
Use case

Run code safely in a sandbox from your AI assistant

Models write code well but cannot be sure it works until it runs. A code execution MCP server gives the assistant an isolated place to do that: a container, a microVM, or a hosted runtime where it can run Python or JavaScript, install packages, and read the output. That makes data analysis, chart generation, and quick experiments far more reliable, because the model checks its own answer. Isolation matters here. Prefer servers that run in a disposable sandbox with no access to your home directory or credentials, and set time and memory limits.

55 matching serversRanked by trust score
Try it

Example prompts

Paste one into Claude, Cursor, or any MCP client once a matching server is installed.

  • Load this CSV, compute the monthly averages, and plot them as a line chart.

  • Write a Python function that parses these log lines and test it on the samples.

  • Benchmark these two sorting approaches on a list of one million integers.

Top matches

MCP servers for code sandboxes

The 12 strongest of 55 matching servers. Servers that name the topic directly come first.

  • Trust score 47 of 100, Fair

    🪐 🔧 Model Context Protocol (MCP) Server for Jupyter.

    1.3K stars—/wk weekly downloads— tools
  • Trust score 32 of 100, Limited

    Code Sandbox API

    by br0ski777 · TypeScript

    Execute Python, JavaScript, SQL code in a sandbox. x402 micropayment.

    RegistryRemote
    0 stars—/wk weekly downloads— tools
  • Python Interpreter logo
    Trust score 30 of 100, Limited

    A Python-based execution tool that mimics a Jupyter notebook environment. It accepts code snippets, executes them, and maintains state…

    16 stars—/wk weekly downloads— tools
  • Trust score 25 of 100, Limited

    jupyter-mcp-server

    by chengjiale150 · Jupyter Notebook

    A powerful MCP server for AI-driven Jupyter Notebook management and execution

    Registry
    9 stars—/wk weekly downloads— tools
  • Trust score 67 of 100, Good

    Legwork

    by kumarganduri · Python

    Lets your AI find open-source tools on GitHub and install them as sandboxed MCP tools.

    Registry
    4 stars—/wk weekly downloads— tools
  • Trust score 55 of 100, Fair

    Run your coding agent's commands on machines you own: a sandboxed job slot, not an SSH login.

    Registry
    — stars—/wk weekly downloads— tools
  • Trust score 55 of 100, Fair

    Act for a person on websites: sandboxed browser, phone approvals, saved logins, scheduled plans.

    Registry
    — stars—/wk weekly downloads— tools
  • Trust score 55 of 100, Fair

    Offline local-LLM helper: delegate simple errands to a local model, with sandboxed file tools.

    Registry
    — stars—/wk weekly downloads— tools
  • Trust score 55 of 100, Fair

    Read-only access to a self-hosted GeoLens spatial catalog: datasets, features, maps, sandboxed SQL.

    Registry
    — stars—/wk weekly downloads— tools
  • Trust score 55 of 100, Fair

    Rivet

    Unknown author

    Manage Rivet Cloud namespaces and actors, run Code Mode, and open the Rivet Actor Inspector.

    RegistryRemote
    — stars—/wk weekly downloads— tools
Setup

How to set it up

  1. Pick a server. Code Interpreter Agent by Nova (CIVAI) is the strongest match. Check its tools and the API keys it needs on its page.
  2. Copy the config for your client. Open the install guide for Claude Desktop, Claude Code, Cursor, or VS Code, and paste the generated block into the client's config file. The client guides show where each config file lives.
  3. Restart and try a prompt. Restart the client so it loads the server, then paste one of the example prompts above.
FAQ

Questions about code sandboxes

What is the best MCP server for code sandboxes?

Code Interpreter Agent by Nova (CIVAI) ranks first here with a trust score of 52/100, followed by Mathematical Code Execution (52) and Jupyter Mcp Server (47). Servers that name the topic directly come first, each group ordered by the public trust score, which nobody can pay for. See the methodology for how it is calculated.

How do I set up Code Interpreter Agent by Nova (CIVAI) in Claude or Cursor?

Open the install guide for Claude Desktop or Cursor, copy the generated config into the client's config file, add any API keys the server asks for, then restart the client. The client guides cover VS Code, Claude Code, Windsurf, and more.

Can I use a hosted server instead of installing one locally?

4 of the 12 servers listed here can connect remotely over HTTP, so there is nothing to run on your machine: Code Interpreter Agent by Nova (CIVAI), Mathematical Code Execution, Code Sandbox API, and others. The rest run locally over stdio.

How many MCP servers can do this?

MCPpedia lists 55 published servers that match this use case. This page shows the 12 strongest matches; thin and duplicate listings are left out.

Keep exploring
All use cases