Jupyter MCP Server is an extension for Jupyter environments that integrates LLMs with real-time coding periods. By implementing the Mannequin Context Protocol (MCP), it permits 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 the way 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 purposes or environments exterior of them. They permit AI fashions to run in a state-aware method, providing them real-time context corresponding to variable values, code historical past, datasets, and outcomes of execution.

With out MCP servers, AI fashions function in a vacuum with no data of pre-set variables. This isolation constrains their capacity and potential for making errors. MCP servers tackle this subject by offering AI with the ability to purpose, carry out, and enhance in a real-time atmosphere, enabling them to develop into extra purposeful, exact, and efficient.
What’s Jupyter MCP Server?

Jupyter MCP Server is a software that acts as a bridge between a giant language mannequin and the consumer’s reside Jupyter atmosphere. By primarily utilizing the Mannequin Context Protocol (MCP). Eliminating the restrictions of fashions by counting on copying and pasting code and knowledge. MCP has a safe protocol by 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
By means of the Mannequin Context Protocol (MCP), the Jupyter MCP Server supplies a structured manner for exterior purposes 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 consumer’s workspace, permitting studying, writing, and administration of information and directories by Jupyter’s Content material Supervisor.
- Terminal Entry: Permits interplay with Jupyter’s terminal periods, 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 info, making certain knowledge integrity and accessibility.
Let’s now perceive a few of these options intimately.
Key Functionalities of Jupyter MCP Server
The system consists of three important elements: kernel Interplay, File System Entry, and Terminal Entry.
This permits exterior purposes to interface with Jupyter environments by working code, managing information, and controlling terminal periods, respectively. Within the coming sections, we are going to perceive every one in every of them intimately:
Kernel Interplay
It lets Jupyter MCP Server run code contained in the consumer’s lively kernels. It additionally inspects kernel state, retrieves execution outcomes, and even manages kernel lifecycle.
The way it works: The MCP Shopper 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:
- Working code cells
- Retrieving variable values
- Checking kernel standing
- Interrupting or restarting kernels
File System Entry
It supplies managed entry to the consumer’s workspace, permitting exterior purposes to learn, write, or handle information and directories.
The way it works: The MCP consumer requests file operations below the principles set by Jupyter’s Content material Supervisor and MCP’s safety insurance policies.
Potential Actions:
- Studying file contents
- Writing or modifying information
- Creating or deleting information and folders
Terminal Entry
It permits Jupyter MCP Server to work together with Jupyter’s terminal periods.
The way it works: The MCP consumer sends instructions to a selected terminal session, and Jupyter’s Terminal Supervisor processes the request, returning any output.
Potential Actions:
- Working 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, discuss with this Jupyter MCP Server tutorial to make sure you’re absolutely 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 atmosphere
- 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 achieved 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
Normal Set up
Putting in Jupyter MCP Server straight from PyPI utilizing pip:
pip set up jupyter-mcp-server
Improvement Set up
You can even 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 modifications within the supply code that might be mirrored.
Use the -e flag with pip to put in the package deal in editable mode.
Pip set up -e
For those who 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 way in which defined above), it is advisable to allow the extension for the Jupyter server. This hundreds and makes use of the MCP server performance. Modifying Jupyter configurations, and updating the record of lively extensions with the MCP server.
jupyter server extension allow jupyter_mcp_server
As soon as achieved with the above steps, you may confirm your set up with the Jupyter server extension record.
jupyter server extension record
Professional tip: For those who see jupyter_mcp_server within the record, 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, corresponding to Claude Desktop, AI fashions, backends, or plugins.
When utilizing Claude Desktop, make modifications 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.inside: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 authorised, if it desires to work together along 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 offered 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 regionally at http://localhost:8888/, you’ll find 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 along with your Jupyter atmosphere.
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 below /mcp/v1. These request patterns and knowledge buildings make up what’s generally known as the Mannequin Context Protocol (MCP). For extra particulars, you may discuss with the principle README file within the undertaking explaining the function of the endpoint.
Fingers-on Utility
Within the hands-on, we are going to see the way 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 write down 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 purposes can entry their session and what they do.This prevents unauthorized entry, protects consumer knowledge, and retains the Jupyter atmosphere safe.
Conclusion
Hope you Jupyter MCP Server tutorial useful! The Jupyter MCP Server brings smarter, AI-powered interactions to your Jupyter atmosphere.It makes use of the Mannequin Context Protocol (MCP) to do that safely and in a standardized manner. The server is already obtainable and simple to arrange. I consider that as adoption grows, we will anticipate extra clever, context-aware instruments that don’t simply help however actually 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.