mcp-ephemeral-k8s
Enables spawning ephemeral Model Context Protocol (MCP) servers on Kubernetes using Server-Sent Events (SSE), supporting multiple runtimes.
README
mcp-ephemeral-k8s
A Python library for spawning ephemeral Model Context Protocol (MCP) servers on Kubernetes using Server-Sent Events (SSE).
- Github: https://github.com/BobMerkus/mcp-ephemeral-k8s/
- Documentation: https://BobMerkus.github.io/mcp-ephemeral-k8s/docs/
Features
- Supports multiple runtimes:
- Node.js (via
npx) - Python (via
uvx)
- Node.js (via
- Works with mcp-proxy for
uvxornpxruntimes - Supports both local kubeconfig and in-cluster configuration
- Can be run as MCP server
Usage
Running the MCP Server
uvx mcp-ephemeral-k8s
Using the Library
import asyncio
from mcp_ephemeral_k8s import KubernetesSessionManager, presets
async def main():
async with KubernetesSessionManager() as session_manager:
mcp_server = await session_manager.create_mcp_server(
presets.K8S_MCP_SERVER, wait_for_ready=True, expose_port=True
)
print(mcp_server.sse_url)
if __name__ == "__main__":
asyncio.run(main())
Job 'mcp-ephemeral-k8s-proxy-1762291156-x17zuayy' in unknown state, waiting...
http://mcp-ephemeral-k8s-proxy-1762291156-x17zuayy.default.svc.cluster.local:8080/sse
Installation
Prerequisites
Option 1: Using uvx (Recommended)
uvx mcp-ephemeral-k8s
To connect to the MCP server, use the following config:
{
"mcp-ephemeral-k8s": {
"url": "http://localhost:8000/sse",
"transport": "sse"
}
}
Option 2: As a Python Package
pip install mcp-ephemeral-k8s
mcp-ephemeral-k8s
Option 3: Using Helm Chart
To install the Helm chart, run:
helm repo add mcp-ephemeral-k8s https://BobMerkus.github.io/mcp-ephemeral-k8s/
helm repo update
helm install mcp-ephemeral-k8s mcp-ephemeral-k8s/mcp-ephemeral-k8s
To upgrade the Helm chart, run:
helm upgrade -i mcp-ephemeral-k8s mcp-ephemeral-k8s/mcp-ephemeral-k8s
To install a specific version, run:
helm install mcp-ephemeral-k8s mcp-ephemeral-k8s/mcp-ephemeral-k8s --version <replace-with-version>
To uninstall the Helm chart, run:
helm uninstall mcp-ephemeral-k8s
Option 4: From Source
-
Clone the repository
git clone https://github.com/BobMerkus/mcp-ephemeral-k8s.git cd mcp-ephemeral-k8s -
Set up development environment
make install -
Run pre-commit hooks
make check -
Run tests
make test -
Build Docker images
make docker-build-local make docker-build-local-proxy -
Load images to cluster
kind load docker-image ghcr.io/bobmerkus/mcp-ephemeral-k8s:latest kind load docker-image ghcr.io/bobmerkus/mcp-ephemeral-k8s-proxy:latest -
Install Helm chart
helm upgrade -i mcp-ephemeral-k8s charts/mcp-ephemeral-k8s --set image.tag=latest -
Port forward the MCP server
kubectl port-forward svc/mcp-ephemeral-k8s 8000:8000 -
Visit the FastAPI server
npx @modelcontextprotocol/inspector --sse http://localhost:8000/sse
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.