LabscoMCP early access ↗
datalayerMCP SERVER · OFFICIAL PROJECT

Jupyter MCP Server

Let an agent work in a live Jupyter notebook — insert and run cells, read the outputs including images, and switch between notebooks and execution backends.

by datalayer ↗Editors, Terminals & Local Dev Environment✓ Official

LABSCO SUMMARY

The notebook stays the workspace; the agent just gets to use it.

Because it drives a live kernel rather than a copy of the file, a failed cell's output is available for the next attempt — which is the difference between an agent that iterates and one that guesses twice and stops.

What it is

A server that connects to a running Jupyter server and drives notebooks in real time. Cell changes appear as they happen, and failed cells feed their output back so the next attempt is informed by what actually broke.

What you get

  • Cell operations: read_cell, insert_cell, delete_cell, move_cell, clear_cell_output, overwrite_cell_source, and edit_cell_source for surgical find-and-replace without a full rewrite
  • Execution: execute_cell with a timeout and multimodal output including images, insert_execute_code_cell to add and run in one step, and execute_code to run directly in the active backend with magic and shell commands
  • Multiple notebooks: use_notebook connects to, creates or switches between notebooks, with list_notebooks, read_notebook, restart_notebook and unuse_notebook
  • Server surfaces: list_files, list_kernels, and connect_to_jupyter for switching servers without restarting the MCP server
  • Code sandboxes as an alternative execution backend: launch_sandbox, list_sandboxes, use_sandbox and terminate_sandbox, covering variants from a local jupyter-server through Daytona, e2b, CoreWeave, Cloudflare, Kaggle, Google Colab and Modal
  • In JupyterLab mode, extra commands surface as tools — notebook_run-all-cells and notebook_get-selected-cell are enabled by default
  • A jupyter-cite prompt for citing specific cells from a notebook, the way @ works in a coding IDE
  • Built-in hooks with OpenTelemetry integration for tracing tool calls and kernel executions

Requirements

A Jupyter you already run, local or JupyterHub — no account needed. Install the environment with pip install jupyterlab jupyter-collaboration ipykernel jupyter-mcp-tools, then start JupyterLab with a token, for example jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0. Real-time collaboration must be working: type in a cell and the tab's unsaved marker should turn into a saved dot on its own within a few seconds. Configure the client with uvx jupyter-mcp-server@latest and set JUPYTER_URL and JUPYTER_TOKEN, or run the published Docker image. Pin code-sandboxes to match: 1.1.1 or newer alongside jupyter-mcp-server 1.5.0 or newer, since the sandbox variant was renamed and an older server with a newer sandbox package fails on first execution. Datalayer also hosts the same server at https://mcp.datalayer.run/mcp with OAuth 2.1 sign-in and scoped approvals.

Setup effort

Follow the published steps — pip install jupyterlab jupyter-collaboration jupyter-mcp-tools ipykernel