mcp-ephemeral-k8s logo

mcp-ephemeral-k8s

by BobMerkus

A Python library for spawning ephemeral Model Context Protocol (MCP) servers on Kubernetes using Server-Sent Events (SSE). It supports multiple runtimes and can be run as an MCP or FastAPI server.

View on GitHub

Last updated: N/A

What is mcp-ephemeral-k8s?

mcp-ephemeral-k8s is a Python library that simplifies the process of creating and managing ephemeral Model Context Protocol (MCP) servers within a Kubernetes environment. It leverages Server-Sent Events (SSE) for communication and supports various runtimes.

How to use mcp-ephemeral-k8s?

The library can be used as a Python package, via uvx, or deployed using a Helm chart. The basic usage involves creating a KubernetesSessionManager to manage the lifecycle of MCP servers. You can then create MCP servers using predefined presets and interact with them via SSE.

Key features of mcp-ephemeral-k8s

  • Supports Node.js and Python runtimes

  • Works with mcp-proxy for uvx/npx runtimes

  • Supports local kubeconfig and in-cluster configuration

  • Can be run as MCP server

  • Can be run as FastAPI server

Use cases of mcp-ephemeral-k8s

  • Dynamic creation of MCP servers for testing

  • Spinning up MCP servers on demand for specific tasks

  • Automated MCP server deployment in Kubernetes

  • Integration with CI/CD pipelines for MCP server provisioning

FAQ from mcp-ephemeral-k8s

What is MCP?

Model Context Protocol is a protocol for communication between different parts of a system.

What is SSE?

Server-Sent Events is a server push technology enabling real-time data streaming from a server to a client.

What is uvx?

uvx is a tool for running Python scripts and applications.

What is mcp-proxy?

mcp-proxy is a proxy server that can be used to forward requests to MCP servers.

How do I connect to the MCP server?

Use the provided configuration with the SSE URL to connect to the MCP server.