Sponsored by Deepsite.site

mcp-server-jupyter

Created By
ihrpra year ago
MCP server for Jupyter Notebooks and JupyterLab
Content

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.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
CursorThe AI Code Editor
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Amap Maps高德地图官方 MCP Server