Skip to main content

Additional Tools

In JupyterLab mode, Jupyter MCP Server integrates with jupyter-mcp-tools to expose additional JupyterLab-specific commands as MCP tools.

Dependency on jupyter-mcp-tools

When running in JupyterLab mode (see Configuration), Jupyter MCP Server depends on jupyter-mcp-tools to provide enhanced UI integration capabilities. This extension enables the use of JupyterLab commands as MCP tools.

Installation

The jupyter-mcp-tools package must be installed in your JupyterLab environment:

pip install jupyter-mcp-tools>=0.1.4

How It Works

  1. JupyterLab Mode Detection: When Jupyter MCP Server detects it's running in JupyterLab mode, it queries jupyter-mcp-tools for available commands
  2. Allowed Tools Filtering: Only specific tools from jupyter-mcp-tools are exposed to MCP clients (see Allowed Tools below)
  3. Command Routing: When an MCP client calls one of these tools, the request is routed to jupyter-mcp-tools which executes the corresponding JupyterLab command

Allowed Tools

The following tools from jupyter-mcp-tools are enabled by default in Jupyter MCP Server:

Tool NameDescription
notebook_run-all-cellsExecute all cells in the current notebook sequentially
notebook_get-selected-cellGet information about the currently selected cell
Configuring Allowed Tools

The list of allowed jupyter-mcp-tools is now configurable!

The complete list of available tools can be found in the jupyter-mcp-tools README.

You can specify which tools to enable using:

When running jupyter-mcp-server as a Jupyter Server Extension:

jupyter lab --port 4040 --IdentityProvider.token MY_TOKEN --JupyterMCPServerExtensionApp.allowed_jupyter_mcp_tools="notebook_run-all-cells,notebook_get-selected-cell,notebook_append-execute"

When running jupyter-mcp-server standalone:

jupyter-mcp-server --allowed-jupyter-mcp-tools "notebook_run-all-cells,notebook_get-selected-cell,notebook_append-execute"

For developers who want to modify the default list programmatically, you can still update the allowed_jupyter_mcp_tools configuration in:

Architecture

When JupyterLab mode is enabled:

  • Jupyter MCP Server queries jupyter-mcp-tools for available tools
  • Only tools in the allowed_jupyter_mcp_tools configuration are exposed to MCP clients
  • Tool execution is routed through jupyter-mcp-tools which communicates with the JupyterLab frontend via WebSocket