PyKernel MCP
MCP server to make it possible for an agent to execute python in a Jupyter kernel.
Features
PyKernel provides a persistent IPython kernel environment for executing Python code through the Model Context Protocol. After setting this server up, your agent will be able to:
- Maintains state between executions - variables, imports, and functions persist across tool calls
- Pre-loaded scientific stack - comes with numpy, pandas, and matplotlib already imported
- Rich output support - captures text output, errors, and matplotlib plots
- Visualizations - inline matplotlib plots rendered as images
- Package installation - install additional packages on-the-fly with the
install_packagetool - Kernel management - restart the kernel to clear state when needed
Use Cases
- Quick data analysis and exploration without writing files
- Iterative computation where you build on previous results
- Mathematical calculations and statistical analysis
- Data visualization with matplotlib
- Testing Python code snippets
- Prototyping algorithms with maintained state
The kernel automatically handles execution timeouts, captures both stdout and stderr, and provides detailed error tracebacks when code fails.
Test
Just execute:
npx @modelcontextprotocol/inspector uv run src/pykernel_mcp/server.py
Installation
Click the button to install:
Or install manually:
Go to Advanced settings -> Extensions -> Add custom extension. Name to your liking, use type STDIO, and set the command to uvx pykernel-mcp. Click "Add Extension".
Metadata
Release files for pykernel-mcp 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pykernel_mcp-0.2.5.tar.gz | 49.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pykernel_mcp-0.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.5 kB
Release files / pykernel_mcp-0.2.5.tar.gz
| Download URL | pykernel_mcp-0.2.5.tar.gz |
|---|---|
| Size | 49.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e248c0f2ffc0f9f80590c894439d50ef90699002762644e620ceacdc8d8b893b
|
|
BLAKE2b-256 checksum How to use checksums |
cdb27c7a534fa75c6ae72d8bc8cf8cc8d9496734818417a0a7d9d6b669f26bef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / pykernel_mcp-0.2.5-py3-none-any.whl
| Download URL | pykernel_mcp-0.2.5-py3-none-any.whl |
|---|---|
| Size | 51.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90a045300d3c33e0ea3cff43f3c2c311cfa025da4f7cf4669f807d973f444268
|
|
BLAKE2b-256 checksum How to use checksums |
9c5900f5d9c8b4e2995d0d9975f3f9c023f7b1f0e5dda12ed60eff63e8fac7a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for pykernel-mcp 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.