Execution

execute_cell

Execute a cell from the currently activated notebook with timeout and return it's outputs

Execute a cell from the currently activated notebook with timeout and return it's outputs

destructive: yes

Parameters

ParameterTypeRequiredDefaultDescription
cell_indexintegeryesIndex of the cell to execute (0-based)
timeoutintegerno0Maximum seconds to wait for execution (0 = use config default)
streambooleannotrueEnable streaming progress (including time indicator) updates for long-running cells
progress_intervalintegerno5Seconds between progress updates (MCP keepalive + optional stream log)

Call it

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "execute_cell",
    "arguments": {
      "cell_index": 0,
      "timeout": 0,
      "stream": true,
      "progress_interval": 5
    }
  }
}
result = await session.call_tool("execute_cell", arguments={"cell_index": 0, "timeout": 0, "stream": True, "progress_interval": 5})

Source

Registered by the @mcp.tool decorator on execute_cell in jupyter_mcp_server/server.py.