Skip to main content

autogen-kubernete-mcp

autogen-kubernetes-mcp is an MCP(Model Context Protocol) server that acts as a Python code interpreter fully compatible with the python built-in tool of the gpt-oss model.

It is designed as a custom extension for autogen-kubernetes, enabling Python code execution inside a Kubernetes Pod with configurable runtime parameters.

This MCP server can be used in environments where code execution needs to be isolated, reproducible, and integrated with Kubernetes workloads.

Installation & Usage

  1. Install via pip
pip install autogen-kubernetes-mcp
  1. Install via uv
uv pip install autogen-kubernetes-mcp
  1. Run via uvx
uvx autogen-kubernetes-mcp commandline --namespace my-namespace --image python:3.11-slim
  1. Run via Python module
python -m autogen_kubernetes_mcp commandline --namespace my-namespace --image python:3.11-slim

Command-line Arguments

Command-line arguments are used when creating PodCommandLineCodeExecutor/PodJupyterCodeExecutor and MCP server.

type arguments: jupyter type creates PodJupyterCodeExecutor for python code executor tool.

MCP server have to run in same kubernetes cluster because PodJupyterCodeExecutor only uses service FQDN to connect jupyter server.

Not validated for non-text outputs yet.

flowchart LR
  subgraph K8sCluster["Kubernetes Cluster"]
    E[PodJupyterCodeExecutor]
    J[JupyterServerPod]
  end

  E --generate--> J

All the arguments are optional

Argument Description Default
type Code Executor type, commandline(stateless), jupyter(stateful) supported
--host MCP server host address 0.0.0.0
--port MCP server port 8000
--kubeconfig Path to the kubeconfig file None(auto-detected)
--image Pod container image name None
--pod-name Pod name (auto-generated)
--timeout Code execution timeout(seconds) 60
--workspace-path Path inside the container where scripts are stored /workspace
--namespace, -n Kubernetes namespace for Pod creation default
--volume Kubernetes volume to mount into the Pod/container, accepts YAML format string, YAML file path None
--pod-spec Custom Pod spec definition(YAML format string, YAML file path) None
--command Custom executor container command None
--args Custom executor container arguments None

License

This project is licensed under the MIT License.

Metadata

Release files for autogen-kubernetes-mcp 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autogen-kubernetes-mcp 0.6.1
File Size Uploaded
autogen_kubernetes_mcp-0.6.1.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autogen-kubernetes-mcp 0.6.1
File Interpreter ABI Platform
autogen_kubernetes_mcp-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 kB

Release files / autogen_kubernetes_mcp-0.6.1.tar.gz

Download URL autogen_kubernetes_mcp-0.6.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
013182510f8952bfbf1adb074b691f0a4019ead944cef1fec94c0a12997df26c
BLAKE2b-256 checksum
How to use checksums
3927ee364ee5279291358f6091b7aa7ce05aef4906081f2eaa7a2cbc5f7cee5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2025.

Transparency log

Release files / autogen_kubernetes_mcp-0.6.1-py3-none-any.whl

Download URL autogen_kubernetes_mcp-0.6.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40d5c75d36991c8239e0447e2e2bec44c95440af739a3b022743257f633ffad6
BLAKE2b-256 checksum
How to use checksums
de9a61140737a47e7e961e8c21c7f729ddb009989affa2fa8b869291b1034105
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page