The following diagram illustrates the kmcp workflow, from local development to a production deployment in Kubernetes:
graph TD
subgraph Local Development
A[Developer] -- kmcp init --> B(MCP Project);
B -- kmcp add-tool --> B;
B -- kmcp run --> C{Local MCP Server};
A -- Edits Code --> B;
end
subgraph Production Deployment
B -- kmcp build --> D[Docker Image];
D -- kmcp deploy --> E(Kubernetes Cluster);
end
subgraph Kubernetes Cluster
F[kmcp Controller] -- Manages --> G(MCP Server CRD);
G -- Deploys --> H[Transport Adapter];
H -- Proxies Traffic --> I[MCP Server Pod];
end
A -- Interacts with --> C;
E -- Contains --> F;
E -- Contains --> G;
E -- Contains --> H;
E -- Contains --> I;
-
Local Development: Developers use
kmcp initto scaffold a new project andkmcp add-toolto add tools. The server runs locally withkmcp runfor rapid iteration. -
Build Phase:
kmcp buildpackages your MCP server into a Docker image, handling all dependencies and configuration automatically. -
Deployment:
kmcp deploycreates a Kubernetes custom resource that the controller watches. The controller then:- Deploys your MCP server as a pod
- Configures and deploys a Transport Adapter as a sidecar or separate service
- Sets up networking and ingress rules
- Manages secrets and environment variables
-
Production Runtime: The Transport Adapter receives external requests, handles protocol translation, and routes them to your MCP server. The controller continuously monitors and manages the deployment.