Labsco
UsamaK98 logo

Python Notebook MCP

โ˜… 45

from UsamaK98

Enables AI assistants to interact with local Jupyter notebooks (.ipynb).

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Python Notebook MCP

MCP server enabling AI assistants to interact with Jupyter notebooks through the Model Context Protocol.

<a href="CodeRabbit Pull Request Reviews">

MseeP.ai Security Assessment Badge

This server allows compatible AI assistants (like Cursor or Claude Desktop) to interact with Jupyter Notebook files (.ipynb) on your local machine.

๐Ÿ› ๏ธ Available Tools

ToolDescription
initialize_workspaceREQUIRED FIRST STEP. Sets the absolute path for the workspace.
list_notebooksLists all .ipynb files found within the workspace directory.
create_notebookCreates a new, empty Jupyter notebook if it doesn't exist.
read_notebookReads the entire structure and content of a notebook.
read_cellReads the content and metadata of a specific cell by index.
edit_cellModifies the source content of an existing cell by index.
add_cellAdds a new code or markdown cell at a specific index or the end.
read_notebook_outputsReads all outputs from all code cells in a notebook.
read_cell_outputReads the output(s) of a specific code cell by index.

๐Ÿงช Development & Debugging

If you need to debug the server itself:

  • Run Directly: Use uv run python server.py and observe the terminal output for errors or print statements.
  • FastMCP Dev Mode: For interactive testing with the MCP Inspector:
    # Make sure fastmcp is installed in your environment
    # uv pip install fastmcp
    uv run fastmcp dev server.py

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.