Skip to main content

MCP server for editing Jupyter notebooks

Project description

Jupyter Notebook Editor MCP Server

A Model Context Protocol (MCP) server for programmatically editing Jupyter notebooks while preserving their format and structure.

Features

  • 29 specialized tools for notebook manipulation
  • File-based operations - no Jupyter server required
  • Format preservation - automatic validation after modifications
  • Batch operations - modify multiple cells or notebooks at once
  • Type-safe - full type hints for all operations

Installation

Quick Start

# Install as a tool
uv tool install .

# Run the server
jupyter-editor-mcp

See INSTALL.md for detailed installation instructions and configuration options.

Option 1: Install as a Tool (Recommended)

Install directly using uv tool:

# Install from local directory
uv tool install --from /path/to/jupyter-editor .

# Or install from git repository
uv tool install git+https://github.com/yourusername/jupyter-editor.git

Then run the server:

jupyter-editor-mcp

Option 2: Development Installation

For development or testing:

# Clone the repository
git clone <repository-url>
cd jupyter-editor

# Create virtual environment and install
uv venv
uv pip install -e ".[dev]"

Usage

With Claude Desktop (Tool Installation)

If installed via uv tool install, add to your claude_desktop_config.json:

{
  "mcpServers": {
    "jupyter-editor": {
      "command": "jupyter-editor-mcp"
    }
  }
}

With Claude Desktop (Development Installation)

If installed in development mode, add to your claude_desktop_config.json:

{
  "mcpServers": {
    "jupyter-editor": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/jupyter-editor",
        "python",
        "-m",
        "jupyter_editor.server"
      ]
    }
  }
}

Example Interactions

Read a notebook:

"Show me the structure of my notebook.ipynb"

Insert a cell:

"Add a markdown cell at the beginning explaining what this notebook does"

Batch operations:

"Replace all occurrences of 'old_function' with 'new_function' in all code cells"

Multi-notebook:

"Merge analysis.ipynb and visualization.ipynb into combined.ipynb"

Tool Categories

  • Read Operations (4 tools): read_notebook, list_cells, get_cell, search_cells
  • Cell Modification (5 tools): replace_cell, insert_cell, append_cell, delete_cell, str_replace_in_cell
  • Metadata Operations (4 tools): get_metadata, update_metadata, set_kernel, list_available_kernels
  • Batch Operations - Multi-Cell (6 tools): replace_cells_batch, delete_cells_batch, insert_cells_batch, search_replace_all, reorder_cells, filter_cells
  • Batch Operations - Multi-Notebook (7 tools): merge_notebooks, split_notebook, apply_to_notebooks, search_notebooks, sync_metadata, extract_cells, clear_outputs
  • Validation (3 tools): validate_notebook, get_notebook_info, validate_notebooks_batch

Development

# Run tests
pytest

# Run tests with coverage
pytest --cov

# Install in development mode
uv pip install -e ".[dev]"

Documentation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_editor_mcp-0.1.2.tar.gz (123.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyter_editor_mcp-0.1.2-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_editor_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: jupyter_editor_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 123.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jupyter_editor_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d8946859c6ab0f8dbb44a5b64b0d448df73152a7bee183a94bda5bd19f1528e2
MD5 356d346bc1bd57423feaa8dba26c3050
BLAKE2b-256 9df39b0146f21b4e9955b9c62498ebe8ca550e59ca00f25724ae8f272b105633

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyter_editor_mcp-0.1.2.tar.gz:

Publisher: publish.yml on jsamuel1/jupyter-editor-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jupyter_editor_mcp-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_editor_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d96734824894986c585d046872c7d1cd96206690f95fee52da041bf08cb40f5
MD5 0cd03e7ba82ff3e87b4c54df62de9cb4
BLAKE2b-256 75efa50e552bc51d0daac4b7c19cd567db3c949d7bb90e5888224bf9fbb3ef08

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyter_editor_mcp-0.1.2-py3-none-any.whl:

Publisher: publish.yml on jsamuel1/jupyter-editor-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page