loading…
Search for a command to run...
loading…
Enables AI agents to execute Python, TypeScript, and JavaScript code in persistent Jupyter kernels with stateful variables and imports across interactions.
Enables AI agents to execute Python, TypeScript, and JavaScript code in persistent Jupyter kernels with stateful variables and imports across interactions.
PyPI version Python 3.10+ License: MIT
A Model Context Protocol (MCP) server that provides stateful Jupyter kernel development with multi-language support (Python, TypeScript, JavaScript) for AI agents and assistants.
With Jupyter Kernel MCP you can execute Python, TypeScript, and JavaScript code in persistent, isolated environments that maintain state between executions—perfect for AI agents performing complex data analysis and development workflows.
Jupyter Kernel MCP helps you build stateful AI agent workflows that can load datasets, perform transformations, and analyze results across multiple interactions without losing variables or computed state.
Unlike traditional stateless code execution, Jupyter Kernel MCP preserves variables, imports, and computed results between AI agent messages, enabling sophisticated multi-step data science workflows.
This project is intended for AI developers, data scientists, and automation engineers who want to build intelligent agents that can perform stateful data analysis and complex computational workflows.
Perfect for:
Before using Jupyter Kernel MCP, ensure you have:
Get started with Jupyter Kernel MCP by installing the package and adding it to your MCP client.
Install using pip:
pip install jupyter-kernel-mcp
Or using uv:
uv add jupyter-kernel-mcp
To install the latest development version directly from GitHub:
uv tool install git+https://github.com/codewithcheese/jupyter-kernel-mcp.git
jupyter-kernel-mcp --help
To enable TypeScript and JavaScript kernels:
# Install TSLAB globally
npm install -g tslab
# or with pnpm
pnpm install -g tslab
# Install kernel specs
tslab install
# Verify kernels are available
jupyter kernelspec list
You should see tslab and jslab in the kernel list.
Add the server to Claude Code:
claude mcp add jupyter-kernel jupyter-kernel-mcp
Verify the server is listed:
claude mcp list
Add to your MCP client configuration (example for mcp_config.json):
{
"servers": {
"jupyter-kernel": {
"command": "jupyter-kernel-mcp"
}
}
}
The server starts automatically when called by your MCP client
No manual startup required - the server launches when your MCP client connects.
Start your first kernel:
In Claude Code or your MCP client:
Please start a new Jupyter kernel for data analysis
Execute stateful code:
Load this dataset and show me the first few rows:
import pandas as pd
df = pd.read_csv('data.csv')
df.head()
Continue the analysis in follow-up messages:
Now group the data by category and calculate the mean values
The df variable persists from the previous execution!
| Tool | Description |
|---|---|
start_kernel |
Create a new Jupyter kernel for Python, TypeScript, or JavaScript |
execute_code |
Execute code in any language kernel (auto-routes based on kernel type) |
list_kernels |
Show all active kernels with their languages |
list_variables |
Display variables in a kernel's namespace |
get_kernel_status |
Get detailed kernel information |
stop_kernel |
Stop and remove a specific kernel |
reset_kernel |
Reset a kernel (clears all variables) |
| Issue | Solution |
| Server won't start - "No module named 'jupyter_client'" | Install dependencies: pip install jupyter-client |
| Kernel creation fails | Ensure Python 3.10+ is installed and accessible |
| MCP client can't find server | Verify installation: which jupyter-kernel-mcp |
| Variables not persisting between executions | Ensure you're using the same kernel_id for related executions |
| TypeScript/JavaScript kernel creation fails | Install TSLAB: npm install -g tslab && tslab install |
| "tslab command not found" error | Ensure Node.js is installed and TSLAB is in PATH |
| TypeScript compilation errors | Check TypeScript syntax - TSLAB uses strict type checking |
Other troubleshooting resources:
We welcome contributions! Please see our Contributing Guide for details on:
For more information:
Need assistance? Here's how to get support:
Jupyter Kernel MCP is licensed under the MIT License.
Built with ❤️ for the AI agent development community
Выполни в терминале:
claude mcp add jupyter-kernel-mcp -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.