Get the FREE Ultimate OpenClaw Setup Guide →

cursor-notebook

Model Context Protocol (MCP) server designed to allow AI agents within Cursor to interact with Jupyter Notebook (.ipynb) files

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jbeno-cursor-notebook-mcp uvx cursor-notebook-mcp \
  --env ALLOWED_ROOTS="Paths allowed for notebook operations (comma-separated or appropriate format for the server)." \
  --env EXPORT_FORMATS="Comma-separated formats allowed for notebook_export (e.g., html, python, pdf)."

How to use

The Jupyter Notebook MCP Server (cursor-notebook) exposes a rich set of MCP tools that let AI agents read, modify, and manage Jupyter notebooks (.ipynb) directly through a standardized API. Once running, you can create, read, edit, and export notebooks, manipulate individual cells, work with cell metadata and outputs, and even bulk-add cells. The server is designed to safely operate within user-defined directories, leveraging nbformat for notebook structure handling and nbconvert for exporting notebooks to formats like Python scripts and HTML. Tools such as notebook_read, notebook_edit_cell, notebook_add_cell, notebook_export, notebook_get_outline, and notebook_search enable a practical and scriptable workflow for notebook automation from an agent such as Cursor or other MCP-enabled models.

How to install

Prerequisites:

  • Python 3.10+ installed on your system
  • pip available in your environment

Step-by-step installation:

  1. Create and activate a Python virtual environment (optional but recommended): python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

  2. Install the package from PyPI: pip install cursor-notebook-mcp

  3. Run the MCP server (example using uvx with the package name as the entry point): uvx cursor-notebook-mcp

  4. Verify the server is running (default port and transport depend on configuration). If you configured environment variables, ensure they’re set before starting the server.

  5. (Optional) Create a dedicated configuration file or environment to set allowed roots, export formats, and transport options as described in the README.

Additional notes

Notes and tips:

  • The server restricts operations to user-defined directories for safety. Configure ALLOWED_ROOTS to limit file access.
  • nbformat is used for notebook manipulation; nbconvert enables exporting to formats such as Python scripts and HTML. Ensure external dependencies (Pandoc/LaTeX) are installed if you plan to export to PDF or other formats.
  • If you enable SFTP support or Streamable HTTP transport, you may need additional system dependencies and network configurations.
  • When upgrading, check for compatibility with pydantic versions (noted in changelog 0.3.2+ mentions pydantic 2.12.0+ compatibility adjustments).
  • The server exposes a broad suite of tools; refer to notebook_mcp tool list in the README for exact method names and usage patterns.

Related MCP Servers

Sponsor this space

Reach thousands of developers