Jupyter Notebook MCP Server
Provides tools for reading, editing, executing, and managing Jupyter notebooks, including cell manipulation, code execution, and output retrieval.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Jupyter Notebook MCP ServerRun cell 3 and show me the output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Jupyter Notebook MCP Server

A VS Code / Cursor extension that exposes Jupyter notebook manipulation via MCP (Model Context Protocol): read/edit/run cells and capture outputs. Works with Claude Code, Cursor Agent, Windsurf, and any MCP-compatible AI assistant.
Install: VS Code Marketplace ยท Open VSX ยท GitHub
This project is still pre-alpha so it's very rough on the edge. Working in multiple windows is unstable.
Why connect to VS Code Runtime API?
There are currently two main architectures to give AI agents access to Jupyter notebooks. This project was heavily inspired by both - kudos to these teams for pioneering the space:
Architecture 1: File-based (e.g., cursor-notebook-mcp)
These servers read/write .ipynb files directly using libraries like nbformat.
Pros: No server dependencies, works out-of-the-box
Cons:
Cannot execute code - agents can only edit cells, user must run them manually
UI sync issues - VS Code may show stale content until you revert/reopen
The
.ipynbJSON format is verbose (~3x more tokens than raw code)Race conditions if you edit while agent writes
Architecture 2: Jupyter Server API (e.g., jupyter-mcp-server)
These servers connect to Jupyter's REST API and can execute code through the kernel.
Pros: Can execute code, best choice for standalone remote JupyterLab/JupyterHub deployments
Cons:
Requires running JupyterLab separately (
jupyter lab --port 8888)Auth setup: tokens, URLs, environment variables
You end up running two UIs: one for notebook and another for AI
If you open the notebook in VS Code you create another source of truth (Jupyter server state vs your editor)
Architecture 3: VS Code / Cursor Runtime API (this extension)
We're introducing a third architecture - hooking directly into Cursor/VS Code's Notebook API, the same API the editor uses internally.
Pros:
Zero config - just install, server starts automatically
Faster reads (direct memory access, no serialization)
Executes code in your existing kernel (the one VS Code already manages)
Changes appear instantly in the editor with full undo/redo support
Single source of truth: what you see is what the agent sees
Works with remote kernels - if VS Code connects to a remote Jupyter server, so does the agent
Cons:
Only works inside VS Code / Cursor (won't help if you use JupyterLab web UI)
When to use what
Use case | Recommended |
VS Code / Cursor + AI coding | This extension |
Remote VS Code / Cursor (tunnels, containers, SSH) | This extension |
Standalone JupyterLab/JupyterHub server | Datalayer |
Just edit cells, no execution needed | File-based |
Related MCP server: vscode-notebook-mcp
Features
Execute code in the active kernel and retrieve outputs
Full cell manipulation - insert, edit, delete, move cells
Read cell contents and outputs including images (base64)
Search and navigate - find text, get notebook outline
Bulk operations - add multiple cells, clear all outputs
Tools (15)
Navigation & Reading
Tool | Description |
| List all open notebooks with URIs and cell counts |
| List cells with type, language, preview, execution state |
| Get full source code of a cell |
| Get cell outputs (text, errors, images as base64) |
| Get notebook structure (headings, functions, classes) |
| Search all cells for a keyword with context |
| Get kernel name, language, and state |
Cell Manipulation
Tool | Description |
| Insert a code or markdown cell at any position |
| Replace the content of an existing cell |
| Delete a cell by index |
| Move a cell to a different position |
| Add multiple cells in a single operation |
Execution & Outputs
To execute ad-hoc code, use notebook_insert_cell with execute: true. To execute an existing cell, use notebook_run_cell.
Tool | Description |
| Execute an existing code cell by index and return outputs |
| Clear outputs of a specific cell |
| Clear outputs from all cells |
All tools support response_format parameter ("markdown" or "json").
notebook_insert_cell
{
"content": "print('hello')",
"type": "code",
"index": 0,
"language": "python",
"execute": false
}notebook_edit_cell
{
"index": 0,
"content": "# New content"
}notebook_search
{
"query": "import pandas",
"case_sensitive": false,
"context_lines": 1
}notebook_move_cell
{
"from_index": 5,
"to_index": 0
}notebook_bulk_add_cells
{
"cells": [
{"content": "# Header", "type": "markdown"},
{"content": "x = 1", "type": "code", "language": "python"}
],
"index": 0
}notebook_run_cell
{
"index": 0
}Setup
Install the extension in VS Code or Cursor
Add to your MCP client config:
{
"mcpServers": {
"notebook": {
"url": "http://127.0.0.1:49777/mcp"
}
}
}[!ATTENTION] The server starts automatically when VS Code / Cursor opens. Look for the
๐ช :49777indicator in the status bar.
Configuration
Setting | Default | Description |
|
| Port number for the MCP server |
Performance
Tested with a 471-cell notebook (~2.8MB, 1MB outputs):
Operation | Time |
List/read cells | <1ms |
Search all cells | <1ms |
Generate outline | ~1ms |
Insert/edit cell | ~7ms |
Read operations are sub-millisecond because they access in-memory data structures directly. Write operations (~7ms) go through VS Code's edit pipeline for undo/redo support.
Requirements
VS Code 1.85+ or Cursor 0.43+
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ VS Code / Cursor โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Jupyter Extension โ โ
โ โ โ โ
โ โ Notebook Document โโโโโบ Kernel (Python) โโโโบ Outputs โ โ
โ โ โฒ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Notebook MCP Server Extension โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ HTTP Server (:49777) โ โ โ
โ โ โ โ โ โ
โ โ โ execute_code insert_cell list_cells get_output ... โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โ HTTP (MCP Protocol)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Agent โ
โ (Claude Code, Cursor, etc) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโHow It Works
Extension embeds an HTTP-based MCP server (port 49777)
AI agent (Claude Code, Cursor Agent, etc.) sends tool calls via MCP protocol
Server uses VS Code / Cursor APIs to manipulate the active notebook
Changes appear instantly in the editor
Outputs are captured and returned to the agent
This enables true interactive notebook sessions with AI agents in VS Code and Cursor.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/olavocarvalho/vscode-runtime-notebook-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server