Notebook MCP

Notebook MCP

Provides AI assistants with deep semantic and runtime understanding of Jupyter notebooks.

Category
Visit Server

README

Notebook MCP

AI-Native Intelligence for Jupyter Notebooks

Notebook MCP is a Model Context Protocol (MCP) server that gives AI assistants deep semantic and runtime understanding of .ipynb notebooks.


๐Ÿš€ Motivation

AI coding assistants struggle with notebooks because notebooks rely heavily on execution order and hidden runtime state.

Notebook MCP bridges this gap by converting notebooks into structured, analyzable execution graphs.


โœจ Features

๐Ÿ“Š Static Notebook Intelligence

  • Dependency graph generation
  • Variable lineage tracking
  • Focused context slicing for LLM reasoning
  • Deterministic notebook-to-script export

โšก Execution State Awareness

  • Detects stale cells
  • Detects unexecuted cells
  • Generates rerun plans

๐Ÿ”ฌ Runtime Jupyter Integration

  • Execute code inside kernels
  • Inspect variables
  • Access kernel metadata
  • Stream execution results

๐Ÿ—๏ธ Architecture

Notebook โ†’ MCP Server โ†’ AI Assistant

Core Components:

  • AST Analysis Engine
  • Dependency Graph Builder
  • Execution State Engine
  • Jupyter Kernel WebSocket Client
  • Context Builder for LLMs

๐Ÿ“ฆ Installation

npm (Recommended)

npm install -g @akram1110/notebook-mcp

Python Backend

pip install notebook-mcp

โš™๏ธ Running Server

notebook-mcp

๐Ÿงน Uninstallation

Notebook MCP installs components via both npm and pip.

Follow the steps below to fully remove the tool.


Step 1 โ€” Remove npm Wrapper

npm uninstall -g @akram1110/notebook-mcp

Step 2 โ€” Remove Python Backend

pip uninstall notebook-mcp

or

python -m pip uninstall notebook-mcp

Step 3 โ€” Confirm Removal

notebook-mcp

Expected output:

command not found

Step 4 โ€” Windows Only: Remove Leftover Executables

Python sometimes leaves launcher files behind.

Check:

where notebook-mcp

If found, delete from:

<python_install_dir>\Scripts\

Example:

C:\Users\<username>\AppData\Local\Programs\Python\Python311\Scripts\

Step 5 โ€” Clean Corrupted pip Distribution Warnings

If pip shows:

WARNING: Ignoring invalid distribution ~

Delete folders beginning with ~ inside:

<python_install_dir>\Lib\site-packages\

Then verify:

pip check

Step 6 โ€” Optional Cache Cleanup

pip cache purge

After completing these steps, Notebook MCP will be fully removed from your system.

๐Ÿ”Œ Cursor Integration

{
  "mcpServers": {
    "notebook": {
      "command": "notebook-mcp"
    }
  }
}

๐Ÿงช Example MCP Tools

Tool Description
notebook_analyze Builds dependency graph
notebook_context Generates focused context
notebook_state Detects execution state
notebook_rerun_plan Suggests rerun order
jupyter_execute Executes kernel code
jupyter_inspect Inspects runtime variables

๐Ÿ”ง Jupyter Integration

Set environment variables:

JUPYTER_BASE_URL=http://localhost:8888
JUPYTER_TOKEN=<token>

๐Ÿ“š Tech Stack

  • Python
  • Model Context Protocol (MCP)
  • AST Analysis
  • NetworkX Graphs
  • Jupyter Kernel Protocol
  • Node.js CLI Distribution

๐Ÿ›ฃ๏ธ Roadmap

  • Output semantic analysis
  • Notebook replay engine
  • Incremental notebook graph caching
  • Binary distribution support

๐Ÿค Contributing

Issues and PRs welcome.


๐Ÿ“„ License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured