Skip to main content

MPC server provides code interpreter with kubernetes workload

Project description

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.

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

autogen_kubernetes_mcp-0.6.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

autogen_kubernetes_mcp-0.6.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file autogen_kubernetes_mcp-0.6.0.tar.gz.

File metadata

  • Download URL: autogen_kubernetes_mcp-0.6.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for autogen_kubernetes_mcp-0.6.0.tar.gz
Algorithm Hash digest
SHA256 668aadbea237d7d583385f5361139092723ff16b23b59b7a3fe68f84118592b1
MD5 05f29028a9e04c48403143b2aec7c571
BLAKE2b-256 58502edf0d80b61486e57cfb86da0d3dfbd97d629d848f058f01f8e2ccf97684

See more details on using hashes here.

Provenance

The following attestation bundles were made for autogen_kubernetes_mcp-0.6.0.tar.gz:

Publisher: package.yaml on questcollector/autogen-kubernetes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autogen_kubernetes_mcp-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autogen_kubernetes_mcp-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10cbb8e66fdda7223e5f88495b7fc8c54369fbe60d6e99db89e178265ed2f7e4
MD5 e24de94d9b382cf4d580f0cb3ccbbda8
BLAKE2b-256 1deaaa9fbc73af412c26447daadb6b6c9f0991dee475dfb8c3380803911df9f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for autogen_kubernetes_mcp-0.6.0-py3-none-any.whl:

Publisher: package.yaml on questcollector/autogen-kubernetes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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