ipython2-mcp
Enables agents to run Python 2 code in isolated IPython sessions, with tools for installing dependencies, managing sessions, executing code, and tab completion.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ipython2-mcpStart a Python 2 session and run print 'hello'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ipython2-mcp
This project allows an agent to run Python 2 IPython sessions via an MCP.
The MCP server is written in TypeScript. Each session is a Python 2 broker process owning one IPython kernel process, driven over JSON-RPC on stdio.
Tools
tool | params | what it does |
|
| pip-installs the kernel dependencies into a Python 2.7 interpreter |
|
| starts a named session on the given Python 2.7 interpreter |
|
| stops a session and frees the name |
| — | one line per live session |
|
| runs code, returns the transcript |
|
| tab completion |
Introspection, namespace listing, and history go through IPython itself (var?, var??,
%whos, %history) rather than dedicated tools.
Related MCP server: Sandbox Agent
Setup
Install and build the server:
npm install
npm run buildThat produces dist/ipython2-mcp.js — a single self-contained file. Register it with your MCP
client as node <repo>/dist/ipython2-mcp.js.
The repo's .mcp.json already does that with a path relative to the repo root, so an MCP client
started there picks the server up with no further configuration. Run npm run build first:
dist/ is not committed.
To distribute, ship dist/ipython2-mcp.js together with the python/ directory beside it — those
scripts are run by the user's Python 2 interpreter, so they cannot be bundled into the JS.
Then point python_path at any Python 2.7 interpreter — a venv's interpreter is the intended use.
It needs the kernel dependencies, which the agent can install for itself with
ipython_install_deps, or you can do by hand:
<py2>/python -m pip install -r python/requirements.txtNo kernelspec registration is needed; the kernel is launched with that interpreter directly.
SKILL.md is an agent-facing guide to working in the session; install it into .claude/skills/
if you want your agent to have it.
Distribution
dist/ipython2-mcp.js is committed, so users need nothing but node — no npm install, no
TypeScript toolchain. Two things ship: that file and the python/ directory beside it. Everything
else in the repo is development-only.
If you change src/, rebuild and commit the bundle in the same commit:
npm run build # tsc -> build/, esbuild -> dist/ipython2-mcp.js
npm run check:bundle # fails if the committed bundle is stale; wire into CIpython/ must remain a sibling of dist/ — the server resolves the broker relative to its own
location. See ARCHITECTURE.md for the plugin layout and .mcp.json snippet.
Tests
npm test # TypeScript
<py2>/python -m pip install -r python/requirements-dev.txt
<py2>/python -m pytest python/tests # broker, against a real kernel
PYTHON2=<py2>/python npm run test:e2e # smoke, needs a build firstSee ARCHITECTURE.md for the full design and the reasoning behind it.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides persistent IPython shell sessions per conversation with DataFrame-centric architecture, enabling stateful data analysis, CLI tool execution, and integration of external MCP servers within the same workspace context.23Apache 2.0
- AlicenseAqualityCmaintenanceEnables code execution in isolated Docker containers with persistent IPython, Node.js, or R kernels, supporting file import/export and cross-session transfers via MCP tools.6MIT
- Alicense-qualityDmaintenanceMCP server that provides a persistent IPython kernel for executing Python code with pre-loaded numpy, pandas, and matplotlib, supporting stateful computation and inline visualizations.2MIT
- Alicense-qualityDmaintenanceProvides a persistent Python REPL session as a tool for executing code, managing files, installing packages, and initializing projects via the MCP protocol.1MIT
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ledror/ipython2-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server