Jupyter MCP Server

Compatible with any Jupyter deployment (local, JupyterHub, ...) and with [Datalayer](https://datalayer.ai) hosted Notebooks.

Remote serverstreamable-httpPython

What is the Jupyter MCP server?

Jupyter becomes available to MCP clients through the jupyter mcp server. Compatible with any Jupyter deployment (local, JupyterHub, ...) and with Datalayer hosted Notebooks.

What Jupyter does

Compatible with any Jupyter deployment (local, JupyterHub, ...) and with Datalayer hosted Notebooks.

Tools it exposes

Once connected, the assistant can call these 14 tools directly:

  • list_files — List files and directories in the Jupyter server's file system
  • list_kernels — List all available and running kernel sessions on the Jupyter server
  • launch_sandbox — Launch a code sandbox (eval/docker/jupyter/datalayer/kaggle/colab/monty/modal) as an alternative execution backend for execute_code. Supports variant-specific
  • list_sandboxes — List launched code sandboxes and their state (active flag, variant, status, and selected code sandbox options). Requires the jupyter_mcp_sandboxes extension
  • use_sandbox — Select or clear the active sandbox used by execute_code, enabling dynamic routing between kernel-backed and sandbox-backed execution. Requires the
  • terminate_sandbox — Stop and unregister a launched code sandbox. Requires the jupyter_mcp_sandboxes extension
  • connect_to_jupyter — Connect to a Jupyter server dynamically without restarting the MCP server. *Not available when running as Jupyter extension. Useful for switching servers
  • use_notebook — Connect to a notebook file, create a new one, or switch between notebooks
  • list_notebooks — List all notebooks available on the Jupyter server and their status
  • restart_notebook — Restart the kernel for a specific managed notebook
  • unuse_notebook — Disconnect from a specific notebook and release its resources
  • read_notebook — Read notebook cells source content with brief or detailed format options
  • read_cell — Read the full content (Metadata, Source and Outputs) of a single cell
  • insert_cell — Insert a new code or markdown cell at a specified position

Installing the jupyter mcp server

The server is distributed via PyPI as jupyterlab, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 8 environment variables: JUPYTER_URL, JUPYTER_TOKEN, ALLOW_IMG_OUTPUT, CODE_SANDBOX_URL, CODE_SANDBOX_TOKEN, DOCUMENT_URL, DOCUMENT_TOKEN, SANDBOX_VARIANT. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Jupyter sits in that group, and the shape of its toolset — list_files, list_kernels, launch_sandbox among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This is a hosted server — you point your client at an endpoint rather than running a local process, so there is nothing to keep updated on your machine.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • With 14 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use Jupyter.
  • Maintained by datalayer, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the jupyter mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
list_filesList files and directories in the Jupyter server's file system.
list_kernelsList all available and running kernel sessions on the Jupyter server.
launch_sandboxLaunch a code sandbox (eval/docker/jupyter/datalayer/kaggle/colab/monty/modal) as an alternative execution backend for execute_code. Supports variant-specific options including GPU flavor for supported backends. Requires
list_sandboxesList launched code sandboxes and their state (active flag, variant, status, and selected code sandbox options). Requires the jupyter_mcp_sandboxes extension.
use_sandboxSelect or clear the active sandbox used by execute_code, enabling dynamic routing between kernel-backed and sandbox-backed execution. Requires the jupyter_mcp_sandboxes extension.
terminate_sandboxStop and unregister a launched code sandbox. Requires the jupyter_mcp_sandboxes extension.
connect_to_jupyterConnect to a Jupyter server dynamically without restarting the MCP server. *Not available when running as Jupyter extension. Useful for switching servers dynamically or avoiding hardcoded configuration.* [Read more](http
use_notebookConnect to a notebook file, create a new one, or switch between notebooks.
list_notebooksList all notebooks available on the Jupyter server and their status
restart_notebookRestart the kernel for a specific managed notebook.
unuse_notebookDisconnect from a specific notebook and release its resources.
read_notebookRead notebook cells source content with brief or detailed format options.
read_cellRead the full content (Metadata, Source and Outputs) of a single cell.
insert_cellInsert a new code or markdown cell at a specified position.

How to install the Jupyter MCP server

**On Linux:**

```json
{
  "mcpServers": {
    "jupyter": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "JUPYTER_URL",
        "-e", "JUPYTER_TOKEN",
        "-e", "ALLOW_IMG_OUTPUT",
        "--network=host",
        "datalayer/jupyter-mcp-server:latest"
      ],
      "env": {
        "JUPYTER_URL": "http://localhost:8888",
        "JUPYTER_TOKEN": "MY_TOKEN",
        "ALLOW_IMG_OUTPUT": "true"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
JUPYTER_URLEndpoint or connection string the server talks to.Yes
JUPYTER_TOKENCredential the server authenticates with.Yes
ALLOW_IMG_OUTPUTConfiguration value read at startup.Optional
CODE_SANDBOX_URLEndpoint or connection string the server talks to.Yes
CODE_SANDBOX_TOKENCredential the server authenticates with.Yes
DOCUMENT_URLEndpoint or connection string the server talks to.Yes
DOCUMENT_TOKENCredential the server authenticates with.Yes
SANDBOX_VARIANTConfiguration value read at startup.Optional

Example prompts to try

  • Use Jupyter to list files.
  • Use Jupyter to list kernels.
  • Use Jupyter to launch sandbox.

Frequently asked questions

It connects Jupyter to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (list_files, list_kernels, launch_sandbox, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Jupyter directly.