Jupyter + MCP with comprehensive resource support
Project description
JupyMCP
JupyMCP is a Model Context Protocol (MCP) server for Jupyter Notebooks that provides both tools and resources for comprehensive notebook interaction.
Installation
Install JupyMCP using uvx (recommended) or pip:
# Using uvx (no installation needed, auto-managed)
uvx jupymcp
# Or using uv
uv tool install jupymcp
# Or using pip
pip install jupymcp
Setting up Kernels
JupyMCP requires Jupyter kernels to execute code. Below are examples for setting up common kernels with isolated environments.
Before installation
It is highly recommended that set JUPYTER_PATH if you want all kernels install to the managed environment.
Python (IPython)
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install IPython kernel
pip install ipykernel
python -m ipykernel install --user --name myproject --display-name "Python (myproject)"
R
# In R console - create renv environment
# if you are using macOS & Homebrew, please remember that set ~/.R/Makevars
install.packages("renv")
renv::init()
# Install IRkernel
renv::install('IRkernel')
IRkernel::installspec(name = 'myproject-r', displayname = 'R (myproject)')
Rust
# Install evcxr_jupyter
# it is recommended that using msvc toolchain on Windows to avoid dlltool.exe problem
cargo install evcxr_jupyter --root ${PWD}
evcxr_jupyter --install
Julia
# In Julia REPL - activate project environment
using Pkg
Pkg.activate(".")
# Install IJulia
Pkg.add("IJulia")
# Optionally install kernel with custom name
using IJulia
installkernel("Julia myproject")
To verify installed kernels:
jupyter kernelspec list
Using Docker/Podman
For a pre-configured environment with multiple kernels (Python, R, Julia), you can use the official Jupyter Docker images:
# Using Docker
docker run -it --rm \
-p 8888:8888 \
-v "${PWD}":/home/jovyan/work \
quay.io/jupyter/datascience-notebook
# Using Podman
podman run -it --rm \
-p 8888:8888 \
-v "${PWD}":/home/jovyan/work \
quay.io/jupyter/datascience-notebook
The datascience-notebook image includes:
- Python (with scientific libraries: NumPy, Pandas, Matplotlib, etc.)
- R (with tidyverse and other packages)
- Julia
You can find more images at Jupyter Docker Stacks.
Usage
{
"mcpServers": {
"jupymcp": {
"command": "uvx",
"args": ["jupymcp"]
}
}
}
from mcp.client.stdio import StdioServerParameters
from swarmx import Agent
agent = Agent(
mcpServers={
"jupymcp": StdioServerParameters(
command="uvx",
args=["jupymcp"],
)
}
)
You do not need to specify the server URL, token, or path. JupyMCP will automatically manage them for you.
Connecting to Remote Jupyter Server
JupyMCP can connect to an existing Jupyter server instead of managing kernels locally:
{
"mcpServers": {
"jupymcp": {
"command": "uvx",
"args": [
"jupymcp",
"--jupyter-url", "http://localhost:8888",
"--jupyter-token", "your-token-here"
]
}
}
}
Or from command line:
uvx jupymcp --jupyter-url http://localhost:8888 --jupyter-token your-token-here
This is useful when:
- Using Jupyter in Docker/Podman containers
- Connecting to JupyterHub or JupyterLab servers
- Working with remote compute resources
To get your Jupyter server token:
jupyter server list
# or
jupyter notebook list
Alternatives
Features
JupyMCP provides comprehensive Jupyter Notebook integration through MCP:
Tools
- Cell Execution: Execute, add, and modify notebook cells, and return outputs (support image & audio)
- Cell Management: Add, insert, and manage code, markdown, and raw cells
- Metadata Operations: Get and set cell and notebook metadata
Resources
- Kernel Specs: List available kernel specifications via
jupyter://kernelspecs - Kernels: List running kernels via
jupyter://kernels - Notebooks: Read and write notebook files via
notebook://{path}
Why yet another one?
I personally want a full-featured Jupyter Notebook server that can be used as a MCP server. All of the above alternatives are either not meeting my requirements (e.g. lack of editing).
Why not a folk of one of the above?
I think it's better to start from scratch with LLM assistance. LLM-driven bootstrap is fun.
Roadmap
- Multiple Kernel support
- Multiple Notebook support
- Multimedia output support
- Authentication & security
- Notebook import/export
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupymcp-0.3.0.tar.gz.
File metadata
- Download URL: jupymcp-0.3.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.20 {"installer":{"name":"uv","version":"0.9.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bf55c7765b140a1ac53a86023170a92175b7c8351846709c717d9acd2f2c006
|
|
| MD5 |
4878a91291164f048b6a03c42198c7e5
|
|
| BLAKE2b-256 |
bc3b1b2b248ce5e8660aebf4c04431e7791c2ba6c8adcdaf06935a8334539183
|
File details
Details for the file jupymcp-0.3.0-py3-none-any.whl.
File metadata
- Download URL: jupymcp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.20 {"installer":{"name":"uv","version":"0.9.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccb196bfa2bce155d4407f5a830ec480ea9ec62b291b0651027dfa778b917abb
|
|
| MD5 |
84db043f4875550494bdd87c1696f92f
|
|
| BLAKE2b-256 |
8b928b19fff36120a384b6fdba904446432f4ac2dbbf2f2d7136533407a57d68
|