Connect agents with MCP
xtralab runs a Model Context Protocol
(MCP) server inside JupyterLab, from
jupyter-server-mcp.
An agent that connects to it can run JupyterLab commands: for example, open
files, run notebook cells, and read notebooks.
Install the plugin for Claude Code
Section titled “Install the plugin for Claude Code”The xtralab plugin registers the MCP server with Claude Code and installs the agent skills.
-
Install uv. The plugin starts the MCP proxy with
uvx. -
Add the marketplace and install the plugin:
Terminal window claude plugin marketplace add jtpio/xtralabclaude plugin install xtralab@xtralab -
Start xtralab, then start a new Claude Code session in the same folder. The agent loads the
jupyterserver when the session starts.
The proxy connects to the xtralab server whose folder contains the folder of the session. It does not connect to a server of another project, so agent sessions in different projects do not interfere with each other.
| xtralab runs in | Start the agent in |
|---|---|
| A browser tab | An xtralab terminal, or a different terminal in the project folder or under it |
| The desktop app | An xtralab terminal |
To connect from a folder outside the project on purpose, set the URL of the
MCP server before you start the agent. The MCP server has its own port, not
the port of the JupyterLab URL. xtralab list shows it on the MCP line
of the project folder:
JUPYTER_SERVER_MCP_URL=http://localhost:56978/mcp claudeRegister the server manually
Section titled “Register the server manually”Use this procedure for the other agents, or when uv is not installed.
-
Open a terminal in xtralab.
-
Run the command for your agent:
Terminal window claude mcp add jupyter -- jupyter-server-mcp-proxyTerminal window codex mcp add jupyter -- jupyter-server-mcp-proxyTerminal window copilot mcp add jupyter -- jupyter-server-mcp-proxy -
Start a new agent session. The agent loads the
jupyterserver when the session starts.
Register the server one time for each agent. The registration continues to work after JupyterLab restarts.
The launcher shows the same commands for the installed agents, with a Copy button.
Other agents
Section titled “Other agents”Goose, OpenCode, Kiro, Mistral Vibe, and Antigravity do not have an
mcp add command. Add a stdio MCP server to the configuration of the agent,
with the command jupyter-server-mcp-proxy. See the
jupyter-server-mcp README
for other clients.
| Tool | Description |
|---|---|
list_all_commands |
Lists the JupyterLab commands, with an optional query |
execute_command |
Runs a JupyterLab command with arguments |
The tools come from
jupyterlab-commands-toolkit.
The guided-code-walkthrough skill uses them to drive the app.