JupyterMCP connects Jupyter Notebook to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Jupyter Notebooks. This integration enables AI-assisted code execution, data analysis, visualization, and more.
This tool is compatible ONLY with Jupyter Notebook version 6.x.
It does NOT work with:
- Jupyter Lab
- Jupyter Notebook v7.x
- VS Code Notebooks
- Google Colab
- Any other notebook interfaces
- Two-way communication: Connect Claude AI to Jupyter Notebook through a WebSocket-based server
- Cell manipulation: Insert, execute, and manage notebook cells
- Notebook management: Save notebooks and retrieve notebook information
- Cell execution: Run specific cells or execute all cells in a notebook
- Output retrieval: Get output content from executed cells with text limitation options
The system consists of three main components:
- WebSocket Server (
jupyter_ws_server.py): Sets up a WebSocket server inside Jupyter that bridges communication between notebook and external clients - Client JavaScript (
client.js): Runs in the notebook to handle operations (inserting cells, executing code, etc.) - MCP Server (
jupyter_mcp_server.py): Implements the Model Context Protocol and connects to the WebSocket server
- Python 3.12 or newer (probably also work with older versions, but not tested)
uvpackage manager- Claude AI desktop application