home / mcp / jupyter mcp server
Exposes notebook management actions such as reading, adding, editing, and executing notebook cells via MCP tools.
Configuration
View docs{
"mcpServers": {
"ihrpr-mcp-server-jupyter": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-server-jupyter",
"mcp-server-jupyter"
],
"env": {
"UV_PROJECT_ENVIRONMENT": "<path-to-venv>"
}
}
}
}You can manage and interact with Jupyter notebooks programmatically using this MCP server. It exposes a set of notebook-focused tools and integrates with your existing Jupyter setup, allowing you to read, create, edit, and execute notebook cells from an MCP client.
You configure an MCP client to connect to the Jupyter notebook manager server and then call the available tools to perform operations on notebooks. The server uses a standard input/output (stdio) approach when run via the UV tool, so you will start the MCP server through a command that forwards requests to the notebook manager. After you call a tool, reload your notebook page if needed to reflect changes.
Prerequisites you need before you start: a working Python environment and Node-compatible tooling, plus the ability to install JupyterLab in a virtual environment.
Steps to set up your environment and run the MCP server:
uv venv --seed
source .venv/bin/activate
uv pip install jupyterlab
.venv/bin/jupyter lab
```
Note: this environment path is used as UV_PROJECT_ENVIRONMENT in the MCP server configuration. You can verify the path by printing the current working directory and appending .venv as shown in the guidance.To connect Claude Desktop with the Jupyter notebook manager, configure an MCP server entry that runs under UV. The configuration uses the UV tool to run the MCP server with your Jupyter notebook manager module.
{
"mcpServers": {
"jupyter_mcp": {
"command": "uv",
"args": ["run", "--with", "mcp-server-jupyter", "mcp-server-jupyter"],
"env": {
"UV_PROJECT_ENVIRONMENT": "/path/to/venv_for_jupyter/.venv"
}
}
}
}After any modifications through the MCP client (such as add_cell or edit_cell), reload the notebook page in JupyterLab or Jupyter Notebook to see the changes, as automatic reload is not yet supported in this setup.
The server provides six tools to interact with notebooks and cells.
Keep your Jupyter server and MCP components up to date. Run the integration in a controlled environment and avoid exposing the MCP endpoint to untrusted networks. Regularly review the environment variables and permissions used by the MCP server.
Read a notebook's content including all cell outputs. Requires notebook_path as input.
Read notebook content without outputs. Use when size limits prevent reading full notebook with outputs. Requires notebook_path.
Read the output of a specific cell. Requires notebook_path and cell_id.
Add a new cell to a notebook. Requires notebook_path and source. Optional: cell_type (code or markdown) and position (insertion index, -1 to append).
Modify the content of an existing cell. Requires notebook_path, cell_id, and new source.
Execute a specific cell and return its output. Requires notebook_path and cell_id.