Jupyter Notebook MCP Server
Provides tools for interacting with Jupyter notebooks, enabling the ability to read, add, and execute notebook cells, as well as retrieve notebook metadata and statistics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Jupyter Notebook MCP Server execute all cells in analysis.ipynb and show the output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Jupyter Notebook MCP Server
A FastMCP server that provides tools for interacting with Jupyter notebooks. Built using the FastMCP framework.
Features
✅ Read notebook cells with filtering
✅ Add new cells at any position
✅ Execute individual cells
✅ Execute entire notebooks
✅ Get notebook metadata and statistics
✅ Proper error handling and validation
✅ Progress reporting for long operations
✅ Comprehensive logging via FastMCP Context
Related MCP server: Jupyter MCP Server
Integration with your MCP Client
Make sure uv is installed. To use this server with cursor, claude desktop or any other MCP client, add the following to your mcp config file:
{
"mcpServers": {
"jupyter-notebook": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp>=2.8.1",
"python",
"<absolute_path_to_jupyter_mcp_server>/main.py"
]
}
}
}Testing
Run the test client to see all functionality in action:
python test_client.pySecurity Notes
Cell execution runs Python code directly via subprocess
Only execute notebooks from trusted sources
Consider running in a sandboxed environment for production use
Timeout controls help prevent runaway executions
Dependencies
fastmcp- MCP server framework
Tools
This MCP server provides the following tools for working with Jupyter notebooks:
📖 read_notebook_cells
Read cells from a Jupyter notebook with optional filtering by cell type.
Parameters:
notebook_path(str): Path to the .ipynb filecell_type(optional str): Filter by cell type ('code', 'markdown', 'raw')
➕ add_cell_to_notebook
Add a new cell to a Jupyter notebook at a specified position.
Parameters:
notebook_path(str): Path to the .ipynb filecell_content(str): Content of the new cellcell_type(str, default="code"): Type of cell ('code', 'markdown', 'raw')position(optional int): Position to insert cell (default: append to end)metadata(optional dict): Optional cell metadata
⚡ execute_notebook_cell
Execute a specific cell in a Jupyter notebook.
Parameters:
notebook_path(str): Path to the .ipynb filecell_index(int): Index of the cell to execute (0-based)kernel_name(str, default="python3"): Jupyter kernel to usetimeout(int, default=30): Execution timeout in seconds
🔄 execute_entire_notebook
Execute all code cells in a Jupyter notebook sequentially.
Parameters:
notebook_path(str): Path to the .ipynb filekernel_name(str, default="python3"): Jupyter kernel to usetimeout_per_cell(int, default=30): Timeout per cell in secondsstop_on_error(bool, default=True): Whether to stop execution if a cell fails
📊 get_notebook_info
Get basic information about a Jupyter notebook.
Parameters:
notebook_path(str): Path to the .ipynb file
Available Tools
5 toolsadd_cell_to_notebookA
Add a new cell to a Jupyter notebook.
Args:
notebook_path: Absolute path to the .ipynb file
cell_content: Content of the new cell
cell_type: Type of cell ('code', 'markdown', 'raw')
position: Position to insert cell (default: append to end)
metadata: Optional cell metadata
Returns:
Status of the operation
Inputs: cell_content (required), notebook_path (required), metadata, position, +1 more.
execute_entire_notebookA
Execute all code cells in a Jupyter notebook sequentially.
Args:
notebook_path: Absolute path to the .ipynb file
kernel_name: Jupyter kernel to use for execution
timeout_per_cell: Timeout per cell in seconds
stop_on_error: Whether to stop execution if a cell fails
Returns:
Execution summary with results for each cell
Inputs: notebook_path (required), kernel_name, stop_on_error, timeout_per_cell.
execute_notebook_cellA
Execute a specific cell in a Jupyter notebook.
Args:
notebook_path: Absolute path to the .ipynb file
cell_index: Index of the cell to execute (0-based)
kernel_name: Jupyter kernel to use for execution
timeout: Execution timeout in seconds
Returns:
Execution result with outputs
Inputs: cell_index (required), notebook_path (required), timeout, kernel_name.
get_notebook_infoB
Get basic information about a Jupyter notebook.
Args:
notebook_path: Absolute path to the .ipynb file
Returns:
Notebook metadata and statistics
Inputs: notebook_path (required).
read_notebook_cellsA
Read cells from a Jupyter notebook.
Args:
notebook_path: Absolute path to the .ipynb file
cell_type: Optional filter by cell type ('code', 'markdown', 'raw')
Returns:
List of cell dictionaries with metadata
Inputs: notebook_path (required), cell_type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: adding cells, executing entire notebook, executing a specific cell, getting notebook info, and reading cells. No overlap exists.
All tool names follow a consistent verb_noun pattern using snake_case, such as add_cell_to_notebook, execute_entire_notebook, and read_notebook_cells.
With 5 tools, the server is slightly underpopulated but still reasonable for focused notebook operations. The scope feels appropriate without being too thin.
The set covers adding, reading, and executing cells but is missing essential operations like creating or deleting notebooks and deleting cells, leaving notable gaps.
Maintenance
Related MCP Connectors
Read project context and manage tasks in MCPBinder, with access you control.
System-of-record notebook for AI coding agents: pages, datastores, tasks, skills over MCP.
Read and write shared BitsWeave context, projects, tasks, and work sessions through MCP.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables inspection and editing of Jupyter notebook files (.ipynb) through tools for reading, adding, updating, deleting, moving, and converting cells while preserving metadata.1310 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to interact with Jupyter notebooks via MCP tools for querying, modifying, executing, and setting up notebooks, with state preservation and real-time collaboration.445Apache 2.0
- FlicenseBqualityDmaintenanceA FastMCP server for loading, editing, searching, and saving Jupyter notebooks (.ipynb) through MCP tools. It maintains a single active notebook session with live cell indices that update as cells are inserted or removed.10-
- AlicenseNot gradedqualityDmaintenanceMCP server for Jupyter notebook navigation and editing. Reads .ipynb files directly as JSON, providing efficient tools for reading, searching, and modifying cells without needing a Jupyter server.MIT