About mcp-notebooks
mcp-notebooks is an MCP server for progressively executing notebook code while retaining kernel variables between runs. It is intended for LLM-assisted exploratory data analysis; the README warns that its current state is dangerous and recommends Docker isolation.
Key features
- 01Progressive notebook code execution
- 02Retain variables in the kernel between runs
- 03Docker-based setup
- 04StdIO and SSE connection options
Use cases
- 01Run exploratory data analysis in successive code steps
- 02Reuse variables across notebook executions
- 03Connect a notebook execution server to an MCP client
MCP support
It exposes notebook execution to MCP clients. The README describes connection over StdIO or SSE, including an SSE option using supergateway.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEmcp-notebooks
Notebook execution MCP server
Pretty dangerous to use in its current state
Rationale
Why not just execute code with literally any other already existing python execution server. This MCP server allows your LLM to progressively execute code and react to mistakes faster in a sort of EDA fashion. Variables are retained in the kernel and can be used in future executions.
Claude install
Okay listen buddy, it's not a one line process and run some node something. This really really should be run in a docker environment to protect your system from the AI overlor... I mean Claude. So go install docker and come back
Welcome back. This is not on DockerHub yet so run the following commands:
git clone [email protected]:Neuron1c/mcp-notebooks.git
cd mcp-notebooks
docker build . -t mcp-notebooks:latest
Halfway there, add the following to your claude_desktop_config.json
StdIO
{
"mcpServers": {
"notebooks": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp-notebooks:latest"
]
}
}
}
SSE
Or run it manually
docker run -p 3001:3001 mcp-notebooks:latest
And now the config.json
{
"mcpServers": {
"notebooks": {
"command": "npx",
"args": [
"supergateway",
"--sse",
"http://localhost:3001/sse"
]
}
}
}
Add Python Libraries
As it stands the project dependencies are scoped to the bare minimum of what's needed to run the server. To add more you need to install poetry, after you have fought with that (protip use pipx)
uv add your-package
recommended packages to add
- numpy
- pandas
- scikit-learn
- matplotlib
- seaborn
I've found the AI really tries to use the graphing packages when demonstrating things to your
TODO
- View notebooks
- Sandbox the environment more
- Scheme a data ingestion scenario (Kedro catalog?)
- Dependency injection (Or just let the user pull and build their own container)
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.