Model Context Protocol (MCP) server that lets any MCP-compatible client (Claude Desktop, Cursor, Windsurf, etc.) control and interact with Jupyter notebooks in real time.
https://github.com/datalayer/jupyter-mcp-serverStop copying and pasting code between your AI assistant and Jupyter notebooks. The Jupyter MCP Server creates a real-time bridge that lets Claude Desktop, Cursor, Windsurf, and other MCP clients control your notebooks directly—executing cells, reading outputs, and adapting when things go wrong.
You know the drill: you're working with an AI assistant on data analysis, ask for some pandas code, copy it to your notebook, run it, hit an error, copy the error back to your assistant, get a fix, repeat. Meanwhile, your AI loses track of what's actually in your notebook state, variables get out of sync, and you spend more time shuttling information than solving problems.
This MCP server eliminates that friction entirely. Your AI assistant gets direct read/write access to your running Jupyter environment, complete with cell execution, output inspection, and automatic error recovery.
The server provides your AI assistant with granular notebook tools:
insert_execute_code_cell
: Drop code directly into your notebook and run it immediatelyread_cell
: Inspect existing cells and their outputs to understand current stateappend_markdown_cell
: Add documentation and explanations inlineget_notebook_info
: Understand notebook structure and execution stateThe standout feature is smart execution—when a cell fails, your assistant can immediately read the error output and adjust its approach without breaking stride. No more manual error copying.
Data exploration: Ask your assistant to analyze a dataset. It loads the data, inspects the shape, creates visualizations, and documents findings—all directly in your notebook while you watch the results appear in real-time.
Debugging sessions: Hit a tricky bug? Your assistant can read your existing code, execute diagnostic cells, test fixes, and iterate until the problem is solved, all while maintaining full context of your notebook state.
Iterative analysis: Building a complex analysis workflow becomes conversational. "Try a different feature engineering approach" results in your assistant modifying cells, re-running the pipeline, and comparing results—no copy/paste needed.
The Docker-based setup handles the complexity for you. Point it at your running Jupyter instance (local or remote), configure your MCP client with a simple JSON block, and you're connected. Works across macOS, Windows, and Linux without platform-specific quirks.
The server connects to any Jupyter instance—your local setup, a remote server, or containerized environments. Since it uses Jupyter's existing API, there's no special notebook format or environment lock-in.
This fits naturally into existing workflows because it works with your current Jupyter setup. Whether you're running JupyterLab locally, connecting to a remote server, or working in a containerized environment, the MCP server acts as a transparent bridge.
For teams, this means consistent AI assistance across different notebook environments. Same tools, same capabilities, whether you're working locally or on shared infrastructure.
The real productivity gain comes from maintaining context. Your AI assistant develops a persistent understanding of your notebook state, variable definitions, and analysis progression. Instead of explaining your setup repeatedly, you can focus on the actual problem-solving.
With 400+ stars and active development from Datalayer, this server represents a mature approach to AI-notebook integration. The MCP standard ensures compatibility with the growing ecosystem of AI development tools, making this a safe bet for long-term workflow enhancement.