Skip to main content

MCP server providing persistent IPython kernel for executing Python code with numpy, pandas, and matplotlib

Project description

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_package tool
  • 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:

Install in Goose

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".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pykernel_mcp-0.2.5.tar.gz (49.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pykernel_mcp-0.2.5-py3-none-any.whl (51.4 kB view details)

Uploaded Python 3

File details

Details for the file pykernel_mcp-0.2.5.tar.gz.

File metadata

  • Download URL: pykernel_mcp-0.2.5.tar.gz
  • Upload date:
  • Size: 49.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for pykernel_mcp-0.2.5.tar.gz
Algorithm Hash digest
SHA256 e248c0f2ffc0f9f80590c894439d50ef90699002762644e620ceacdc8d8b893b
MD5 a52a3d88b862daa2681a825daeb48188
BLAKE2b-256 cdb27c7a534fa75c6ae72d8bc8cf8cc8d9496734818417a0a7d9d6b669f26bef

See more details on using hashes here.

File details

Details for the file pykernel_mcp-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: pykernel_mcp-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 51.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for pykernel_mcp-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 90a045300d3c33e0ea3cff43f3c2c311cfa025da4f7cf4669f807d973f444268
MD5 d6b2a648fad0ff9ecc797e309d36557f
BLAKE2b-256 9c5900f5d9c8b4e2995d0d9975f3f9c023f7b1f0e5dda12ed60eff63e8fac7a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page