← Back to directory
J

Jupyter MCP Server

Community
An MCP server for AI to connect and manage Jupyter Notebooks in real time
GitHub source repository ↗
★ 1.3k Stars Category · Dev Tools Very popular
65FMRS · C

Jupyter MCP Server is a mature, well-documented open-source MCP server maintained by Datalayer, focused on letting AI agents operate Jupyter Notebooks in real time. Its strengths are multimodal output, multi-notebook support, execution that adapts from cell output feedback, and the ability to route execution to a dozen-plus cloud sandbox backends. The main caveats are that agents can execute arbitrary code, so tokens and network exposure must be managed carefully, and that code-sandboxes plus the mcp SDK have strict version pairing requirements that should be checked before upgrading.

Reliability
10/20
Security and permissions
12/20
Maintenance
13/20
Documentation
15/20
Setup experience
15/20
Read the FMRS scoring method →

Jupyter MCP Server is an MCP server developed by Datalayer (BSD 3-Clause licensed) that lets AI clients connect to and manage Jupyter Notebooks in real time. It offers live view of notebook changes, smart execution that adjusts from cell output feedback, full notebook context awareness, multimodal output support (images, plots, text), and multi-notebook switching. It works with any MCP client (Claude Desktop, Cursor, Windsurf, and more) and with any Jupyter deployment such as a local JupyterLab or JupyterHub. Through the optional jupyter_mcp_sandboxes extension, code execution can be routed to sandbox engines including Datalayer, Kaggle, Google Colab, Modal, Daytona, E2B, CoreWeave and Cloudflare. The project also ships JupyterLab integration (enabled by default), a jupyter-cite prompt, OAuth 2.1 sign-in, and OpenTelemetry-based observability.

Tools

launch_sandbox
Launch a code sandbox (requires the optional jupyter_mcp_sandboxes extension).
list_sandboxes
List the available code sandboxes (requires the optional jupyter_mcp_sandboxes extension).
use_sandbox
Select and switch to a given code sandbox (requires the optional jupyter_mcp_sandboxes extension).
terminate_sandbox
Terminate a given code sandbox (requires the optional jupyter_mcp_sandboxes extension).
notebook_run-all-cells
Run all cells in the notebook (JupyterLab integration tool exposed by default via jupyter-mcp-tools).
notebook_get-selected-cell
Get the currently selected cell (JupyterLab integration tool exposed by default via jupyter-mcp-tools).

Setup

  1. Set up the environment: pip install jupyterlab jupyter-collaboration jupyter-mcp-tools ipykernel.
  2. Start JupyterLab, e.g. jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0.
  3. Verify collaboration works: open a notebook in JupyterLab, edit any cell, and confirm the tab indicator changes from “×” to “●” automatically.
  4. Configure your MCP client. For a quick start use uvx (uv 0.6.14 or higher): set command to uvx, args to ["jupyter-mcp-server@latest"], and provide the environment variables JUPYTER_URL, JUPYTER_TOKEN and ALLOW_IMG_OUTPUT.
  5. For production, use the Docker image datalayer/jupyter-mcp-server:latest; use host.docker.internal on macOS/Windows and --network=host on Linux.
  6. For sandbox lifecycle tools or non-jupyter-server sandbox variants, install the extension: pip install jupyter_mcp_sandboxes.
claude_desktop_config.json
{
  "mcpServers": {
    "jupyter": {
      "command": "uvx",
      "args": ["jupyter-mcp-server@latest"],
      "env": {
        "JUPYTER_URL": "http://localhost:8888",
        "JUPYTER_TOKEN": "MY_TOKEN",
        "ALLOW_IMG_OUTPUT": "true"
      }
    }
  }
}

Fit and risk

Best for

  • Users already running a local JupyterLab or JupyterHub who want to attach an AI agent
  • Data science and machine learning workflows needing multimodal output (images, plots, text)
  • Teams wanting to extend code execution from local to cloud sandboxes such as Datalayer, Kaggle or Google Colab
  • Users who want notebook sessions to keep running after the agent disconnects

Not for

  • Users who do not run any Jupyter Server and do not need Jupyter Notebooks
  • Users whose LLM or client cannot handle multimodal image output and who do not want to disable ALLOW_IMG_OUTPUT
  • Users who need cloud sandbox variants without network access or the required credentials

Required permissions

  • Access to the Jupyter Server URL (JUPYTER_URL / DOCUMENT_URL / CODE_SANDBOX_URL)
  • The Jupyter access token (JUPYTER_TOKEN, or DOCUMENT_TOKEN and CODE_SANDBOX_TOKEN separately)
  • Permission to read and write notebook documents and execute code
  • Vendor credentials when using cloud sandboxes (e.g. DAYTONA_API_KEY, E2B_API_KEY, CWSANDBOX_API_KEY, CLOUDFLARE_SANDBOX_API_URL / CLOUDFLARE_SANDBOX_API_KEY, Kaggle credentials, Modal credentials)
  • Optional OAuth 2.1 scopes with Datalayer hosting: notebooks:read, notebooks:write, code:execute, data:read

Risks and side effects

  • The AI agent can execute arbitrary code in notebooks, which may lead to data leakage, data corruption or resource abuse
  • A leaked token grants the same Jupyter access as the token itself
  • Starting JupyterLab with --ip 0.0.0.0 by default widens the network exposure surface
  • Cloud sandboxes incur vendor-side costs and may run beyond local resource limits
  • A version mismatch between jupyter-mcp-server and code-sandboxes fails on first execution with Unknown sandbox variant: jupyter

Troubleshooting

  1. Make sure the port in JUPYTER_URL matches the port used in the jupyter lab command
  2. Check that JUPYTER_TOKEN is correct, or set DOCUMENT_TOKEN and CODE_SANDBOX_TOKEN separately
  3. Confirm jupyter-collaboration is installed and that the unsaved indicator changes to “●” automatically
  4. If your LLM does not support multimodal input, set ALLOW_IMG_OUTPUT to false
  5. With Docker, use host.docker.internal on macOS/Windows and --network=host on Linux
  6. Run pytest tests/ to verify the server; use TEST_MCP_SERVER and TEST_JUPYTER_SERVER to toggle test modes
  7. Match versions per the table: jupyter-mcp-server >= 1.5.0 with code-sandboxes >= 1.1.1, and jupyter-mcp-server < 1.5.0 with code-sandboxes <= 1.0.9
  8. jupyter-mcp-server >= 2.0.0 requires mcp >= 2 while older versions require mcp < 2; an environment with another package still pinning mcp<2 must stay on jupyter-mcp-server<2

Use cases

Let an AI assistant read and modify a running Jupyter Notebook in real time
Have an AI run a data science workflow step by step (data cleaning, feature engineering, training, evaluation)
Switch between multiple notebooks and manage their kernels
Produce and inspect visual outputs including images and plots
Scale code execution to cloud GPU environments through sandbox variants

Supported clients

Claude DesktopFull support
CursorFull support
WindsurfFull support
VS CodeFull support
ClineFull support
Claude CodeFull support