Python Notebook

v1.0.0Data Science & MLstable

Lightweight Python Notebook MCP - Enable AI assistants to create, edit, and view Jupyter notebooks via Model Context Protocol

ai-toolsclaudeclaude-desktopcursor-idefastmcp
Share:
45
Stars
0
Downloads
0
Weekly
0/5

What is Python Notebook?

Python Notebook is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to lightweight python notebook mcp - enable ai assistants to create, edit, and view jupyter notebooks via model context protocol

Lightweight Python Notebook MCP - Enable AI assistants to create, edit, and view Jupyter notebooks via Model Context Protocol

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Lightweight Python Notebook MCP - Enable AI assistants to cr

Use Cases

Create and edit Jupyter notebooks with AI assistance
View and execute Python code through natural language
UsamaK98

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedApr 1, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx python-notebook-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Python Notebook

Python Notebook MCP is a lightweight FastMCP-based server that lets AI assistants create, read, edit, and manage Jupyter notebook (.ipynb) files through the Model Context Protocol, without needing a running Jupyter kernel. It provides nine tools covering the full notebook editing lifecycle — from initializing a workspace and listing notebooks, to adding, editing, and reading individual cells and their execution outputs. This makes it ideal for data scientists and developers who want Claude or other AI assistants to scaffold analysis notebooks, insert code cells, or inspect cell outputs as part of an automated workflow in Claude Desktop or Cursor IDE.

Prerequisites

  • Python 3.10+ installed
  • uv package manager installed (https://github.com/astral-sh/uv)
  • fastmcp CLI installed for Claude Desktop integration: pip install fastmcp
  • An MCP client such as Claude Desktop or Cursor IDE
  • The repository cloned locally (server runs from source)
1

Clone the repository

Clone the python-notebook-mcp repository to your local machine.

git clone https://github.com/UsamaK98/python-notebook-mcp.git
cd python-notebook-mcp
2

Set up the Python environment and install dependencies

Create a virtual environment with uv and install the required packages.

uv venv
source .venv/bin/activate  # macOS/Linux
# On Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
3

Install for Claude Desktop using fastmcp

Use the fastmcp CLI to register the server with Claude Desktop under the name 'Jupyter Notebook MCP'.

fastmcp install server.py --name "Jupyter Notebook MCP"
4

Configure for Cursor or other MCP clients

For Cursor IDE or other clients, create an mcp.json config pointing to the absolute path of the Python interpreter and server.py. Use absolute paths — relative paths will not work.

{
  "mcpServers": {
    "jupyter": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["/absolute/path/to/python-notebook-mcp/server.py"],
      "autoApprove": ["initialize_workspace"]
    }
  }
}
5

Initialize your workspace before using other tools

The initialize_workspace tool must be called first with the absolute path to the directory containing your notebooks. All subsequent tool calls operate relative to this workspace.

Python Notebook Examples

Client configuration

mcp.json entry for Python Notebook MCP using the venv Python interpreter and absolute server path.

{
  "mcpServers": {
    "jupyter": {
      "command": "/absolute/path/to/python-notebook-mcp/.venv/bin/python",
      "args": ["/absolute/path/to/python-notebook-mcp/server.py"],
      "autoApprove": ["initialize_workspace"]
    }
  }
}

Prompts to try

Sample prompts to use once Python Notebook MCP is connected in your AI assistant.

- "Initialize my notebook workspace at /Users/me/projects/analysis"
- "List all Jupyter notebooks in my workspace"
- "Create a new notebook called data_exploration.ipynb with title 'Sales Data Exploration'"
- "Add a code cell to data_exploration.ipynb with: import pandas as pd; df = pd.read_csv('sales.csv')"
- "Read cell 0 from data_exploration.ipynb"
- "Edit cell 1 in data_exploration.ipynb to fix the import: import matplotlib.pyplot as plt"
- "Show me the output from cell 2 in data_exploration.ipynb"

Troubleshooting Python Notebook

Tools fail with 'workspace not initialized' or file not found errors

Always call initialize_workspace first with the absolute path to your notebooks directory. Every session starts fresh and requires re-initialization. Add initialize_workspace to the autoApprove list in your config so it runs automatically.

fastmcp install fails or command not found

Install fastmcp with 'pip install fastmcp', then verify with 'fastmcp --version'. If the command is still not found, check that your Python scripts directory is in PATH, or use the Cursor-style mcp.json config instead of the fastmcp installer.

read_cell_output returns empty output even after cell execution

Python Notebook MCP reads and writes .ipynb files but does not execute cells — it only reads outputs that were previously saved in the notebook. Run the notebook in Jupyter first to populate cell outputs, then use read_cell_output to retrieve them.

Frequently Asked Questions about Python Notebook

What is Python Notebook?

Python Notebook is a Model Context Protocol (MCP) server that lightweight python notebook mcp - enable ai assistants to create, edit, and view jupyter notebooks via model context protocol It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Python Notebook?

Follow the installation instructions on the Python Notebook GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Python Notebook?

Python Notebook works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Python Notebook free to use?

Yes, Python Notebook is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "python-notebook-mcp": { "command": "npx", "args": ["-y", "python-notebook-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Python Notebook?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides