jupyter-mcp-server
πͺ β¨ Model Context Protocol (MCP) Server for Jupyter. Python-based implementation. Trusted by 700+ developers. Trusted by 700+ developers.
Documentation
π Documentation Β· π§ Tools Β· π¬ Community
No process to run. Datalayer now hosts this server for you at
`https://mcp.datalayer.run/mcp` β one endpoint for every agent and every notebook.
Sign in from your browser, approve what the agent may do, and your work keeps running
on the server after the agent disconnects.
β **Hosted Jupyter MCP Server**

One command to connect Claude Code, with `/datalayer:notebook`, `/datalayer:run` and
`/datalayer:status` on top:
/plugin marketplace add datalayer/jupyter-mcp-server
/plugin install datalayerβ **Datalayer plugin for Claude Code**
Free and open source, BSD 3-Clause β point it at any Jupyter you already run, local or
JupyterHub, no account needed.
Built and maintained by **Datalayer**, where the same server drives
always-on Notebooks with GPU Code Sandboxes and durable execution β so your agent keeps
working on your data when your laptop does not.
No token to copy and paste. An agent that meets this server unauthenticated is told
where to authenticate, opens your browser, and you sign in to Datalayer as yourself. The
agent never sees your password β it receives a token scoped to what you approved, and you
can disconnect one agent without touching the others.
What each agent may do is two separate decisions: the scopes you approve
(`notebooks:read`, `notebooks:write`, `code:execute`, `data:read`) say what kind of
operation it may perform, and your own Datalayer permissions still say which notebooks it
may touch. An agent can never reach a notebook you cannot.
Personal access tokens keep working, and remain the simpler path for a CLI or a script.
Pin `code-sandboxes` to match your `jupyter-mcp-server`. The sandbox variant
`jupyter` was renamed to `jupyter-server` in `code-sandboxes` 1.1.1, and the two packages
have to agree on the name.
| Your `jupyter-mcp-server` | Install |
|---|---|
| >= 1.5.0 | `code-sandboxes >= 1.1.1` |
| **=1.5.0" "code-sandboxes>=1.1.1" |
Staying on an earlier jupyter-mcp-server
| pip install "jupyter-mcp-server=2,= 2.0.0** | `mcp >= 2` |
|---|---|
| ** |
π¦ Using uvx (Quick Start)
First, install `uv`:
pip install uv
uv --version
# should be 0.6.14 or higherSee 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"
}
}
}
}π³ Using Docker (Production)
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"
}
}
}
}1. Port Configuration: Ensure the `port` in your Jupyter URLs matches the one used in the `jupyter lab` command. For simplified config, set this in `JUPYTER_URL`.
1. Server Separation: Use `JUPYTER_URL` when 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 (`CODE_SANDBOX_URL`).
1. Authentication: In most cases, document and code sandbox services use the same authentication token. Use `JUPYTER_TOKEN` for simplified config or set `DOCUMENT_TOKEN` and `CODE_SANDBOX_TOKEN` individually for different credentials.
1. Notebook Path: The `DOCUMENT_ID` parameter 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 omit `DOCUMENT_ID`, the MCP client can automatically list all available notebooks on the Jupyter server, allowing you to select one interactively via your prompts.
1. Image Output: Set `ALLOW_IMG_OUTPUT` to `false` if 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 MCP Client Configuration.
π§© Sandbox Variants
By default, code executes through the `code-sandboxes` `jupyter-server` variant against
a Jupyter Server (`SANDBOX_VARIANT=jupyter-server`). Setting `SANDBOX_VARIANT` to any
other value uses another code-sandboxes
engine via the sandbox's plain kernel client when the selected variant exposes
one, so the same notebook tools can run code on additional backends.
The spelling is not fussy: `google_colab`, `google-colab` and `GOOGLE-COLAB` all name the
same variant. The names below are the canonical ones.
Sandbox features are provided by the optional `jupyter_mcp_sandboxes` extension.
To expose sandbox lifecycle tools (`launch_sandbox`, `list_sandboxes`,
`use_sandbox`, `terminate_sandbox`) or run any non-`jupyter-server` sandbox variant,
install it with `pip install jupyter_mcp_sandboxes`.
| Engine | `SANDBOX_VARIANT` | Extra install | Key variables | Docs |
|---|---|---|---|---|
| Jupyter Server (default) | `jupyter-server` | β | `JUPYTER_URL`, `JUPYTER_TOKEN` | Setup |
| JupyterHub | `jupyter-server` | β | `CODE_SANDBOX_URL`, `CODE_SANDBOX_TOKEN` | Setup |
| Datalayer | `datalayer` | `jupyter-mcp-server[datalayer]` | `CODE_SANDBOX_URL`, `CODE_SANDBOX_TOKEN`, `SANDBOX_ENVIRONMENT` | Setup |
| Kaggle | `kaggle` | `jupyter-mcp-server[kaggle]` | Kaggle credentials, or `CODE_SANDBOX_URL` for interactive mode | Setup |
| Google Colab | `google-colab` | `jupyter-mcp-server` | `CODE_SANDBOX_URL`, `CODE_SANDBOX_ID`, `CODE_SANDBOX_PROXY_TOKEN` | Setup |
| Monty | `monty` | `jupyter-mcp-server[monty]` | β | Setup |
| Modal | `modal` | `jupyter-mcp-server[modal]` | Modal credentials | Setup |
| Daytona | `daytona` | `jupyter-mcp-server[daytona]` | `DAYTONA_API_KEY`, or `DAYTONA_JWT_TOKEN` + `DAYTONA_ORGANIZATION_ID` | Setup |
| E2B | `e2b` | `jupyter-mcp-server[e2b]` | `E2B_API_KEY` | Setup |
| CoreWeave | `coreweave` | `jupyter-mcp-server[coreweave]` | `CWSANDBOX_API_KEY` | Setup |
| Cloudflare | `cloudflare` | `jupyter-mcp-server[cloudflare]` | `CLOUDFLARE_SANDBOX_API_URL`, `CLOUDFLARE_SANDBOX_API_KEY` | Setup |
Each engine has its own page with the credentials it needs, the accelerator options it
accepts and a worked client configuration β start from
**jupyter-mcp-server.datalayer.tech/code-sandboxes**.
π§ͺ Testing
Run the test suite:
pytest tests/Required environment variables for tests:
- None for the default local suite.
Optional environment variables:
- `TEST_MCP_SERVER`: `true`/`false` toggle for standalone MCP server mode tests (default `true`).
- `TEST_JUPYTER_SERVER`: `true`/`false` toggle for Jupyter extension mode tests (default `true`).
- `DATALAYER_API_KEY`: required only for Datalayer cloud smoke/integration tests.
- `DATALAYER_RUN_URL`: optional custom Datalayer code sandbox URL for datalayer engine tests.
- `SANDBOX_ENVIRONMENT`: optional cloud environment override (for example `ai-agents-env`).
β 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!
Frequently asked questions
What is jupyter-mcp-server?
jupyter-mcp-server is πͺ β¨ Model Context Protocol (MCP) Server for Jupyter. Python-based implementation. Trusted by 700+ developers. Trusted by 700+ developers.
How do I install jupyter-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is jupyter-mcp-server open source?
Yes β it is hosted on GitHub at https://github.com/datalayer/jupyter-mcp-server and has 741 stars.
Related MCP tools
A middleware to provide an openAI compatible endpoint that can call MCP tools Python-based implementation. Trusted by 800+ developers.
Chat with your Kubernetes Cluster using AI tools and IDEs like Claude and Cursor! for the Model Context Protocol. Enhance AI assistants with powerful integratio
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth! Python-based implementation. Trusted by 11000+ developers.
ACI.dev is the open source tool-calling platform that hooks up 600+ tools into any agentic IDE or custom AI agent through direct function calling or a unifie...
AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP. Python-based implementation. Trusted by 4100+ developers.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP