Jupyter MCP Server

Read, edit and run Jupyter notebooks and their kernels from an MCP client

By Datalayer Python Remote (hosted) · Streamable HTTPLocal · stdio Data and analyticsDeveloper tools

77 popularity score ★ 1.3k ↓ 56k/mo

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add --transport http jupyter https://mcp.datalayer.run/mcp
Claude (desktop and web)Settings → Connectors → Add custom connector
https://mcp.datalayer.run/mcp
ChatGPTSettings → Apps → Advanced → Developer mode, then Create app
https://mcp.datalayer.run/mcp
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "jupyter": {
      "url": "https://mcp.datalayer.run/mcp"
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "jupyter": {
      "type": "http",
      "url": "https://mcp.datalayer.run/mcp"
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.jupyter]
url = "https://mcp.datalayer.run/mcp"
Gemini CLITerminal
gemini mcp add --scope user --transport http jupyter https://mcp.datalayer.run/mcp
Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add jupyter -- uvx jupyter-mcp-server@latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "jupyter": {
      "command": "uvx",
      "args": [
        "jupyter-mcp-server@latest"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "jupyter": {
      "command": "uvx",
      "args": [
        "jupyter-mcp-server@latest"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "jupyter": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "jupyter-mcp-server@latest"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.jupyter]
command = "uvx"
args = ["jupyter-mcp-server@latest"]
Gemini CLITerminal
gemini mcp add --scope user jupyter uvx -- jupyter-mcp-server@latest
Local (container)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add jupyter -- docker run -i --rm -e JUPYTER_URL -e JUPYTER_TOKEN -e ALLOW_IMG_OUTPUT datalayer/jupyter-mcp-server:latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "jupyter": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "JUPYTER_URL",
        "-e",
        "JUPYTER_TOKEN",
        "-e",
        "ALLOW_IMG_OUTPUT",
        "datalayer/jupyter-mcp-server:latest"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "jupyter": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "JUPYTER_URL",
        "-e",
        "JUPYTER_TOKEN",
        "-e",
        "ALLOW_IMG_OUTPUT",
        "datalayer/jupyter-mcp-server:latest"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "jupyter": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "JUPYTER_URL",
        "-e",
        "JUPYTER_TOKEN",
        "-e",
        "ALLOW_IMG_OUTPUT",
        "datalayer/jupyter-mcp-server:latest"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.jupyter]
command = "docker"
args = ["run", "-i", "--rm", "-e", "JUPYTER_URL", "-e", "JUPYTER_TOKEN", "-e", "ALLOW_IMG_OUTPUT", "datalayer/jupyter-mcp-server:latest"]
Gemini CLITerminal
gemini mcp add --scope user jupyter docker -- run -i --rm -e JUPYTER_URL -e JUPYTER_TOKEN -e ALLOW_IMG_OUTPUT datalayer/jupyter-mcp-server:latest

Settings 11

JUPYTER_URL Optional: Address of the Jupyter server for both documents and kernels; defaults to http://localhost:8888 (use host.docker.internal from Docker on macOS and Windows).
JUPYTER_TOKEN Optional: Token of that Jupyter server, used for documents and kernels alike.
ALLOW_IMG_OUTPUT Optional: Return image outputs to the client; set false for models without image input.
DOCUMENT_ID Optional: Notebook path, relative to where Jupyter started, to open by default.
DOCUMENT_URL Optional: Separate address for notebook storage when it differs from the kernel server.
DOCUMENT_TOKEN Optional: Token for the document server when it differs.
CODE_SANDBOX_URL Optional: Separate address for code execution, such as a JupyterHub or Datalayer runtime.
CODE_SANDBOX_TOKEN Optional: Token for the code execution server when it differs.
SANDBOX_VARIANT Optional: Execution engine: jupyter-server (default), datalayer, kaggle, google-colab, modal, daytona, e2b, coreweave, cloudflare or monty.
DOCUMENT_PROVIDER Optional: Where notebooks live: jupyter (default) or datalayer; replaces the deprecated PROVIDER.
E2B_API_KEY Optional: API key when SANDBOX_VARIANT is e2b; other engines take their own keys such as DAYTONA_API_KEY or CWSANDBOX_API_KEY.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

Jupyter MCP Server connects an MCP client to a running Jupyter server (JupyterLab, a plain Jupyter Server or JupyterHub) and works on its notebooks live, through Jupyter's real-time collaboration layer. The assistant can browse the server's files, open or create notebooks, read cells, insert, move, edit and delete them, clear outputs, restart kernels and execute cells or loose code, getting text, image and plot outputs back. Changes show up in an open JupyterLab tab as they happen.

Code normally runs on the Jupyter server's own kernels. A separate setting, SANDBOX_VARIANT, sends execution to another engine instead: Datalayer, Kaggle, Google Colab, Modal, Daytona, E2B, CoreWeave, Cloudflare or the local Monty interpreter, each with its own optional package and credentials. With the optional jupyter_mcp_sandboxes extension it also gains tools to launch, pick and stop such sandboxes. In JupyterLab mode (on by default) it can expose JupyterLab commands as extra tools, and it ships one prompt, jupyter_cite, for quoting cells into a conversation.

It is made by Datalayer, a company that sells hosted notebooks, and runs locally over stdio or as Streamable HTTP, or inside Jupyter Server as an extension. Datalayer also hosts it at https://mcp.datalayer.run/mcp with browser sign-in. Version 2 runs on the MCP Python SDK 2, so environments that pin mcp<2 must stay on the 1.x line; the old --provider option and PROVIDER variable are deprecated in favour of --document-provider and DOCUMENT_PROVIDER.

What it needs

To run it yourselfPythonorDocker

A running Jupyter server you can reach (JupyterLab with jupyter-collaboration, jupyter-mcp-tools and ipykernel installed for the quick start, or JupyterHub), its URL and token. Python with uv 0.6.14 or later for uvx, or Docker. Cloud sandbox engines need their extra package and an account or API key with that provider; the hosted endpoint needs a Datalayer account.

Limits

Real-time collaboration must be working in JupyterLab or the server cannot follow notebook changes. Sandbox lifecycle tools and every non-default sandbox engine need the separate jupyter_mcp_sandboxes extension. The code-sandboxes package version must match the server's (1.5.0 and later need code-sandboxes 1.1.1 or later), or execution fails with an unknown sandbox variant error. Execution times out after 120 seconds by default, capped at 3600. Set ALLOW_IMG_OUTPUT to false for models that cannot read images.

Who it suits

Suits data scientists and developers who already keep work in Jupyter and want an assistant to edit and run notebooks next to them, locally or on JupyterHub, with no account needed. It runs arbitrary code on whatever kernel or sandbox it points at, so it fits people who are comfortable granting that. Pick the hosted Datalayer endpoint if you want runs to continue after the client disconnects or need GPUs, accepting a vendor account. If you only need to read notebook files on disk without a live Jupyter server, a plain file-system server is lighter.

Tools 24

connect_to_jupyter
Switch to a Jupyter server at runtime with a given URL and token
list_files
List files and folders on the Jupyter server recursively
list_kernels
List the kernels available on the Jupyter server
use_notebook
Open or create a notebook and make it the active one
list_notebooks
Show the notebooks opened in this session
read_notebook
Return each cell's index, type, source and execution count
restart_notebook
Restart a notebook's kernel
unuse_notebook
Release a notebook and its resources
insert_cell
Add a cell at a given position in the active notebook
read_cell
Return one cell's content as text
edit_cell_source
Find and replace text inside one cell
overwrite_cell_source
Replace a cell's whole source
move_cell
Move a cell to another index
delete_cell
Remove cells, optionally returning their source
clear_cell_output
Wipe one code cell's outputs and execution count
execute_cell
Run a cell with a timeout and return its outputs
insert_execute_code_cell
Add a code cell and run it straight away
execute_code
Run code on the kernel or sandbox without saving it to the notebook
launch_sandbox
Start a code sandbox to use in place of a kernel (extension)
list_sandboxes
List the sandboxes launched so far (extension)
use_sandbox
Choose which sandbox execute_code runs on (extension)
terminate_sandbox
Stop a launched sandbox (extension)
notebook_run-all-cells
JupyterLab command exposed as a tool: run every cell (JupyterLab mode)
notebook_get-selected-cell
JupyterLab command exposed as a tool: get the cell selected in the UI (JupyterLab mode)

Similar servers