/jupyter-mcp-server

[fork] πŸͺ ✨ Model Context Protocol (MCP) Server for Jupyter.

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Datalayer Become a Sponsor

πŸͺβœ¨ Jupyter MCP Server

PyPI - Version smithery badge

Jupyter MCP Server is a Model Context Protocol (MCP) server implementation that provides interaction with πŸ““ Jupyter notebooks running in any JupyterLab (works also with your πŸ’» local JupyterLab).

πŸš€ 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.
  • 🀝 MCP-Compatible: Works with any MCP client, such as Claude Desktop, Cursor, Windsurf, and more.

Jupyter MCP Server Demo

Explore our Tools documentation to learn about the tools powering Jupyter MCP Server.

🏁 Getting Started

Follow our Setup Guide or use the quick steps below:

1. Set Up Your Environment

pip install jupyterlab==4.4.1 jupyter-collaboration==4.0.2 ipykernel
pip uninstall -y pycrdt datalayer_pycrdt
pip install datalayer_pycrdt==0.12.17

2. Start JupyterLab

jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0

3. Configure Your Preferred MCP Client

MacOS and Windows

{
  "mcpServers": {
    "jupyter": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SERVER_URL",
        "-e",
        "TOKEN",
        "-e",
        "NOTEBOOK_PATH",
        "datalayer/jupyter-mcp-server:latest"
      ],
      "env": {
        "SERVER_URL": "http://host.docker.internal:8888",
        "TOKEN": "MY_TOKEN",
        "NOTEBOOK_PATH": "notebook.ipynb"
      }
    }
  }
}

Linux

{
  "mcpServers": {
    "jupyter": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SERVER_URL",
        "-e",
        "TOKEN",
        "-e",
        "NOTEBOOK_PATH",
        "--network=host",
        "datalayer/jupyter-mcp-server:latest"
      ],
      "env": {
        "SERVER_URL": "http://localhost:8888",
        "TOKEN": "MY_TOKEN",
        "NOTEBOOK_PATH": "notebook.ipynb"
      }
    }
  }
}

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

πŸ“š Resources

Looking for blog posts, videos, or other materials about Jupyter MCP Server?
πŸ‘‰ Visit the Resources section for more.