PyKernel MCP
Provides a persistent Jupyter kernel for executing Python code with pre-loaded scientific libraries like NumPy, Pandas, and Matplotlib, supporting state maintenance, rich output, and package installation.
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., "@PyKernel MCPplot the sine wave from the equation we derived earlier"
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.
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_packagetoolKernel 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.pyInstallation
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".
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/DOsinga/pykernel_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server