Fire in da houseTop Tip:Most people pay up to $340 per month for Perplexity, MidJourney, Runway, ChatGPT, and more - but you can get them all your AI tools for $15 with Galaxy. It's free to test!Fire in da houseCheck it out

mcp-server-jupyter

MCP.Pizza Chef: ihrpr

mcp-server-jupyter is an MCP server that provides programmatic access to Jupyter notebooks and JupyterLab environments. It offers tools to read notebook content with or without outputs, manipulate individual cells by adding or editing them, and extract outputs from specific cells. This server enables automated workflows and integrations involving Jupyter notebooks, facilitating dynamic notebook interaction and modification within AI-enhanced environments.

Use This MCP server To

Read full Jupyter notebooks including cell outputs programmatically Extract outputs from specific notebook cells for analysis Add new code or markdown cells to existing notebooks Edit content of existing notebook cells dynamically Read notebook content without outputs to handle size constraints Integrate Jupyter notebook manipulation into AI workflows

README

mcp-server-jupyter

An MCP server for managing and interacting with Jupyter notebooks programmatically.

Demo

Components

Tools

The server provides six tools for notebook manipulation:

  1. read_notebook_with_outputs: Read a notebook's content including cell outputs

    • Required: notebook_path (string)
  2. read_notebook_source_only: Read notebook content without outputs

    • Required: notebook_path (string)
    • Use when size limitations prevent reading full notebook with outputs
  3. read_output_of_cell: Read output of a specific cell

    • Required:
      • notebook_path (string)
      • cell_id (string)
  4. add_cell: Add new cell to notebook

    • Required:
      • notebook_path (string)
      • source (string)
    • Optional:
      • cell_type (string): "code" or "markdown"
      • position (integer): insertion index (-1 to append)
  5. edit_cell: Modify existing cell content

    • Required:
      • notebook_path (string)
      • cell_id (string): Unique ID of the cell to edit
      • source (string)
  6. execute_cell: Execute a specific cell and return its output

    • Required:
      • notebook_path (string)
      • cell_id (string)
    • Useful for verifying cell execution and output

Usage with Claude Desktop

Step1: Start JupyterLab or Jupyter Notebook

By using uv to run Jupyter notebooks it's much easier to manage venv and package installations.

Follow uv jupyter docummentation for more details.

uv venv --seed
source .venv/bin/activate
uv pip install jupyterlab
.venv/bin/jupyter lab

NOTE: this environment should be used as UV_PROJECT_ENVIRONMENT env variable in MCP server (next step). Run in the same folder where Jupyter started.

echo $(pwd)/.venv

Step2: Configure Claude Desctop Add this configuration to your Claude Desktop config file:

PyPi package:

// ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "Jupyter-notebook-manager": {
      "command": "uv",
      "args": ["run", "--with", "mcp-server-jupyter", "mcp-server-jupyter"],
      "env": {
        "UV_PROJECT_ENVIRONMENT": "/path/to/venv_for_jupyter/.venv"
      }
    }
  }
}

Git repo fork

// ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "Jupyter-notebook-manager": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/Users/inna/mcp-server-jupyter/src/mcp_server_jupyter",
        "mcp-server-jupyter"
      ],
      "env": {
        "UV_PROJECT_ENVIRONMENT": "/path/to/venv_for_jupyter/.venv"
      }
    }
  }
}

Step 3: Open Notebook & Claude Chat

Open or create a notebook in JupyterLab/Jupyter Notebook

Get the full path to your notebook:

  • In JupyterLab: Right-click on the notebook in the file browser → "Copy Path"
  • In Jupyter Notebook: Copy the path from the URL (modify to full system path)

In Claude Desktop chat:

  • Always use the full path to the notebook when calling tools
  • Example: /Users/username/projects/my_notebook.ipynb

Important Notes:

  • After any modifications through Claude (add_cell, edit_cell):
    • Reload the notebook page in JupyterLab/Jupyter Notebook
    • Current version does not support automatic reload
  • Keep JupyterLab/Jupyter Notebook instance running while working with Claude

License

This project is licensed under the MIT License. See the LICENSE file for details.

mcp-server-jupyter FAQ

How do I install mcp-server-jupyter?
You can install mcp-server-jupyter via pip from its GitHub repository or PyPI, following the provided installation instructions in the README.
Can mcp-server-jupyter handle both Jupyter Notebook and JupyterLab files?
Yes, it supports standard Jupyter notebook files used in both Jupyter Notebook and JupyterLab environments.
How does mcp-server-jupyter manage large notebooks with many outputs?
It provides a tool to read notebook content without outputs to reduce size and improve performance.
Is it possible to add different types of cells using mcp-server-jupyter?
Yes, you can add both code and markdown cells, specifying the type and insertion position.
Can I modify existing cells in a notebook using this server?
Yes, the server includes tools to edit the source and metadata of existing cells programmatically.
Does mcp-server-jupyter support real-time interaction with notebooks?
It allows programmatic manipulation but does not provide real-time collaborative editing features.
Which LLM providers can integrate with mcp-server-jupyter?
It is provider-agnostic and can integrate with OpenAI, Anthropic Claude, and Google Gemini models.
How secure is the interaction between the MCP client and mcp-server-jupyter?
The server follows MCP principles for secure, scoped, and observable interactions to ensure safe notebook manipulation.