Skip to main content

MCP server for Jupyter notebooks

Project description

mcp-server-jupyter

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

Demo

Components

Tools

The server provides five 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)
      • source (string)

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.

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

mcp_server_jupyter-0.1.5.tar.gz (25.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_jupyter-0.1.5-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_jupyter-0.1.5.tar.gz.

File metadata

  • Download URL: mcp_server_jupyter-0.1.5.tar.gz
  • Upload date:
  • Size: 25.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mcp_server_jupyter-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6e73a5cb26e18cfc24a178d2ed63c794256d1baf02a90a666ece99958e37536a
MD5 e695b674e0e706da0634319fdef38d5b
BLAKE2b-256 567a94128942b9fca770c48f65854aeb57b8e068dac2d5c4132798facabb3269

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_jupyter-0.1.5.tar.gz:

Publisher: main.yml on ihrpr/mcp-server-jupyter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_server_jupyter-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_jupyter-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6b2c7ec41ee8e1b25ba720d26134cdc4c038d4bf3371382e3a56f05c0dd750eb
MD5 73fa0c7a1f3b545d99505eaba5f9abf4
BLAKE2b-256 ea8fca2d35c8d462e15557404b232fd006637ee996f650d02d3c3e9749a7f5af

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_jupyter-0.1.5-py3-none-any.whl:

Publisher: main.yml on ihrpr/mcp-server-jupyter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page