home / mcp / jupyter mcp server
Connects Jupyter Notebook 6.x to Claude AI to enable AI-assisted notebook control and execution.
Configuration
View docs{
"mcpServers": {
"jjsantos01-jupyter-notebook-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/REPO/FOLDER/src",
"run",
"jupyter_mcp_server.py"
]
}
}
}You can run an MCP (Model Context Protocol) server to connect a local Jupyter Notebook to Claude AI, enabling AI-assisted notebook control. This setup allows Claude to insert and execute cells, save notebooks, and retrieve outputs, turning your notebook into an interactive AI-powered workspace.
You start the Jupyter Notebook server, then initialize the MCP integration inside a notebook cell. Once Claude is connected, you can prompt it to insert and run cells, save the notebook, and fetch cell outputs or notebook information. The available actions let Claude manage the notebook lifecycle and interact with code and results programmatically.
Prerequisites you must have installed before proceeding: Python 3.12 or newer, the uv package manager, and Claude AI desktop application.
Install uv on Mac with Homebrew, or use the Windows PowerShell script, then proceed with Python tooling as shown.
Configure Claude to load the MCP server by adding a dedicated MCP server entry that points to the local Python MCP server runner. The following defines the local stdio MCP server entry named jupyter.
{
"mcpServers": {
"jupyter": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/REPO/FOLDER/src",
"run",
"jupyter_mcp_server.py"
]
}
}
}1) Start Jupyter Notebook server with the classic interface (version 6.x) enabled.
2) Create or switch to a notebook that uses the jupyter-mcp kernel.
3) In a notebook cell, initialize the WebSocket integration from within the Jupyter environment so Claude can communicate with the notebook.
After connection, Claude can perform a set of operations on your notebook, including inserting and executing cells, saving notebooks, inspecting cell information, running specific or all cells, retrieving outputs, editing cells, and configuring slideshow options.
If you encounter connection timeouts or execution problems, restart the WebSocket server or reinitialize the MCP integration. If port conflicts occur, the server selects an available port automatically. Ensure you are using Jupyter Notebook 6.x and that the kernel in use is the jupyter-mcp kernel.
This integration is experimental and executes arbitrary Python code on your machine. Always back up important work before enabling AI-driven notebook operations. Follow best practices for data security and code review when running code issued by Claude.
Ask Claude to insert a new cell at a specific position and run it, or to save the current notebook after updating a visualization.
Check server connectivity from Claude to the MCP server.
Insert a new cell at a specified position and execute it.
Save the current Jupyter notebook.
Retrieve information about all cells in the notebook.
Get information about the current notebook.
Run a specific cell by its index.
Run all cells in the notebook.
Fetch the text output from a specific cell.
Fetch image outputs from a specific cell.
Edit the content of an existing cell.
Set the slideshow type for a cell.