Jupyter Notebook MCP Server

Jupyter Notebook MCP Server

Provides tools for interacting with Jupyter notebooks, allowing users to read, add, and execute notebook cells. It supports full notebook execution and metadata retrieval through the FastMCP framework.

Category
Visit Server

README

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

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.py

Security 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 file
  • cell_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 file
  • cell_content (str): Content of the new cell
  • cell_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 file
  • cell_index (int): Index of the cell to execute (0-based)
  • kernel_name (str, default="python3"): Jupyter kernel to use
  • timeout (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 file
  • kernel_name (str, default="python3"): Jupyter kernel to use
  • timeout_per_cell (int, default=30): Timeout per cell in seconds
  • stop_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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured