initialize_workspaceLABSCO SUMMARY
The notebook as a file the assistant can actually edit.
Assistants are good at writing the contents of a cell and bad at getting it into the notebook, so the last step is usually a paste and a scroll. This closes that loop on the file itself: the assistant adds the cell, fixes the one above it, and reads the output your last run left behind. Execution stays on your side, which is also why nothing here can set a cell running by accident.
What it is
A server that treats an .ipynb file as a document rather than as a running kernel. You point it at a directory once, and after that the assistant can list the notebooks it finds there, create new ones, read a whole notebook or a single cell, replace a cell's source in place, and add code or markdown cells at a position you name. It also reads back the outputs already stored in a notebook, so an assistant can see what your last run produced. Nothing here executes anything — it edits the file, and the kernel stays yours.
What you get
- A workspace directory set once, after which every call works in paths relative to it
- The notebooks in that directory, listed
- A new empty notebook created at a path you name, with a title
- A whole notebook's structure and content read back, or one cell by index
- A cell's source replaced in place, and new code or markdown cells added at an index or at the end
- The stored outputs of every code cell in a notebook, or of one cell, read back without running anything
Setup effort
Build from source — git clone https://github.com/UsamaK98/python-notebook-mcp.git
USE CASES
Starting a notebook from a conversation
Point the server at the project directory, create the notebook, and let the assistant put the first cells in itself.
Editing an analysis you already have
List what is in the directory, read the notebook's structure, and replace the source of the cell that needs changing rather than rewriting the file.
Explaining a notebook somebody else wrote
Read the whole structure for the shape of it, then individual cells where the answer actually lives.
Debugging the run you just did
Read the outputs already stored in the file — all of them, or the one cell that failed — without executing anything again.
Inserting a step in the middle
Read the cell either side of the gap, then add a code or markdown cell at that index instead of appending to the end.
9 tools
Listed in project docs. Your client may show a different list.
list_notebookscreate_notebookread_notebookread_celledit_celladd_cellread_notebook_outputsread_cell_outputBEFORE YOU INSTALL
What to know first
Tools you get
9 tools named in the project's documentation.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/UsamaK98/python-notebook-mcp.git
cd python-notebook-mcp
chmod +x ./install_unix.sh
bash ./install_unix.shMCP Clients
Cursor
{
"mcpServers": {
"jupyter": {
"command": "<YOUR_PATH_TO_PYTHON_NOTEBOOK_MCP>/.venv/bin/python",
"args": [
"<YOUR_PATH_TO_PYTHON_NOTEBOOK_MCP>/server.py"
],
"autoApprove": [
"initialize_workspace"
]
}
}
}Claude Desktop
fastmcp install server.py --name "Jupyter Notebook MCP"