# jupyter-mcp-server [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/ChengJiale150/jupyter-mcp-server  
**GitHub Stars:** 9  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/jupyter-mcp-server

## Description
A powerful MCP server for AI-driven Jupyter Notebook management and execution

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "jupyter-mcp-server": {
    "command": "uvx",
    "args": ["better-jupyter-mcp-server"],
    "env": {
      "ALLOW_IMG": ""
    }
  }
}
```

**Requires environment variables:** `ALLOW_IMG` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What jupyter-mcp-server does

The jupyter-mcp-server MCP server gives an AI client access to Jupyter notebooks through the Model Context Protocol. It supports more than one connected notebook, allowing an agent to switch between notebooks during a larger analysis or development task.

Notebook operations include connecting to or creating a notebook by path, listing active notebook connections, restarting a notebook kernel, and reading notebook source without outputs. Cell operations cover listing cell metadata, reading cell contents, inserting or deleting cells, replacing cell content, and executing a selected cell.

The server also includes two combined or temporary execution paths. `append_execute_code_cell` adds a code cell at the end of a notebook and runs it, while `execute_temporary_code` runs code without saving it to the notebook. Cell results can include text, images, and tables when image output is enabled and the client can process those response types.

## How it works

The jupyter-mcp-server MCP server communicates with a running Jupyter Server and its kernels. Before using the MCP tools, the client needs the Jupyter Server URL and its authentication token.

A typical workflow is to connect a notebook, inspect its cells, execute or modify selected cells, and read the resulting output. Connecting can take approximately 10 to 30 seconds because a kernel must be started. Restarting a notebook clears its imported packages and variables.

The MCP process uses stdio transport. The repository can be launched with FastMCP through `uv`, or installed for client configuration with `uvx` using the `better-jupyter-mcp-server` package command.

## Setup and configuration

The documented environment requires Python 3.12 or newer and `uv`. An Anaconda environment is recommended by the project. For a source installation, clone the repository, run `uv sync`, and start it with `uv run fastmcp run src/main.py`.

A Jupyter environment must also be prepared. The documented setup installs `jupyter`, `nbformat`, `datalayer_pycrdt`, and `jupyter-collaboration`, then starts Jupyter Lab. Run `jupyter server list` to obtain the server URL and token. The Jupyter project directory should be the location containing the notebooks the client needs to access.

The sample MCP configuration uses stdio and can set `ALLOW_IMG` to `true` to permit image data in responses. Source users can adjust related settings in `src/config.toml`. Client-specific integration details are maintained separately in the repository documentation.

## Tools and capabilities

- Connect to or create a notebook by path with `connect_notebook`.
- List active notebook connections with `list_notebook`.
- Inspect notebook source and cell metadata with `read_notebook` and `list_cell`.
- Read, insert, delete, overwrite, and execute cells.
- Restart a notebook kernel.
- Append and execute a code cell in one operation.
- Run unsaved temporary code for debugging, magic commands, or intermediate values.
- Return supported text, image, and table outputs from cell reads and execution.

## Limitations and notes

The server requires a reachable Jupyter Server and its authentication token; installing the MCP package alone does not provide that notebook backend. Notebook connection is slower than ordinary metadata operations because kernel startup is involved.

Image output depends on configuration and client support. The README specifically recommends a multimodal model and an MCP client that can receive and interpret image data, noting that some clients may not support this response type. For large data-science tasks, the project recommends splitting work into smaller stages and providing notebook paths, dataset context, and clear task instructions.

_Full upstream README: https://allmcps.com/mcp/jupyter-mcp-server/readme_

