Jupyter Notebook MCP Server (for Cursor)
@jbeno
Model Context Protocol (MCP) server designed to allow AI agents within Cursor to interact with Jupyter Notebook (.ipynb) files
概要
What is Jupyter Notebook MCP Server (for Cursor)?
Jupyter Notebook MCP Server (for Cursor) is a Model Context Protocol server that allows AI agents within Cursor to interact directly with Jupyter Notebook (.ipynb) files. It overcomes Cursor’s limitation (as of version 0.50.5) where the agent mode could not edit notebooks or cells. The server uses nbformat for safe notebook manipulation and nbconvert for exporting, and restricts operations to user-defined directories for security.
How to use Jupyter Notebook MCP Server (for Cursor)?
Install with pip install cursor-notebook-mcp (Python 3.10+). Then start the server manually: cursor-notebook-mcp --transport streamable-http --allow-root /path/to/notebooks --host 127.0.0.1 --port 8080. Configure Cursor by adding a "notebook_mcp" entry to ~/.cursor/mcp.json with the server URL (http://127.0.0.1:8080/mcp).
Key features of Jupyter Notebook MCP Server (for Cursor)
- Directly create, read, edit, delete, and move notebook cells
- Supports code, markdown, and raw cell types
- Export notebooks to Python, HTML, PDF, and more via nbconvert
- Restricts file operations to user‑defined allowed roots
- Provides tools for bulk cell adds, search, and outlining
- Supports multiple transport modes: stdio, Streamable HTTP (recommended), and SSE
Use cases of Jupyter Notebook MCP Server (for Cursor)
- AI agents editing notebook cells during interactive coding sessions in Cursor
- Automating notebook creation, modification, and validation from agent prompts
- Exporting notebooks to other formats (Python script, HTML, PDF) programmatically
- Navigating and searching large notebooks to find and edit specific cells
- Working with notebooks on remote SSH servers via SFTP support
FAQ from Jupyter Notebook MCP Server (for Cursor)
What limitation does this server address?
As of Cursor version 0.50.5, the agent mode could not edit Jupyter Notebook cells. This server provides MCP tools that enable direct cell manipulation.
Can this server be used with other tools besides Cursor?
Yes. Although designed for Cursor, it has no Cursor‑specific code beyond configuration instructions. It can be configured for VS Code (Insiders), Claude Code, or any MCP‑compatible agent.
What are the runtime requirements?
Python 3.10+ is required. All Python dependencies are installed automatically with the package. Optional external dependencies Pandoc and LaTeX are needed for certain nbconvert export formats (e.g., PDF).
How does the server ensure security?
The server restricts all file operations to directories specified via the --allow-root flag. This prevents the AI agent from accessing files outside the permitted paths.
What transport protocols are supported?
The server supports stdio, Streamable HTTP (recommended), and SSE (legacy) transports. Configuration for Cursor is provided for Streamable HTTP and SSE.