jupyter-vscode-mcp
Provides tools for interacting with Jupyter notebooks in a live VS Code session, enabling AI agents to list, create, edit, run, and save notebooks; execute cells; retrieve outputs and variables; manage kernels; and inspect or install Python packages in the active kernel environment.
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-vscode-mcprun all cells in the open notebook and show me the outputs"
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 VS Code MCP
VS Code extension that exposes Jupyter notebook operations as MCP tools over plain HTTP — one portable URL for every AI coding agent. No absolute paths, no node command, no stdio wiring.
Point any MCP client at the URL, and the agent can explore, edit, run, and debug notebooks in your live editor session: it sees the same cells you see, talks to the same kernel your notebook uses (local or remote — Colab included), and every action lands in the real VS Code UI.
Features
Notebook editing with stable cell handles
Every cell is identified by a single uniform scheme:
#NB-xxxxxxxx, persisted in the standard nbformat 4.5 cell id. It survives edits, insert/delete of other cells, index shifts, save/reopen, extension reloads — even copying the file to another machine.IDs are never recycled after a delete: new cells always get fresh random IDs.
jupyter_get_summaryassigns IDs to any cell that lacks one (e.g. hand-created in the UI), so every reported handle is immediately reusable.Indices are 0-based everywhere (summary, sources, run ranges, outputs) — no mixed conventions.
Non-blocking execution control
jupyter_run_cellsstarts execution and returns immediately; poll withjupyter_wait_until_idleor snapshot withjupyter_get_status. No blind sleeps, no MCP timeouts on long cells.Kernel-readiness guard: running against a dead/absent kernel returns actionable hints instead of wedging.
jupyter_interrupt_kernelaborts the current run while keeping all variables.
Kernel intelligence (Copilot-grade)
jupyter_get_variables— type-aware variable reports: DataFrame/Series as{shape, columns[:8], head(2)}, ndarray as{shape, dtype}, containers withlength, scalars as short reprs. Uses the official Jupyter variables view API when available, else a silent kernel probe that never touches the execution count. Optional document-symbol filtering hides internal noise only when symbols are actually available.jupyter_get_pip_packages— environment inventory (name + version) from the active kernel environment.jupyter_install_packages— pip runs inside the kernel's own interpreter, so packages land in the runtime the notebook actually uses — remote VMs like Colab included, never the local host. Supports version specs and--upgrade, verifies each spec resolves afterwards, and reports honest failures (with pip's real output tail) instead of pretending success.jupyter_get_statusprobes the live kernel for real Python version/platform rather than trusting stale metadata.jupyter_select_kernelopens VS Code's native kernel picker when no kernel is active.
Network-only MCP transport
Streamable HTTP (MCP spec 2025-11-25) with plain-JSON responses — a minimal client works with nothing but
curl.Endpoints:
/mcp(plus legacy/sse),GET /healthfor liveness + version probing.Multiple concurrent agent sessions supported; sessions survive hot port changes.
Honest reporting
Errors carry context and next-step hints: missing kernel → boot guidance, stale ID → refresh via summary, failed pip install → real pip error tail, busy kernel → explicit deferral note instead of silently empty results.
Related MCP server: Jupyter MCP Server
Tools
Tool | Description |
| Open notebooks with URIs, paths, cell counts, dirty flags |
| Compact map: stable IDs, kinds, exec status, output mimes, previews |
| One cell's source by ID or 0-based index; line pagination |
| Replace source; ID stays valid afterwards |
| Structure edits at 0-based positions; fresh non-recyclable IDs |
| Persist |
| Create empty |
| Non-blocking start: index range |
| Poll until idle or timeout; returns completed cells + success flags |
| Instant snapshot: kernelStatus, live runtime info, running cells, dirty state |
| Abort current execution, keep variables |
| Full restart (clears variables) |
| Outputs inline (short text) or artifact files under |
| Type-aware kernel variable report |
| Installed package inventory of the kernel environment |
| Kernel-side pip install with version specs + post-install verification |
| Open the native kernel picker, report resulting state |
Stable Cell IDs
Every cell gets a random persistent ID (#NB-xxxxxxxx) written to the standard nbformat 4.5 cell id field — the same slot the platform itself reads and round-trips through save/load. The ID is immune to position changes, content edits, sibling inserts/deletes, and reopen cycles. Prefer IDs over indices; call jupyter_get_summary to discover them (it also backfills missing IDs onto cells created outside the tools).
Bare 8-hex input (abcd1234) is accepted as shorthand for #NB-abcd1234.
Compatible Agents
Any MCP client speaking HTTP works. Common configs:
Claude Code, Cursor, Windsurf, Cline, Copilot:
{
"mcpServers": {
"jupyter-vscode-mcp": {
"url": "http://localhost:9123/mcp"
}
}
}OpenCode, Kilo Code:
{
"mcp": {
"jupyter-vscode-mcp": {
"type": "remote",
"url": "http://localhost:9123/mcp",
"enabled": true
}
}
}Run "Jupyter VS Code MCP: Show MCP Configuration" from the command palette → pick your agent → snippet copied to clipboard.
Install & Run
Download the latest .vsix from Releases, then:
code --install-extension jupyter-vscode-mcp-<version>.vsixOpen any
.ipynb— the server auto-starts on127.0.0.1:9123(status bar shows state; click to toggle).Add the URL config above to your agent.
Probe liveness anytime:
curl http://localhost:9123/health.
Settings: jupyter-vscode-mcp.mcpPort (default 9123, hot-applied), jupyter-vscode-mcp.autoStart (default true).
Recommended Workflow
jupyter_list_open_notebooks → pick notebook
jupyter_get_summary → stable #NB-* IDs, exec state (0-based)
jupyter_get_cell_source → read only what you need
jupyter_edit_cell → IDs stay valid after edits
jupyter_run_cells → starts async, returns immediately
jupyter_wait_until_idle → blocks until done (or poll get_status)
jupyter_get_outputs → inline short text, artifact files for big/binary
jupyter_get_variables → inspect kernel state after runsArchitecture
AI agent ──HTTP/JSON-RPC──▶ VS Code extension (in-process http server :9123)
│ vscode.* APIs + ms-toolsai.jupyter public API
▼
notebook cells, outputs, kernel statusKernel interactions use the documented ms-toolsai.jupyter public API (kernel.executeCode, interrupt/restart commands, variables/pip listing commands) with command fallbacks; execution tracking relies on workspace.onDidChangeNotebookDocument.
Development
npm install
npm run compile # typecheck
npm run lint
npm run build # esbuild bundle
npm run smoke # local protocol smoke test (vscode stubbed)
npx @vscode/vsce packageReferences
Model Context Protocol — Streamable HTTP transport, spec 2025-11-25
microsoft/vscode-copilot-chat (MIT) — variable summarization, truncation budgets, and symbol-filtering patterns
SMARK OpenCode IDE Bridge — kernel pre-checks via Jupyter public API, interrupt/restart command fallbacks, event-based completion tracking
kriss-spy/opencode-jupyter — original HTTP bridge concept
License
MIT
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.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceExposes VSCode Jupyter notebooks to MCP-compatible AI agents, enabling them to read, edit, and run cells against the same kernel.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to interact with Jupyter notebooks via MCP tools for querying, modifying, executing, and setting up notebooks, with state preservation and real-time collaboration.444Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI agents to create, read, edit, and execute Jupyter notebook cells, manage kernels, and connect to remote Jupyter servers.21MIT
- AlicenseBqualityBmaintenanceAn MCP server that connects directly to a Jupyter kernel via ZMQ, enabling AI assistants to read, create, edit, execute, and manage Jupyter Notebooks as MCP tools.9MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/hadiproz/jupyter-vscode-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server