Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

ยฉ 2026 TrackMCP. All rights reserved.

Built with โค๏ธ by Krishna Goyal

    Jupyter Mcp Server

    ๐Ÿช โœจ Model Context Protocol (MCP) Server for Jupyter. Python-based implementation. Trusted by 700+ developers. Trusted by 700+ developers.

    741 stars
    Python
    Updated Nov 4, 2025
    ai
    jupyter
    mcp
    mcp-server
    tools

    Table of Contents

    • ๐Ÿ“– Table of Contents
    • ๐Ÿš€ Key Features
    • ๐Ÿ”ง MCP Overview
    • ๐Ÿ”ง Tools Overview
    • Server and Runtime Management Tools
    • Multi-Notebook Management Tools
    • Cell Operations and Execution Tools
    • JupyterLab Integration
    • ๐Ÿ“ Prompt Overview
    • ๐Ÿ Getting Started
    • 1. Set Up Your Environment
    • 2. Start JupyterLab
    • 3. Configure Your Preferred MCP Client
    • ๐Ÿงฉ Sandbox Variants
    • 1. Jupyter Server
    • 2. JupyterHub
    • 3. Datalayer
    • 4. Kaggle
    • 5. Google Colab
    • 6. Monty
    • 7. Modal
    • ๐Ÿงช Testing
    • โœ… Best Practices
    • ๐Ÿค Contributing
    • Our Contributors
    • ๐Ÿ“š Resources

    Table of Contents

    • ๐Ÿ“– Table of Contents
    • ๐Ÿš€ Key Features
    • ๐Ÿ”ง MCP Overview
    • ๐Ÿ”ง Tools Overview
    • Server and Runtime Management Tools
    • Multi-Notebook Management Tools
    • Cell Operations and Execution Tools
    • JupyterLab Integration
    • ๐Ÿ“ Prompt Overview
    • ๐Ÿ Getting Started
    • 1. Set Up Your Environment
    • 2. Start JupyterLab
    • 3. Configure Your Preferred MCP Client
    • ๐Ÿงฉ Sandbox Variants
    • 1. Jupyter Server
    • 2. JupyterHub
    • 3. Datalayer
    • 4. Kaggle
    • 5. Google Colab
    • 6. Monty
    • 7. Modal
    • ๐Ÿงช Testing
    • โœ… Best Practices
    • ๐Ÿค Contributing
    • Our Contributors
    • ๐Ÿ“š Resources

    Documentation

    Datalayer

    Become a Sponsor

    New in v1.1.0: We are not supporting external Sandboxes (Datalayer, Kaggle, Monty, Google Colab, Modal...).

    Setup details on this page

    Join the conversation in our Community page - your feedback will help us prioritize features and ensure these integrations work seamlessly for your needs.

    ๐Ÿ“– Table of Contents

    • Key Features
    • MCP Overview
    • Getting Started
    • Sandbox Variants
    • Best Practices
    • Contributing
    • Resources

    ๐Ÿš€ Key Features

    • โšก Real-time control: Instantly view notebook changes as they happen.
    • ๐Ÿ” Smart execution: Automatically adjusts when a cell run fails thanks to cell output feedback.
    • ๐Ÿง  Context-aware: Understands the entire notebook context for more relevant interactions.
    • ๐Ÿ“Š Multimodal support: Support different output types, including images, plots, and text.
    • ๐Ÿ“š Multi-notebook support: Seamlessly switch between multiple notebooks.
    • ๐ŸŽจ JupyterLab integration: Enhanced UI integration like automatic notebook opening.
    • ๐Ÿค MCP-compatible: Works with any MCP client, such as Claude Desktop, Cursor, Windsurf, and more.
    • ๐Ÿ” Observability: Built-in hook system with OpenTelemetry integration for tracing tool calls and kernel executions.

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

    ๐Ÿ”ง MCP Overview

    ๐Ÿ”ง Tools Overview

    The server provides a rich set of tools for interacting with Jupyter notebooks, categorized as follows.

    For more details on each tool, their parameters, and return values, please refer to the official Tools documentation.

    Server and Runtime Management Tools

    NameDescription
    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 sandbox runtime (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 the jupyter_mcp_sandboxes extension.
    list_sandboxesList launched sandbox runtimes and their state (active flag, variant, status, and selected runtime 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 sandbox runtime. 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

    Multi-Notebook Management Tools

    NameDescription
    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.

    Cell Operations and Execution Tools

    NameDescription
    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.
    delete_cellDelete a cell at a specified index.
    move_cellMove a cell from one position to another within a notebook.
    clear_cell_outputClear the outputs and execution count of a single code cell.
    overwrite_cell_sourceOverwrite the source code of an existing cell.
    edit_cell_sourceApply surgical find-and-replace edits to a cell's source without full rewrite.
    execute_cellExecute a cell with timeout, supports multimodal output including images.
    insert_execute_code_cellInsert a new code cell and execute it in one step.
    execute_codeExecute code directly in the active backend (kernel by default, or active sandbox if selected), supports magic commands and shell commands. When the selected sandbox supports streaming execution, progress/output events are consumed and returned in order.

    JupyterLab Integration

    *Available only when JupyterLab mode is enabled. It is enabled by default.*

    When running in JupyterLab mode, Jupyter MCP Server integrates with jupyter-mcp-tools to expose additional JupyterLab commands as MCP tools. By default, the following tools are enabled:

    NameDescription
    notebook_run-all-cellsExecute all cells in the current notebook sequentially
    notebook_get-selected-cellGet information about the currently selected cell

    ๐Ÿ“š Learn how to customize additional tools

    You can now customize which tools from jupyter-mcp-tools are available using the allowed_jupyter_mcp_tools configuration parameter. This allows you to enable additional notebook operations, console commands, file management tools, and more.

    bash
    # Example: Enable additional tools via command-line
    jupyter lab --port 4040 --IdentityProvider.token MY_TOKEN --JupyterMCPServerExtensionApp.allowed_jupyter_mcp_tools="notebook_run-all-cells,notebook_get-selected-cell,notebook_append-execute,console_create"

    For the complete list of available tools and detailed configuration instructions, please refer to the Additional Tools documentation.

    ๐Ÿ“ Prompt Overview

    The server also supports prompt feature of MCP, providing a easy way for user to interact with Jupyter notebooks.

    NameDescription
    jupyter-citeCite specific cells from specified notebook (like @ in Coding IDE or CLI)

    For more details on each prompt, their input parameters, and return content, please refer to the official Prompt documentation.

    ๐Ÿ Getting Started

    For comprehensive setup instructionsโ€”including Streamable HTTP transport, running as a Jupyter Server extension and advanced configurationโ€”check out our documentation. Or, get started quickly with JupyterLab and STDIO transport here below.

    1. Set Up Your Environment

    bash
    pip install jupyterlab==4.4.1 jupyter-collaboration==4.0.2 jupyter-mcp-tools>=0.1.4 ipykernel pycrdt

    [!TIP]

    To confirm your environment is correctly configured:

    1. Open a notebook in JupyterLab

    1. Type some content in any cell (code or markdown)

    1. Observe the tab indicator: you should see an "ร—" appear next to the notebook name, indicating unsaved changes

    1. Wait a few secondsโ€”the "ร—" should automatically change to a "โ—" without manually saving

    This automatic saving behavior confirms that the real-time collaboration features are working properly, which is essential for MCP server integration.

    2. Start JupyterLab

    bash
    # Start JupyterLab on port 8888, allowing access from any IP and setting a token
    jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0

    [!NOTE]

    If you are running notebooks through JupyterHub instead of JupyterLab as above, refer to our JupyterHub setup guide.

    3. Configure Your Preferred MCP Client

    Next, configure your MCP client to connect to the server. We offer two primary methodsโ€”choose the one that best fits your needs:

    • **๐Ÿ“ฆ Using uvx (Recommended for Quick Start):** A lightweight and fast method using uv. Ideal for local development and first-time users.
    • **๐Ÿณ Using Docker (Recommended for Production):** A containerized approach that ensures a consistent and isolated environment, perfect for production or complex setups.

    ๐Ÿ“ฆ Using uvx (Quick Start)

    First, install uv:

    bash
    pip install uv
    uv --version
    # should be 0.6.14 or higher

    See more details on uv installation.

    Then, configure your client:

    json
    {
      "mcpServers": {
        "jupyter": {
          "command": "uvx",
          "args": ["jupyter-mcp-server@latest"],
          "env": {
            "JUPYTER_URL": "http://localhost:8888",
            "JUPYTER_TOKEN": "MY_TOKEN",
            "ALLOW_IMG_OUTPUT": "true"
          }
        }
      }
    }

    ๐Ÿณ Using Docker (Production)

    On macOS and Windows:

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

    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"
          }
        }
      }
    }

    [!TIP]

    1. Port Configuration: Ensure the port in your Jupyter URLs matches the one used in the jupyter lab command. For simplified config, set this in JUPYTER_URL.

    1. Server Separation: Use JUPYTER_URL when both services are on the same server, or set individual variables for advanced deployments. The different URL variables exist because some deployments separate notebook storage (DOCUMENT_URL) from kernel execution (RUNTIME_URL).

    1. Authentication: In most cases, document and runtime services use the same authentication token. Use JUPYTER_TOKEN for simplified config or set DOCUMENT_TOKEN and RUNTIME_TOKEN individually for different credentials.

    1. Notebook Path: The DOCUMENT_ID parameter specifies the path to the notebook the MCP client default to connect. It should be relative to the directory where JupyterLab was started. If you omit DOCUMENT_ID, the MCP client can automatically list all available notebooks on the Jupyter server, allowing you to select one interactively via your prompts.

    1. Image Output: Set ALLOW_IMG_OUTPUT to false if your LLM does not support mutimodel understanding.

    For detailed instructions on configuring various MCP clientsโ€”including Claude Desktop, VS Code, Cursor, Cline, and Windsurf โ€” see the Clients documentation.

    ๐Ÿงฉ Sandbox Variants

    By default, code executes through the code-sandboxes jupyter variant against

    a Jupyter Server (SANDBOX_VARIANT=jupyter). Setting SANDBOX_VARIANT to any

    other value uses another code-sandboxes

    engine via the sandbox's plain kernel client when the selected variant exposes

    one, so the same notebook tools can run code on additional backends.

    Sandbox features are provided by the optional jupyter_mcp_sandboxes extension.

    To expose sandbox lifecycle tools (launch_sandbox, list_sandboxes,

    use_sandbox, terminate_sandbox) or run any non-jupyter sandbox variant,

    install it with pip install jupyter_mcp_sandboxes.

    EngineSANDBOX_VARIANTExtra installKey variables
    Jupyter Server (default)jupyterโ€”JUPYTER_URL, JUPYTER_TOKEN
    JupyterHubjupyterโ€”RUNTIME_URL, RUNTIME_TOKEN
    Datalayerdatalayerjupyter-mcp-server[datalayer]RUNTIME_URL, RUNTIME_TOKEN, SANDBOX_ENVIRONMENT
    Kagglekagglejupyter-mcp-server[kaggle]Default batch mode: Kaggle credentials (KAGGLE_API_TOKEN or kaggle.json). Interactive mode: RUNTIME_URL + (KAGGLE_API_TOKEN/RUNTIME_TOKEN or RUNTIME_ID). Optional accelerator: SANDBOX_GPU.
    Google Colabcolabjupyter-mcp-server[colab]RUNTIME_URL, RUNTIME_ID, RUNTIME_PROXY_TOKEN
    Montymontyjupyter-mcp-server[monty]โ€”
    Modalmodaljupyter-mcp-server[modal]Modal credentials

    1. Jupyter Server

    The default engine. Point the server at a running Jupyter Server:

    bash
    pip install jupyter-mcp-server
    json
    "env": {
      "JUPYTER_URL": "http://localhost:8888",
      "JUPYTER_TOKEN": "MY_TOKEN"
    }

    2. JupyterHub

    JupyterHub uses the same jupyter engine, targeting a user's single-user server.

    Authenticate with a JupyterHub API token that has the access:servers scope:

    json
    "env": {
      "RUNTIME_URL": "https://your-jupyterhub.domain/user/",
      "RUNTIME_TOKEN": "your-jupyterhub-api-token",
      "DOCUMENT_URL": "https://your-jupyterhub.domain/user/",
      "DOCUMENT_TOKEN": "your-jupyterhub-api-token"
    }

    See the JupyterHub setup guide for full details.

    3. Datalayer

    Execute on the Datalayer cloud runtime with GPU support

    and persistence:

    bash
    pip install "jupyter-mcp-server[datalayer]"
    json
    "env": {
      "SANDBOX_VARIANT": "datalayer",
      "RUNTIME_URL": "https://prod1.datalayer.run",
      "RUNTIME_TOKEN": "your-datalayer-token",
      "SANDBOX_ENVIRONMENT": "python-cpu-env"
    }

    4. Kaggle

    Execute against Kaggle. By default, when no runtime URL/channels are provided,

    the server uses the transparent Kaggle batch path from code-sandboxes.

    If runtime values are provided, it uses Kaggle interactive kernel mode.

    bash
    pip install "jupyter-mcp-server[kaggle]"
    json
    "env": {
      "SANDBOX_VARIANT": "kaggle",
      "KAGGLE_API_TOKEN": "...",
      "SANDBOX_GPU": "T4"
    }

    To force interactive runtime mode, provide RUNTIME_URL and either:

    • KAGGLE_API_TOKEN / RUNTIME_TOKEN (create kernel), or
    • RUNTIME_ID / RUNTIME_CHANNELS_URL (connect existing kernel).

    Supported Kaggle accelerator values include:

    NvidiaTeslaP100, NvidiaTeslaT4, NvidiaTeslaT4Highmem, NvidiaL4,

    NvidiaL4X1, NvidiaTeslaA100, NvidiaH100, and NvidiaRtxPro6000.

    Aliases such as P100 and T4 are accepted.

    Note: Kaggle free-tier availability usually includes P100 and T4. Other

    accelerators are commonly restricted to specific competitions or internal

    Kaggle workloads.

    5. Google Colab

    Execute against a Google Colab runtime. Install the extra and provide the values

    from an active Colab notebook session:

    bash
    pip install "jupyter-mcp-server[colab]"
    json
    "env": {
      "SANDBOX_VARIANT": "colab",
      "RUNTIME_URL": "https://8080-m-s-kkb-...-d.us-east1-0.prod.colab.dev",
      "RUNTIME_ID": "a1b2c3d4-....",
      "RUNTIME_PROXY_TOKEN": "ya29...."
    }

    The proxy token (colab-runtime-proxy-token) is short-lived; refresh it when it

    expires.

    You can also pass RUNTIME_CHANNELS_URL with the Colab channels WebSocket URL

    and let the server derive RUNTIME_URL and RUNTIME_ID.

    6. Monty

    Execute in Monty, a secure in-process Python

    interpreter โ€” ideal for short, safe LLM snippets. No credentials required.

    bash
    pip install "jupyter-mcp-server[monty]"
    json
    "env": {
      "SANDBOX_VARIANT": "monty"
    }

    Monty supports only a subset of Python; third-party libraries and rich display

    outputs are not available.

    7. Modal

    Execute in a Modal cloud sandbox. Install the

    extra and configure Modal credentials:

    bash
    pip install "jupyter-mcp-server[modal]"
    modal token new

    For local development, modal token new is usually enough because the Modal SDK

    loads credentials from ~/.modal.toml.

    If you run in CI/CD, containers, or hosted runners, set both environment

    variables below.

    json
    "env": {
      "SANDBOX_VARIANT": "modal",
      "MODAL_TOKEN_ID": "ak-...",
      "MODAL_TOKEN_SECRET": "as-..."
    }

    Why both variables? Modal uses a token pair for environment-based auth:

    • MODAL_TOKEN_ID: public token identifier.
    • MODAL_TOKEN_SECRET: secret half paired with that id.

    Providing only one is insufficient for authentication.

    If needed, export both values from your local Modal config:

    bash
    python -  You can also select the engine on the command line with
    > `--sandbox-variant`, `--runtime-proxy-token`, and `--sandbox-environment`.
    
    ## ๐Ÿงช Testing
    
    Run the test suite:

    pytest tests/

    code
    Required environment variables for tests:
    
    - None for the default local suite.
    
    Optional environment variables:
    
    - `TEST_MCP_SERVER`: `true`/`false` toggle for standalone MCP server mode tests (default `true`).
    - `TEST_JUPYTER_SERVER`: `true`/`false` toggle for Jupyter extension mode tests (default `true`).
    - `DATALAYER_API_KEY`: required only for Datalayer cloud smoke/integration tests.
    - `DATALAYER_RUN_URL`: optional custom Datalayer runtime URL for datalayer engine tests.
    - `SANDBOX_ENVIRONMENT`: optional cloud environment override (for example `ai-agents-env`).
    
    ## โœ… Best Practices
    
    - Interact with LLMs that supports multimodal input (like Gemini 2.5 Pro) to fully utilize advanced multimodal understanding capabilities.
    - Use a MCP client that supports returning image data and can parse it (like Cursor, Gemini CLI, etc.), as some clients may not support this feature.
    - Break down complex task (like the whole data science workflow) into multiple sub-tasks (like data cleaning, feature engineering, model training, model evaluation, etc.) and execute them step-by-step.
    - Provide clearly structured prompts and rules (๐Ÿ‘‰ Visit our [Prompt Templates](prompt/README.md) to get started)
    - Provide as much context as possible (like already installed packages, field explanations for existing datasets, current working directory, detailed task requirements, etc.).
    
    ## ๐Ÿค Contributing
    
    We welcome contributions of all kinds! Here are some examples:
    
    - ๐Ÿ› Bug fixes
    - ๐Ÿ“ Improvements to existing features
    - ๐Ÿ”ง New feature development
    - ๐Ÿ“š Documentation improvements and prompt templates
    
    For detailed instructions on how to get started with development and submit your contributions, please see our [**Contributing Guide**](CONTRIBUTING.md).
    
    ### Our Contributors
    
    [![Contributors](https://contrib.rocks/image?repo=datalayer/jupyter-mcp-server)](https://github.com/datalayer/jupyter-mcp-server/graphs/contributors)
    
    ## ๐Ÿ“š Resources
    
    Looking for blog posts, videos, or other materials about Jupyter MCP Server?
    
    ๐Ÿ‘‰ Visit the [**Resources section**](https://jupyter-mcp-server.datalayer.tech/resources) in our documentation for more!
    
    [![Star History Chart](https://api.star-history.com/svg?repos=datalayer/jupyter-mcp-server&type=Date)](https://star-history.com/#datalayer/jupyter-mcp-server&type=Date)
    
    ______________________________________________________________________

    Similar MCP

    Based on tags & features

    • BI

      Biomcp

      Pythonยท
      327
    • WE

      Web Eval Agent

      Pythonยท
      1.2k
    • DA

      Davinci Resolve Mcp

      Pythonยท
      327
    • FH

      Fhir Mcp Server

      Pythonยท
      55

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScriptยท
      22.1k
    • SE

      Serena

      Pythonยท
      14.5k
    • MC

      Mcp Playwright

      TypeScriptยท
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScriptยท
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • BI

      Biomcp

      Pythonยท
      327
    • WE

      Web Eval Agent

      Pythonยท
      1.2k
    • DA

      Davinci Resolve Mcp

      Pythonยท
      327
    • FH

      Fhir Mcp Server

      Pythonยท
      55

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScriptยท
      22.1k
    • SE

      Serena

      Pythonยท
      14.5k
    • MC

      Mcp Playwright

      TypeScriptยท
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScriptยท
      3.0k