vscode-notebook-mcp
Allows AI agents to read, edit, and run cells in Jupyter notebooks open in VS Code, interacting with the same kernel as the editor.
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., "@vscode-notebook-mcpList the cells in my current notebook"
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.
vscode-notebook-mcp
A VS Code extension that exposes the Jupyter notebooks in your VSCode editor to MCP-compatible AI agents (e.g. Claude Code). The agent reads, edits, and runs cells against the same kernel VS Code is using.
Status: pre-alpha, single-developer project. Built fresh; not a fork.
Tools (13)
Discovery
Tool | Description |
| List all open notebooks with URI, file name, cell count, and which is active |
| Open a |
| List cells with index, kind, language, preview, execution state |
| Full source of a cell |
| Outputs of a cell (text, errors, images as base64) |
Cell manipulation
Tool | Description |
| Insert a code or markdown cell at any position; optionally execute |
| Replace contents of an existing cell |
| Delete a cell by index |
Execution
Tool | Description |
| Execute an existing code cell and return outputs |
| Clear outputs of one cell |
| Clear outputs of every cell |
Kernel
Tool | Description |
| Language, status, notebook URI |
| Programmatic by |
All tools accept an optional notebook_uri (omitted → uses the active notebook editor) and response_format ("markdown" or "json").
Setup
Install the Jupyter extension in VS Code if you don't already have it.
Build and run this extension:
npm install npm run buildThen open this folder in VS Code and press F5 to launch an Extension Development Host with the extension loaded.
Add to your MCP client config:
{ "mcpServers": { "notebook": { "url": "http://127.0.0.1:49777/mcp" } } }Open a
.ipynbfile in the Extension Development Host. Look for the🪐 :49777indicator in the status bar.
Configuration
Setting | Default | Description |
|
| Preferred port. Auto-increments if busy (up to +99). |
Commands
Notebook MCP: Restart ServerNotebook MCP: Show Server Info
Architecture
┌─────────────────────────────────────────────────────────┐
│ VS Code window │
│ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Jupyter extension (ms-toolsai.jupyter) │ │
│ │ │ │
│ │ Notebook document ◄──► Kernel ──► Outputs │ │
│ └───────────────────────────────────────────────────┘ │
│ ▲ │
│ │ vscode.NotebookEdit, │
│ │ notebook.cell.execute, │
│ │ jupyter.kernels.getKernel │
│ │ │
│ ┌───────────────────────┴───────────────────────────┐ │
│ │ This extension │ │
│ │ │ │
│ │ HTTP server :49777 ──► MCP tools (12) │ │
│ │ (StreamableHTTPServerTransport) │ │
│ └───────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│ HTTP (MCP protocol)
▼
┌───────────────────────────────┐
│ AI agent │
│ (Claude Code, Cursor, etc.) │
└───────────────────────────────┘Implementation notes
Writes go through
vscode.NotebookEdit+vscode.WorkspaceEdit, preserving undo/redo.Execution dispatches
notebook.cell.executeand waits by pollingcell.executionSummary.successfor abooleanvalue (VS Code creates the summary as soon as execution starts butsuccessonly becomes a boolean when the kernel finishes).Inserted cells are tagged with a metadata id so the executor can find them again after the index shifts due to other concurrent edits.
Multi-notebook: every tool accepts
notebook_uri. Resolution: explicit URI → look up invscode.workspace.notebookDocuments(or open it); otherwise fall back tovscode.window.activeNotebookEditor.
Development
npm install
npm run build # esbuild bundle
npm run watch # rebuild on change
npm run typecheck # tsc --noEmit
npm test # vitest (no tests yet)Press F5 in VS Code to launch the Extension Development Host.
Building a VSIX
To produce an installable .vsix file:
npx @vscode/vsce packageThis runs vscode:prepublish (which builds via esbuild) and writes vscode-notebook-mcp-<version>.vsix to the repo root. Install it with:
code --install-extension vscode-notebook-mcp-<version>.vsix.vscodeignore keeps the package small by excluding TS sources, node_modules, source maps, and dev configs — only the bundled dist/, package.json, README.md, and LICENSE are shipped.
References
Other projects along similar lines to this project:
datalayer/jupyter-mcp-server — MCP server that talks to a running Jupyter server via HTTP/WebSocket.
olavocarvalho/vscode-runtime-notebook-mcp — similar architecture as this project (VS Code Notebook API + embedded HTTP MCP server).
I built this fresh to learn and so I have room to tweak the design and develop new features such as reading Plotly images.
License
MIT
This server cannot be installed
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
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/caryan/vscode-notebook-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server