Labsco
tofunori logo

MCP Jupyter Complete

โ˜… 2

from tofunori

A server for Jupyter notebook manipulation with position-based operations and VS Code integration.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

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

API Reference

Core Functions

FunctionParametersDescription
list_cellsnotebook_pathLists all cells with indices
get_cell_sourcenotebook_path, cell_indexGets cell source code
edit_cell_sourcenotebook_path, cell_index, new_sourceEdits cell content
insert_cellnotebook_path, position, cell_type?, source?Inserts new cell
delete_cellnotebook_path, cell_indexDeletes cell

Enhanced Functions

FunctionParametersDescription
move_cellnotebook_path, from_index, to_indexMoves cell position
convert_cell_typenotebook_path, cell_index, new_typeConverts cell type
bulk_edit_cellsnotebook_path, operations[]Bulk operations

VS Code Functions

FunctionParametersDescription
trigger_vscode_reloadnotebook_pathForces 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

Changelog

v1.0.0

  • Initial release
  • Position-based cell operations
  • VS Code integration
  • Bulk operations support
  • Comprehensive error handling