IPython

•

Provides large language models with a stateful IPython kernel per session, ensuring isolated execution environments for iterative code development.

ipython-mcp serves as a dedicated server for large language models, such as Claude, offering a persistent Python REPL environment for each session. Unlike traditional code runners, it maintains variables, imports, and the working directory across `execute` calls, enabling iterative development and data analysis akin to a Jupyter notebook. Sessions are isolated, allowing different tasks to run in distinct Python environments with their own installed packages. This lightweight solution avoids Jupyter server dependencies while providing robust, timeout-safe code execution where kernel state is preserved even if a cell runs long.

Key Features

01Maintains persistent state across code execution calls within a session
02Offers per-environment isolation for sessions, supporting different Python environments
030 GitHub stars
04Ensures timeout-safe execution, interrupting long-running cells while preserving kernel state
05Allows independent management and execution of multiple concurrent sessions
06Provides a lightweight, bare kernel-per-session REPL without Jupyter server dependencies

Use Cases

01Empowering AI agents (like Claude) to perform iterative data analysis and complex computations
02Facilitating LLM-driven development where code and data state need to persist across interactions
03Running isolated code execution environments for diverse AI tasks requiring specific Python package configurations