Skip to content

feat: ship jupyter-mcp-tools and full frontend tool allowlist - #19

Merged
kratsg merged 2 commits into
mainfrom
feat/jupyter-mcp-tools
Oct 9, 2026
Merged

kratsg merged 2 commits into
mainfrom
feat/jupyter-mcp-tools

Conversation

@kratsg

@kratsg kratsg commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Resolves #14

Summary

  • jupyter-mcp-server 2.x and jupyter-mcp-tools. jupyter-mcp-server goes from 1.0.2 to 2.2.3. 2.x moved jupyter-mcp-tools to an optional extra, so this PR adds an explicit jupyter-mcp-tools>=0.1.8 dependency.
  • The lock is fully re-solved. 2.x needs mcp>=2, jupyter-collaboration>=5 and pycrdt>=0.14, but the old lock held pycrdt 0.12 and idna 3.11, so a plain pixi lock couldn't satisfy it. Notable bumps:
    • TensorFlow 2.19.1 → 2.21.0
    • ROOT 6.38 → 6.40
    • Keras 3.13 → 3.15
    • NumPy 2.4 → 2.5
    • JupyterLab 4.5.6 → 4.6.4
    • jupyter-collaboration 4.4 → 5.0.4
    • mcp 1.27 → 2.2
  • 52 frontend commands allowlisted. allowed_jupyter_mcp_tools is set in config/jupyter_notebook_config.py; before this only the 2 defaults were exposed. These commands run in the user's open JupyterLab tab. af-jupyterlab-mcp proxies them as nb_ui_* tools in feat: proxy jupyter-mcp-tools frontend (UI) tools and align with jupyter-mcp-server 2.x af-jupyterlab-mcp#15, which should merge after this one.
    • Real JupyterLab command ids. Every id was checked against the JupyterLab 4.6.4 source. 14 ids in the upstream README don't exist, e.g. kernel_restart is really kernelmenu:restart.
    • Excluded commands. filebrowser_upload / filebrowser_download act on the human's browser. docmanager_delete / _rename / _save-as, kernelmenu_change / _restart and console_restart-kernel block on a modal dialog that needs a human click.
  • Docs. README gets an "MCP Server" section and CONTRIBUTING explains how to change the allowlist.

Test plan

  • pixi lock --check passes
  • Both Docker images build. This was not run locally; it relies on this PR's CI matrix.
  • In each image, jupyter server extension list shows jupyter_mcp_server and jupyter_mcp_tools, and jupyter labextension list shows @datalayer/jupyter-mcp-tools
  • Smoke test: import tensorflow, keras, numpy, pandas, root --version, jupyter --version. Worth doing given the broad version bumps.
  • Manual e2e on AF with a JupyterLab tab open: one nb_ui_* tool through the gateway

🤖 Generated with Claude Code

kratsg added 2 commits October 8, 2026 14:57
jupyter-mcp-server 2.x moved jupyter-mcp-tools to an optional extra, so
depend on it explicitly (>=0.1.8; the allowed-tools docs require
>=0.1.7). 2.x needs mcp>=2 / jupyter-collaboration>=5 / pycrdt>=0.14,
which the existing lock could not satisfy (pycrdt 0.12, idna 3.11), so
the lock is fully re-solved via `pixi update`.

Notable bumps: jupyter-mcp-server 1.0.2 -> 2.2.3, jupyter-mcp-tools
0.1.6 -> 0.1.8, mcp 1.27 -> 2.2, jupyterlab 4.5.6 -> 4.6.4,
jupyter-collaboration 4.4 -> 5.0.4, tensorflow 2.19.1 -> 2.21.0,
root 6.38 -> 6.40, keras 3.13 -> 3.15, numpy 2.4 -> 2.5.

Assisted-by: Claude (Anthropic)
Expose 52 JupyterLab commands as MCP tools via
JupyterMCPServerExtensionApp.allowed_jupyter_mcp_tools (only the two
defaults were enabled before). They run in the user's open JupyterLab
tab; af-jupyterlab-mcp proxies them as nb_ui_* tools.

Uses real JupyterLab 4.x command ids: several ids in the upstream
jupyter-mcp-tools README (kernel_restart, notebook_select-next, ...) do
not exist and would silently do nothing. Excludes commands that act on
the human's browser (filebrowser upload/download) or block on a modal
dialog (docmanager delete/rename/save-as, kernelmenu change/restart,
console restart-kernel).

Assisted-by: Claude (Anthropic)
@kratsg
kratsg merged commit 050272a into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add jupyter-mcp-tools JupyterLab extension to notebook images

1 participant