MCP Jupyter Complete MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/tofunori/mcp-jupyter-complete.git
cd mcp-jupyter-complete
npm install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add mcp-jupyter-complete -- node "<FULL_PATH_TO_MCP_JUPYTER_COMPLETE>/dist/index.js"

Replace <FULL_PATH_TO_MCP_JUPYTER_COMPLETE>/dist/index.js with the actual folder you prepared in step 1.

README.md

Comprehensive Jupyter notebook manipulation with VS Code integration

MCP Jupyter Complete

A comprehensive Model Context Protocol (MCP) server for Jupyter notebook manipulation with position-based operations and VS Code integration.

Features

🎯 Position-Based Operations

  • list_cells - List all cells with indices and type information
  • get_cell_source - Get source code of specific cells by index
  • edit_cell_source - Edit cell content by index
  • insert_cell - Insert new cells at specific positions
  • delete_cell - Delete cells by index with automatic reindexing

🚀 Enhanced Operations

  • move_cell - Move cells between positions
  • convert_cell_type - Convert between code/markdown/raw cells
  • bulk_edit_cells - Perform multiple operations in a single call

🔧 VS Code Integration

  • trigger_vscode_reload - Force VS Code to reload notebook files
  • File watcher support for automatic reloading
  • VS Code workspace and settings generation
  • Extension recommendations for optimal Jupyter experience

Installation

  1. Clone the repository:

    git clone https://github.com/tofunori/mcp-jupyter-complete.git
    cd mcp-jupyter-complete
    
  2. Install dependencies:

    npm install
    
  3. Make executable (optional):

    npm link
    

Configuration

Add to your ~/.claude.json configuration:

{
  "mcpServers": {
    "jupyter-complete": {
      "command": "node",
      "args": ["/path/to/mcp-jupyter-complete/src/index.js"]
    }
  }
}

Or if installed globally via npm:

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

Usage Examples

Basic Cell Operations

// List all cells
await mcp.call("list_cells", {
  notebook_path: "/path/to/notebook.ipynb"
});

// Get cell content
await mcp.call("get_cell_source", {
  notebook_path: "/path/to/notebook.ipynb",
  cell_index: 0
});

// Edit a cell
await mcp.call("edit_cell_source", {
  notebook_path: "/path/to/notebook.ipynb",
  cell_index: 1,
  new_source: "print('Hello World!')"
});

Advanced Operations

// Insert a new markdown cell
await mcp.call("insert_cell", {
  notebook_path: "/path/to/notebook.ipynb",
  position: 2,
  cell_type: "markdown",
  source: "# New Section\\n\\nThis is a new markdown cell."
});

// Move a cell
await mcp.call("move_cell", {
  notebook_path: "/path/to/notebook.ipynb",
  from_index: 3,
  to_index: 1
});

// Bulk operations
await mcp.call("bulk_edit_cells", {
  notebook_path: "/path/to/notebook.ipynb",
  operations: [
    {
      type: "edit",
      cell_index: 0,
      new_source: "# Updated title"
    },
    {
      type: "convert",
      cell_index: 1,
      new_type: "markdown"
    }
  ]
});

VS Code Integration

// Trigger VS Code reload
await mcp.call("trigger_vscode_reload", {
  notebook_path: "/path/to/notebook.ipynb"
});

VS Code Setup

For optimal VS Code integration:

  1. Install recommended extensions:

    • Python
    • Jupyter
    • Jupyter Keymap
    • Jupyter Renderers
  2. Configure auto-reload: Add to VS Code settings:

    {
      "files.watcherExclude": {
        "**/.ipynb_checkpoints/**": true
      },
      "notebook.diffEditor.ignoreTrimWhitespace": false
    }
    
  3. Use with Claude Code: When using with Claude Code, notebook changes made via MCP will automatically trigger VS Code to prompt for reload.

API Reference

Core Functions

Function Parameters Description
list_cells notebook_path Lists all cells with indices
get_cell_source notebook_path, cell_index Gets cell source code
edit_cell_source notebook_path, cell_index, new_source Edits cell content
insert_cell notebook_path, position, cell_type?, source? Inserts new cell
delete_cell notebook_path, cell_index Deletes cell

Enhanced Functions

Function Parameters Description
move_cell notebook_path, from_index, to_index Moves cell position
convert_cell_type notebook_path, cell_index, new_type Converts cell type
bulk_edit_cells notebook_path, operations[] Bulk operations

VS Code Functions

Function Parameters Description
trigger_vscode_reload notebook_path Forces VS Code reload

Cell Types

Supported cell types:

  • code - Python/executable code cells
  • markdown - Markdown text cells
  • raw - Raw text cells

Error Handling

The server provides detailed error messages for:

  • Invalid cell indices
  • File read/write permissions
  • Malformed notebook JSON
  • Invalid cell type conversions

Development

Testing

npm test

Linting

npm run lint

Development Mode

npm run dev

Contributing

  1. Fork the repositor

Tools (9)

list_cellsLists all cells in a notebook with indices and type information.
get_cell_sourceGets the source code of a specific cell by index.
edit_cell_sourceEdits the content of a specific cell by index.
insert_cellInserts a new cell at a specific position.
delete_cellDeletes a cell by index with automatic reindexing.
move_cellMoves cells between positions.
convert_cell_typeConverts between code, markdown, and raw cell types.
bulk_edit_cellsPerforms multiple cell operations in a single call.
trigger_vscode_reloadForces VS Code to reload notebook files.

Configuration

claude_desktop_config.json
{"mcpServers": {"jupyter-complete": {"command": "mcp-jupyter-complete"}}}

Try it

List all cells in my notebook at /path/to/analysis.ipynb to see the current structure.
Insert a new markdown cell at the beginning of /path/to/analysis.ipynb with a title 'Data Cleaning'.
Convert the second cell in /path/to/analysis.ipynb to a markdown cell.
Move the last cell in /path/to/analysis.ipynb to the top of the notebook.
Perform a bulk edit on /path/to/analysis.ipynb to update the first cell's code and convert the second cell to markdown.

Frequently Asked Questions

What are the key features of MCP Jupyter Complete?

Position-based cell operations including listing, inserting, and deleting. Bulk editing capabilities for multiple notebook changes in one call. Cell type conversion between code, markdown, and raw formats. VS Code integration to trigger file reloads after programmatic changes.

What can I use MCP Jupyter Complete for?

Automating notebook cleanup and refactoring tasks. Programmatically generating or updating notebook documentation. Synchronizing notebook changes made by AI agents with the VS Code editor. Batch processing multiple notebook cells for consistent formatting.

How do I install MCP Jupyter Complete?

Install MCP Jupyter Complete by running: git clone https://github.com/tofunori/mcp-jupyter-complete.git && cd mcp-jupyter-complete && npm install

What MCP clients work with MCP Jupyter Complete?

MCP Jupyter Complete works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Jupyter Complete docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare