Jupyter MCP Server
Real-time, context-aware MCP server for managing and interacting with Jupyter Notebooks.
Key Features
Use Cases
README
🪐✨ Jupyter MCP Server
An MCP server developed for AI to connect and manage Jupyter Notebooks in real-time
Developed by Datalayer
📢 Upcoming JupyterCon 2025: We'll be presenting Jupyter MCP Server at JupyterCon 2025 on November 4! Join us to learn about ✨ AI-powered notebook interactions and the future of 🪐 Jupyter workflows.
🚨 Latest Release: v17.0: JupyterLab Mode Integration! Enhanced UI integration with automatic notebook opening. 📋 Read more in the release notes
📖 Table of Contents
🚀 Key Features
- ⚡ Real-time control: Instantly view notebook changes as they happen.
- 🔁 Smart execution: Automatically adjusts when a cell run fails thanks to cell output feedback.
- 🧠 Context-aware: Understands the entire notebook context for more relevant interactions.
- 📊 Multimodal support: Support different output types, including images, plots, and text.
- 📚 Multi-notebook support: Seamlessly switch between multiple notebooks.
- 🎨 JupyterLab integration: Enhanced UI integration like automatic notebook opening.
- 🤝 MCP-compatible: Works with any MCP client, such as Claude Desktop, Cursor, Windsurf, and more.
Compatible with any Jupyter deployment (local, JupyterHub, ...) and with Datalayer hosted Notebooks.
✨ MCP Overview
🔧 Tools Overview
The server provides a rich set of tools for interacting with Jupyter notebooks, categorized as follows:
Server Management Tools
| Name | Description |
|---|---|
list_files |
List files and directories in the Jupyter server's file system. |
list_kernels |
List all available and running kernel sessions on the Jupyter server. |
Multi-Notebook Management Tools
| Name | Description |
|---|---|
use_notebook |
Connect to a notebook file, create a new one, or switch between notebooks. |
list_notebooks |
List all notebooks available on the Jupyter server and their status |
restart_notebook |
Restart the kernel for a specific managed notebook. |
unuse_notebook |
Disconnect from a specific notebook and release its resources. |
read_notebook |
Read notebook cells source content with brief or detailed format options. |
Cell Operations and Execution Tools
| Name | Description |
|---|---|
read_cell |
Read the full content (Metadata, Source and Outputs) of a single cell. |
insert_cell |
Insert a new code or markdown cell at a specified position. |
delete_cell |
Delete a cell at a specified index. |
overwrite_cell_source |
Overwrite the source code of an existing cell. |
execute_cell |
Execute a cell with timeout, supports multimodal output including images. |
insert_execute_code_cell |
Insert a new code cell and execute it in one step. |
execute_code |
Execute code directly in the kernel, supports magic commands and shell commands. |
JupyterLab Integration
Available only when JupyterLab mode is enabled. It is enabled by default.
| Name | Description |
|---|---|
notebook_run-all-cells |
Execute all cells in the current notebook sequentially |
For more details on each tool, their parameters, and return values, please refer to the official Tools documentation.
📝 Prompt Overview
The server also supports prompt feature of MCP, providing a easy way for user to interact with Jupyter notebooks.
| Name | Description |
|---|---|
jupyter-cite |
Cite specific cells from specified notebook (like @ in Coding IDE or CLI) |
For more details on each prompt, their input parameters, and return content, please refer to the official Prompt documentation.
🏁 Getting Started
For comprehensive setup instructions—including Streamable HTTP transport, running as a Jupyter Server extension and advanced configuration—check out our documentation. Or, get started quickly with JupyterLab and STDIO transport here below.
1. Set Up Your Environment
pip install jupyterlab==4.4.1 jupyter-collaboration==4.0.2 jupyter-mcp-tools>=0.1.4 ipykernel
pip uninstall -y pycrdt datalayer_pycrdt
pip install datalayer_pycrdt==0.12.17
2. Start JupyterLab
# Start JupyterLab on port 8888, allowing access from any IP and setting a token
jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0
[!NOTE] If you are running notebooks through JupyterHub instead of JupyterLab as above, you should:
- Set the environment variable
JUPYTERHUB_ALLOW_TOKEN_IN_URL=1in the single-user environment.- Ensure your API token (
MY_TOKEN) is created withaccess:serversscope in the Hub.
3. Configure Your Preferred MCP Client
Next, configure your MCP client to connect to the server. We offer two primary methods—choose the one that best fits your needs:
- 📦 Using
uvx(Recommended for Quick Start): A lightweight and fast method usinguv. Ideal for local development and first-time users. - 🐳 Using
Docker(Recommended for Production): A containerized approach that ensures a consistent and isolated environment, perfect for production or complex setups.
First, install uv:
pip install uv
uv --version
# should be 0.6.14 or higher
See more details on uv installation.
Then, configure your client:
{
"mcpServers": {
"jupyter": {
"command": "uvx",
"args": ["jupyter-mcp-server@latest"],
"env": {
"JUPYTER_URL": "http://localhost:8888",
"JUPYTER_TOKEN": "MY_TOKEN",
"ALLOW_IMG_OUTPUT": "true"
}
}
}
}
On macOS and Windows:
{
"mcpServers": {
"jupyter": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "JUPYTER_URL",
"-e", "JUPYTER_TOKEN",
"-e", "ALLOW_IMG_OUTPUT",
"datalayer/jupyter-mcp-server:latest"
],
"env": {
"JUPYTER_URL": "http://host.docker.internal:8888",
"JUPYTER_TOKEN": "MY_TOKEN",
"ALLOW_IMG_OUTPUT": "true"
}
}
}
}
On Linux:
{
"mcpServers": {
"jupyter": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "JUPYTER_URL",
"-e", "JUPYTER_TOKEN",
"-e", "ALLOW_IMG_OUTPUT",
"--network=host",
"datalayer/jupyter-mcp-server:latest"
],
"env": {
"JUPYTER_URL": "http://localhost:8888",
"JUPYTER_TOKEN": "MY_TOKEN",
"ALLOW_IMG_OUTPUT": "true"
}
}
}
}
[!TIP]
- Port Configuration: Ensure the
portin your Jupyter URLs matches the one used in thejupyter labcommand. For simplified config, set this inJUPYTER_URL.- Server Separation: Use
JUPYTER_URLwhen both services are on the same server, or set individual variables for advanced deployments. The different URL variables exist because some deployments separate notebook storage (DOCUMENT_URL) from kernel execution (RUNTIME_URL).- Authentication: In most cases, document and runtime services use the same authentication token. Use
JUPYTER_TOKENfor simplified config or setDOCUMENT_TOKENandRUNTIME_TOKENindividually for different credentials.- Notebook Path: The
DOCUMENT_IDparameter specifies the path to the notebook the MCP client default to connect. It should be relative to the directory where JupyterLab was started. If you omitDOCUMENT_ID, the MCP client can automatically list all available notebooks on the Jupyter server, allowing you to select one interactively via your prompts.- Image Output: Set
ALLOW_IMG_OUTPUTtofalseif your LLM does not support mutimodel understanding.
For detailed instructions on configuring various MCP clients—including Claude Desktop, VS Code, Cursor, Cline, and Windsurf — see the Clients documentation.
✅ Best Practices
- Interact with LLMs that supports multimodal input (like Gemini 2.5 Pro) to fully utilize advanced multimodal understanding capabilities.
- Use a MCP client that supports returning image data and can parse it (like Cursor, Gemini CLI, etc.), as some clients may not support this feature.
- Break down complex task (like the whole data science workflow) into multiple sub-tasks (like data cleaning, feature engineering, model training, model evaluation, etc.) and execute them step-by-step.
- Provide clearly structured prompts and rules (👉 Visit our Prompt Templates to get started)
- Provide as much context as possible (like already installed packages, field explanations for existing datasets, current working directory, detailed task requirements, etc.).
🤝 Contributing
We welcome contributions of all kinds! Here are some examples:
- 🐛 Bug fixes
- 📝 Improvements to existing features
- ✨ New feature development
- 📚 Documentation improvements and prompt templates
For detailed instructions on how to get started with development and submit your contributions, please see our Contributing Guide.
Our Contributors
📚 Resources
Looking for blog posts, videos, or other materials about Jupyter MCP Server?
👉 Visit the Resources section in our documentation for more!
If this project is helpful to you, please give us a ⭐️
Made with ❤️ by Datalayer
Star History
Repository Owner
Organization
Repository Details
Programming Languages
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
JupyterMCP
Enable direct Claude AI integration with Jupyter Notebook via the Model Context Protocol.
JupyterMCP integrates Jupyter Notebook (version 6.x) with Claude AI using the Model Context Protocol, enabling real-time interaction between AI models and live notebooks. It facilitates two-way communication, allowing Claude AI to execute code, manipulate cells, and retrieve outputs directly within the notebook. The system comprises a WebSocket server, client-side JavaScript, and an MCP server for seamless protocol implementation. Designed for developers and data scientists, it brings advanced AI assistance into interactive notebook environments.
- ⭐ 111
- MCP
- jjsantos01/jupyter-notebook-mcp
MyMCP Server (All-in-One Model Context Protocol)
Powerful and extensible Model Context Protocol server with developer and productivity integrations.
MyMCP Server is a robust Model Context Protocol (MCP) server implementation that integrates with services like GitLab, Jira, Confluence, YouTube, Google Workspace, and more. It provides AI-powered search, contextual tool execution, and workflow automation for development and productivity tasks. The system supports extensive configuration and enables selective activation of grouped toolsets for various environments. Installation and deployment are streamlined, with both automated and manual setup options available.
- ⭐ 93
- MCP
- nguyenvanduocit/all-in-one-model-context-protocol
Zettelkasten MCP Server
A Zettelkasten-based knowledge management system implementing the Model Context Protocol.
Zettelkasten MCP Server provides an implementation of the Zettelkasten note-taking methodology, enriched with bidirectional linking, semantic relationships, and categorization of notes. It enables creation, exploration, and synthesis of atomic knowledge using MCP for AI-assisted workflows. The system integrates with clients such as Claude and supports markdown, advanced search, and a structured prompt framework for large language models. The dual storage architecture and synchronous operation model ensure flexibility and reliability for managing personal or collaborative knowledge bases.
- ⭐ 114
- MCP
- entanglr/zettelkasten-mcp
MCP Server for Data Exploration
Interactive Data Exploration and Analysis via Model Context Protocol
MCP Server for Data Exploration enables users to interactively explore and analyze complex datasets using prompt templates and tools within the Model Context Protocol ecosystem. Designed as a personal Data Scientist assistant, it facilitates the conversion of raw data into actionable insights without manual intervention. Users can load CSV datasets, run Python scripts, and generate tailored reports and visualizations through an AI-powered interface. The server integrates directly with Claude Desktop, supporting rapid setup and seamless usage for both macOS and Windows.
- ⭐ 503
- MCP
- reading-plus-ai/mcp-server-data-exploration
Lucidity MCP
Intelligent prompt-based code quality analysis for AI coding assistants.
Lucidity MCP is a Model Context Protocol (MCP) server that empowers AI coding assistants to deliver high-quality code through intelligent, prompt-driven analysis. It offers comprehensive detection of code issues across multiple quality dimensions, providing structured and actionable feedback. With language-agnostic capabilities, extensible framework, and flexible transport options, Lucidity MCP seamlessly integrates into developer workflows and AI systems.
- ⭐ 72
- MCP
- hyperb1iss/lucidity-mcp
MCP Atlassian
AI-powered MCP server integrating Confluence and Jira workflows.
MCP Atlassian serves as a Model Context Protocol (MCP) server interface for Atlassian products such as Confluence and Jira, supporting both cloud and server/data center deployments. It enables AI assistants to access, search, and update Atlassian data contextually via standardized MCP endpoints. The integration streamlines tasks like intelligent issue filtering, documentation creation, and context-driven updates directly through natural language. Multiple authentication modes, including API tokens and OAuth 2.0, are supported for secure connectivity.
- ⭐ 3,574
- MCP
- sooperset/mcp-atlassian
Didn't find tool you were looking for?