Python Notebook
Lightweight Python Notebook MCP - Enable AI assistants to create, edit, and view Jupyter notebooks via Model Context Protocol
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
Maintainer
Works with
Installation
Manual Installation
npx python-notebook-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-mcpSet 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.txtInstall 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"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"]
}
}
}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.
Python Notebook Alternatives — Similar Data Science & ML Servers
Looking for alternatives to Python Notebook? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
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.
Set Up Python Notebook in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.