Skip to main content
Glama

Jupyter MCP Server

by datalayer

🪐 ✨ Jupyter MCP Server

Jupyter MCP Server ist eine Serverimplementierung des Model Context Protocol (MCP), die die Interaktion mit 📓 Jupyter-Notebooks ermöglicht, die in jedem JupyterLab ausgeführt werden (funktioniert auch mit Ihrem 💻 lokalen JupyterLab).

Jupyter MCP Server

Starten Sie JupyterLab

Stellen Sie sicher, dass Sie Folgendes installiert haben. Das Collaboration-Paket wird benötigt, da die am Notebook vorgenommenen Änderungen dank Jupyter Real Time Collaboration sichtbar sind.

pip install jupyterlab==4.4.1 jupyter-collaboration==4.0.2 ipykernel pip uninstall -y pycrdt datalayer_pycrdt pip install datalayer_pycrdt==0.12.17

Starten Sie dann JupyterLab mit dem folgenden Befehl.

jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0

Sie können auch make jupyterlab ausführen.

[!NOTIZ]

Die --ip wird auf 0.0.0.0 gesetzt, um dem in einem Docker-Container ausgeführten MCP-Server den Zugriff auf Ihr lokales JupyterLab zu ermöglichen.

Verwendung mit Claude Desktop

Claude Desktop kann von dieser Seite für macOS und Windows heruntergeladen werden.

Für Linux hatten wir Erfolg mit diesem inoffiziellen Build-Skript basierend auf nix

# ⚠️ UNOFFICIAL # You can also run `make claude-linux` NIXPKGS_ALLOW_UNFREE=1 nix run github:k3d3/claude-desktop-linux-flake \ --impure \ --extra-experimental-features flakes \ --extra-experimental-features nix-command

Um dies mit Claude Desktop zu verwenden, fügen Sie Folgendes zu Ihrer claude_desktop_config.json hinzu (lesen Sie mehr auf der MCP-Dokumentationswebsite ).

[!WICHTIG]

Stellen Sie sicher, dass der Port der SERVER_URL und TOKEN mit denen im jupyter lab -Befehl übereinstimmen.

Der NOTEBOOK_PATH sollte relativ zum Verzeichnis sein, in dem JupyterLab gestartet wurde.

Claude-Konfiguration unter macOS und Windows

{ "mcpServers": { "jupyter": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "SERVER_URL", "-e", "TOKEN", "-e", "NOTEBOOK_PATH", "datalayer/jupyter-mcp-server:latest" ], "env": { "SERVER_URL": "http://host.docker.internal:8888", "TOKEN": "MY_TOKEN", "NOTEBOOK_PATH": "notebook.ipynb" } } } }

Claude-Konfiguration unter Linux

CLAUDE_CONFIG=${HOME}/.config/Claude/claude_desktop_config.json cat <<EOF > $CLAUDE_CONFIG { "mcpServers": { "jupyter": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "SERVER_URL", "-e", "TOKEN", "-e", "NOTEBOOK_PATH", "--network=host", "datalayer/jupyter-mcp-server:latest" ], "env": { "SERVER_URL": "http://localhost:8888", "TOKEN": "MY_TOKEN", "NOTEBOOK_PATH": "notebook.ipynb" } } } } EOF cat $CLAUDE_CONFIG

Komponenten

Werkzeuge

Der Server bietet derzeit 2 Tools:

  1. add_execute_code_cell
  • Fügen Sie eine Codezelle in einem Jupyter-Notebook hinzu und führen Sie sie aus.
  • Eingang:
    • cell_content (Zeichenfolge): Auszuführender Code.
  • Rückgabe: Zellenausgabe.
  1. add_markdown_cell
  • Fügen Sie eine Markdown-Zelle in einem Jupyter-Notizbuch hinzu.
  • Eingang:
    • cell_content (Zeichenfolge): Markdown-Inhalt.
  • Gibt zurück: Erfolgsmeldung.

Gebäude

Sie können das Docker-Image aus der Quelle erstellen.

make build-docker

Installation über Smithery

So installieren Sie den Jupyter MCP Server für Claude Desktop automatisch über Smithery :

npx -y @smithery/cli install @datalayer/jupyter-mcp-server --client claude
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Ermöglicht die Interaktion mit Jupyter-Notebooks über das Model Context Protocol und unterstützt die Codeausführung und das Einfügen von Markdowns in JupyterLab-Umgebungen.

  1. Starten Sie JupyterLab
    1. Verwendung mit Claude Desktop
      1. Claude-Konfiguration unter macOS und Windows
      2. Claude-Konfiguration unter Linux
    2. Komponenten
      1. Werkzeuge
    3. Gebäude
      1. Installation über Smithery

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          Facilitates unified execution and result parsing for various testing frameworks, including Bats, Pytest, Flutter, Jest, and Go, through a Model Context Protocol interface.
          Last updated -
          1
          12
          TypeScript
          MIT License
          • Apple
          • Linux
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that allows management and execution of Blender Python scripts, enabling users to create, edit and run scripts in a headless Blender environment through natural language interfaces.
          Last updated -
          4
          Python
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that enables seamless integration between Cursor IDE and JIRA, allowing users to retrieve issues, execute JQL searches, and log work through natural language interactions.
          Last updated -
          Python
          • Linux
          • Apple
        • A
          security
          F
          license
          A
          quality
          A Python server implementing the Model Context Protocol to provide customizable prompt templates, resources, and tools that enhance LLM interactions in the continue.dev environment.
          Last updated -
          2
          Python

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/datalayer/jupyter-mcp-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server