Skip to main content
Glama

ipybox

by gradion-ai

ipybox

ipybox is a lightweight and secure Python code execution sandbox based on IPython and Docker. You can run it locally on your computer or remotely in an environment of your choice. ipybox is designed for AI agents that need to execute code safely e.g. for data analytics use cases or executing code actions like in freeact agents.

Features

  • Secure code execution inside Docker containers
  • Restrict network access with a configurable firewall
  • Stateful code execution with IPython kernels
  • Stream code execution output as it is generated
  • Install Python packages at build time or runtime
  • Return plots generated with visualization libraries
  • Exposes an MCP server interface for AI agent integration
  • Invocation of MCP servers via generated client code
  • Flexible deployment options, local or remote
  • asyncio API for managing the execution environment

Documentation

MCP server

ipybox can be installed as MCP server.

{ "mcpServers": { "ipybox": { "command": "uvx", "args": ["ipybox", "mcp"] } } }

Python example

Install ipybox Python package:

pip install ipybox

Execute code in an ipybox container:

import asyncio from ipybox import ExecutionClient, ExecutionContainer async def main(): async with ExecutionContainer(tag="ghcr.io/gradion-ai/ipybox") as container: async with ExecutionClient(port=container.executor_port) as client: result = await client.execute("print('Hello, world!')") print(f"Output: {result.text}") if __name__ == "__main__": asyncio.run(main())
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A Python code execution sandbox based on IPython and Docker. Stateful code execution, file transfer between host and container, configurable network access.

  1. Features
    1. Documentation
      1. MCP server
        1. Python example

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            Create sandboxed local development environments directly from Github and execute tests, see coverage and more! Supports Python, Node, Bun and many test runners.
            Last updated -
            4
            26
            Python
          • -
            security
            F
            license
            -
            quality
            Provides isolated Docker environments for code execution, enabling users to create and manage containers, execute multi-language code, save and reproduce development environments, ensuring security and isolation.
            Last updated -
            11
            Python
            • Apple
          • -
            security
            A
            license
            -
            quality
            An MCP server to create secure code sandbox environment for executing code within Docker containers.
            Last updated -
            253
            Go
            MIT License
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            An interactive Python code execution environment that allows users and LLMs to safely execute Python code and install packages in isolated Docker containers.
            Last updated -
            20
            Python
            Apache 2.0

          View all related MCP servers

          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/gradion-ai/ipybox'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server