Jupyter MCP Server is an extension for Jupyter environments that integrates LLMs with real-time coding classes. By implementing the Mannequin Context Protocol (MCP), it allows AI fashions to work together with Jupyter’s kernel, file system, and terminal in a safe and context-aware method. On this weblog, we are going to discover find out how to use Jupyter MCP Server to your system.
What are MCP Servers and why do we want MCP Servers?
MCP (Mannequin Context Protocol) Servers are devoted go-between that facilitate communication between AI assistants and functions or environments exterior of them. They permit AI fashions to run in a state-aware method, providing them real-time context comparable to variable values, code historical past, datasets, and outcomes of execution.

With out MCP servers, AI fashions function in a vacuum with no information of pre-set variables. This isolation constrains their means and potential for making errors. MCP servers handle this problem by offering AI with the ability to purpose, carry out, and enhance in a real-time surroundings, enabling them to grow to be extra useful, exact, and efficient.
What’s Jupyter MCP Server?

Jupyter MCP Server is a device that acts as a bridge between a massive language mannequin and the person’s dwell Jupyter surroundings. By primarily utilizing the Mannequin Context Protocol (MCP). Eliminating the restrictions of fashions by counting on copying and pasting code and information. MCP has a safe protocol by means of which fashions can entry and work together with numerous elements of a Jupyter ecosystem. This opens up the idea of built-in, context-aware, and highly effective AI-driven help.
Options of Jupyter MCP Server
Via the Mannequin Context Protocol (MCP), the Jupyter MCP Server offers a structured means for exterior functions to work together with core Jupyter elements.

- Kernel Interplay: Helps execution of code inside lively Jupyter kernels, retrieval of variable states, and administration of kernel lifecycle.
- File System Entry: Gives managed entry to the person’s workspace, permitting studying, writing, and administration of recordsdata and directories by means of Jupyter’s Content material Supervisor.
- Terminal Entry: Permits interplay with Jupyter’s terminal classes, permitting execution of shell instructions, package deal installations, and automation of system duties
- Actual-Time- Collaboration: Permits a number of customers or AI brokers to view and edit notebooks concurrently.
- Pocket book Administration: Environment friendly pocket book administration contains saving and retrieving pocket book data, guaranteeing information integrity and accessibility.
Let’s now perceive a few of these options intimately.
Key Functionalities of Jupyter MCP Server
The system consists of three major elements: kernel Interplay, File System Entry, and Terminal Entry.
This allows exterior functions to interface with Jupyter environments by working code, managing recordsdata, and controlling terminal classes, respectively. Within the coming sections, we are going to perceive every certainly one of them intimately:
Kernel Interplay
It lets Jupyter MCP Server run code contained in the person’s lively kernels. It additionally inspects kernel state, retrieves execution outcomes, and even manages kernel lifecycle.
The way it works: The MCP Consumer sends requests to the MCP API, specifying the goal kernel and the motion. Then, the MCP server communicates with Jupyter’s kernel Supervisor to course of the request.

Potential Actions:
- Operating code cells
- Retrieving variable values
- Checking kernel standing
- Interrupting or restarting kernels
File System Entry
It offers managed entry to the person’s workspace, permitting exterior functions to learn, write, or handle recordsdata and directories.
The way it works: The MCP shopper requests file operations beneath the principles set by Jupyter’s Content material Supervisor and MCP’s safety insurance policies.
Potential Actions:
- Studying file contents
- Writing or modifying recordsdata
- Creating or deleting recordsdata and folders
Terminal Entry
It permits Jupyter MCP Server to work together with Jupyter’s terminal classes.
The way it works: The MCP shopper sends instructions to a selected terminal session, and Jupyter’s Terminal Supervisor processes the request, returning any output.
Potential Actions:
- Operating shell instructions
- Putting in packages
- Managing background processes
- Automating system duties
How one can Combine Jupyter MCP Server?
This part outlines the steps required for the combination of the Jupyter MCP Server. However earlier than diving into the set up and configuration course of, let’s first evaluate the stipulations wanted to arrange the Jupyter MCP Server correctly. For an in depth walkthrough, check with this Jupyter MCP Server tutorial to make sure you’re totally ready earlier than beginning the setup.
As soon as the stipulations are met, we’ll proceed with the set up and setup steps.
Conditions
Earlier than putting in Jupyter MCP Server, guarantee the next necessities are in place :
- Python 3.8 or above: The server is constructed on trendy Python options and requires an up-to-date surroundings
- Jupyter Server: MCP Server operates as an extension of the Jupyter Server. If not already put in, you may add it utilizing the next command.
pip set up jupyter-server
Set up
Because you’re accomplished with the stipulations, let’s carry out the steps to obtain Jupyter MCP Server.
1. Obtain
There are two methods in which you’ll obtain the Jupyter MCP server
Customary Set up
Putting in Jupyter MCP Server immediately from PyPI utilizing pip:
pip set up jupyter-mcp-server
Growth Set up
You may also clone the supply code repository from right here
Step 1: Clone the above-mentioned repository
git clone https://github.com/datalayer/jupyter-mcp-server.git
cd jupyter-mcp-server
Step 2: Obtain Editable Mode: This lets you make adjustments within the supply code that shall be mirrored.
Use the -e flag with pip to put in the package deal in editable mode.
Pip set up -e
In the event you plan to run exams and contribute, you should use the next code:
Pip set up -e “.[dev]”
2. Activate Extension
As soon as put in (both the best way defined above), it is advisable allow the extension for the Jupyter server. This hundreds and makes use of the MCP server performance. Modifying Jupyter configurations, and updating the checklist of lively extensions with the MCP server.
jupyter server extension allow jupyter_mcp_server
As soon as accomplished with the above steps, you may confirm your set up with the Jupyter server extension checklist.
jupyter server extension checklist
Professional tip: In the event you see jupyter_mcp_server within the checklist, then it’s activated.
Jupyter MCP Server Working
The Jupyter MCP Server gained’t be a visual interface as a substitute, it’s inside JupyterLAB or Pocket book. It affords an HTTP API that different instruments, comparable to Claude Desktop, AI fashions, backends, or plugins.
When utilizing Claude Desktop, make adjustments within the claude_desktop_config.json. The TOKEN worth and NOTEBOOK_PATH may be obtained from the terminal when you run your Jupyter pocket book
Code for Home windows:
{
"mcpServers": {
"jupyter": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SERVER_URL",
"-e",
"TOKEN",
"-e",
"NOTEBOOK_PATH",
"datalayer/jupyter-mcp-server:latest"
],
"env": {
"SERVER_URL": "http://host.docker.inner:8888",
"TOKEN": "MY_TOKEN",
"NOTEBOOK_PATH": "pocket book.ipynb"
}
}
}
}
Code for Linux:
CLAUDE_CONFIG=${HOME}/.config/Claude/claude_desktop_config.json
cat $CLAUDE_CONFIG
{
"mcpServers": {
"jupyter": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SERVER_URL",
"-e",
"TOKEN",
"-e",
"NOTEBOOK_PATH",
"--network=host",
"datalayer/jupyter-mcp-server:latest"
],
"env": {
"SERVER_URL": "http://localhost:8888",
"TOKEN": "MY_TOKEN",
"NOTEBOOK_PATH": "pocket book.ipynb"
}
}
}
}
EOF
cat $CLAUDE_CONFIG
As soon as accredited, if it desires to work together together with your Jupyter session, it sends a request to this API. The MCP Server handles the request by checking if it’s allowed, speaking with the suitable a part of Jupyter, such because the kernel, file system, or terminal, and sending again the required response.
The API endpoint supplied by the MCP extension, which lives at /mcp/v1, is simply an added path to your Jupyter Server’s base URL.
So, in case your Jupyter server is working domestically at http://localhost:8888/, you will discover the MCP API at http://localhost:8888/mcp/v1. That is the place exterior instruments just like the Jupyter MCP server will attain out to speak together with your Jupyter surroundings.
HTTP requests are despatched by the Jupyter MCP Server, like GET, POST, PUT, or DELETE, relying on the duty. Every request goes to a selected subpath beneath /mcp/v1. These request patterns and information constructions make up what’s often called the Mannequin Context Protocol (MCP). For extra particulars, you may check with the primary README file within the undertaking explaining the position of the endpoint.
Fingers-on Utility
Within the hands-on, we are going to see find out how to:
- Add code cells: These are sections the place you may write and run the code.
- Run your code: Simply hit a button to see the outcomes immediately
- Add textual content with markdown: Use markdown cells to put in writing notes, explanations, or headings to make your work look organized.
Supply: LinkedIn
It’s like having a pocket book excellent for studying and experimenting.
Context Administration and Safety of Jupyter MCP
MCP isn’t about enabling entry, it ensures managed and safe entry. The protocol enforces authorization and scoping, i.e., limiting entry to what’s explicitly allowed. Customers have visibility and management over what functions can entry their session and what they do.This prevents unauthorized entry, protects person information, and retains the Jupyter surroundings safe.
Conclusion
Hope you Jupyter MCP Server tutorial useful! The Jupyter MCP Server brings smarter, AI-powered interactions to your Jupyter surroundings.It makes use of the Mannequin Context Protocol (MCP) to do that safely and in a standardized means. The server is already out there and straightforward to arrange. I imagine that as adoption grows, we will anticipate extra clever, context-aware instruments that don’t simply help however really perceive our workflow. Therefore, bridging the hole between highly effective AI fashions and dynamic environments.
Login to proceed studying and luxuriate in expert-curated content material.