|
| 1 | +<!-- markdownlint-disable MD033 --> |
1 | 2 | <div align="center"> |
2 | 3 | <picture> |
3 | 4 | <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/kagent-dev/kmcp/main/img/kmcp-logo-dark.svg" alt="kmcp" width="400"> |
|
22 | 23 | </a> |
23 | 24 | </div> |
24 | 25 | <h3>A development platform and control plane for the Model Context Protocol (MCP)</h3> |
25 | | - <p>Build, deploy, and manage MCP servers with a seamless workflow from development to production</p> |
| 26 | + <p><i>MCP connectivity simplified, bring MCP service prototypes into production</i></p> |
26 | 27 | </div> |
| 28 | +<!-- markdownlint-enable MD033 --> |
27 | 29 |
|
28 | 30 | --- |
| 31 | +<!-- markdownlint-disable MD033 --> |
| 32 | +<table align="center"> |
| 33 | + <tr> |
| 34 | + <td> |
| 35 | + <a href="#getting-started"><b><i>Getting Started</i></b></a> |
| 36 | + </td> |
| 37 | + <td> |
| 38 | + <a href="#from-prototype-to-production"><b><i>Prototype to Production</i><b></a> |
| 39 | + </td> |
| 40 | + <td> |
| 41 | + <a href="#technical-details"><b><i>Technical Details</i></b></a> |
| 42 | + </td> |
| 43 | + <td> |
| 44 | + <a href="#get-involved"><b><i>Get Involved</i></b></a> |
| 45 | + </td> |
| 46 | + <td> |
| 47 | + <a href="#reference"><b><i>Reference</i></b></a> |
| 48 | + </td> |
| 49 | + </tr> |
| 50 | +</table> |
| 51 | +<!-- markdownlint-disable MD033 --> |
29 | 52 |
|
30 | | -## Overview |
31 | | - |
32 | | -`kmcp` is a comprehensive toolkit for building, deploying, and managing Model Context Protocol (MCP) servers. It provides a command-line interface (CLI) for local development and a Kubernetes controller for production deployments, enabling a seamless transition from development to production. |
| 53 | +--- |
33 | 54 |
|
34 | | -Whether you're building AI agent tools, deploying production MCP infrastructure, or managing multiple MCP servers at scale, `kmcp` streamlines the entire lifecycle with familiar tooling and cloud-native deployment patterns. |
| 55 | +## Why kMCP? |
35 | 56 |
|
36 | | -<img src="img/kmcp.png" alt="kmcp architecture" width="800"> |
| 57 | +Prototyping MPC services in isolation is quick and fun, but but production adoption introduces many challenges: |
37 | 58 |
|
38 | | -## Why kmcp? |
| 59 | +- **Ad-hoc scaffolding** - Configuring the MCP server, integrating it in Kubernetes, and operating it at Enterprise scale |
| 60 | +- **Transport fragmentation** – Supporting multiple protocols (HTTP, WebSocket, SSE, etc.) requires custom maintenance. |
| 61 | +- **Disconnected context** - Enforcing consistent security, observability, and governance for agent-to-tool communication |
39 | 62 |
|
40 | | -Building and deploying MCP servers today involves several challenges: |
| 63 | +**_We believe teams who have build MCP services should not experience friction when bringing those services to production. kMCP is designed to make MCP connectivity simple._** |
41 | 64 |
|
42 | | -- **Manual scaffolding**: Setting up project structure, dependencies, and boilerplate code for each new MCP server |
43 | | -- **Inconsistent deployment**: No standardized way to deploy MCP servers to production environments |
44 | | -- **Transport complexity**: Handling different transport protocols (HTTP, WebSocket, SSE) requires custom implementation |
45 | | -- **Kubernetes integration**: Manually creating deployments, services, and configurations for each MCP server |
46 | | -- **Dev-prod parity**: Different setups for local development versus production deployment |
| 65 | +## Getting Started |
47 | 66 |
|
48 | | -`kmcp` solves these problems by providing: |
49 | | - |
50 | | -- ✨ **Rapid scaffolding** with support for FastMCP (Python) and MCP Go SDK |
51 | | -- 🚀 **One-command deployment** to Kubernetes with pre-configured Transport Adapters |
52 | | -- 🔄 **Consistent workflow** from local development to production |
53 | | -- 🌐 **Built-in transport support** for HTTP, WebSocket, and Server-Sent Events |
54 | | -- ☸️ **Kubernetes-native** using Custom Resource Definitions (CRDs) |
55 | | -- 🔐 **Secrets management** integrated with Kubernetes secrets |
56 | | - |
57 | | -## Quick Start |
58 | | - |
59 | | -Get started with `kmcp` in under a minute: |
| 67 | +Install the kmcp CLI on your local machine. |
60 | 68 |
|
61 | 69 | ```bash |
62 | | -# Install kmcp CLI |
63 | 70 | curl -fsSL https://raw.githubusercontent.com/kagent-dev/kmcp/refs/heads/main/scripts/get-kmcp.sh | bash |
64 | | - |
65 | | -# Create a new MCP server |
66 | | -kmcp init python my-weather-server |
67 | | - |
68 | | -# Navigate to your project |
69 | | -cd my-weather-server |
70 | | - |
71 | | -# Add a tool |
72 | | -kmcp add-tool get_weather --description "Get current weather for a location" |
73 | | - |
74 | | -# Run locally for testing |
75 | | -kmcp run |
76 | | - |
77 | | -# Build and deploy to Kubernetes (requires cluster access) |
78 | | -kmcp build |
79 | | -kmcp install # Install controller (one-time setup) |
80 | | -kmcp deploy |
81 | 71 | ``` |
82 | 72 |
|
83 | | -Your MCP server is now running locally! Edit the generated tool in `src/tools/get_weather.py` to implement your logic. |
84 | | - |
85 | | -## Core Concepts |
86 | | - |
87 | | -`kmcp` is composed of three primary components that work together to provide a complete MCP server-management solution: |
88 | | - |
89 | | -### 1. The `kmcp` CLI |
90 | | - |
91 | | -The CLI is your primary tool for local development. It allows you to scaffold new MCP projects, manage tools, build container images, and run your MCP server locally for testing and development. |
92 | | - |
93 | | -### 2. The Kubernetes Controller |
94 | | - |
95 | | -The `kmcp` controller runs in your Kubernetes cluster and manages the lifecycle of your MCP server deployments. It uses a Custom Resource Definition (CRD) to define MCP servers as native Kubernetes objects, allowing you to manage them with familiar `kubectl` commands. |
96 | | - |
97 | | -### 3. The Transport Adapter |
98 | | - |
99 | | -In a Kubernetes environment, `kmcp` deploys your MCP server behind a dedicated Transport Adapter. `kmcp` acts as a control plane for this adapter, configuring it to provide features such as external traffic routing for your MCP server with support for multiple transport protocols without requiring any changes to your code. |
| 73 | +Verify that the kmcp CLI is installed. |
100 | 74 |
|
101 | | -## Features |
102 | | - |
103 | | -The `kmcp` CLI provides a set of commands to manage the entire lifecycle of your MCP server: |
104 | | - |
105 | | -| Command | Description | |
106 | | -|---------|-------------| |
107 | | -| `kmcp init` | Scaffolds a new MCP server project with FastMCP (Python) or MCP Go SDK | |
108 | | -| `kmcp add-tool` | Adds a new tool to your project with automatic boilerplate and registration | |
109 | | -| `kmcp run` | Runs the MCP server locally for development and testing | |
110 | | -| `kmcp build` | Builds a Docker image for your MCP server | |
111 | | -| `kmcp install` | Installs the `kmcp` controller and CRDs on a Kubernetes cluster (one-time setup) | |
112 | | -| `kmcp deploy` | Deploys your MCP server to Kubernetes behind a pre-configured Transport Adapter | |
113 | | -| `kmcp secrets` | Manages secrets for your MCP server deployment in Kubernetes | |
114 | | - |
115 | | - |
116 | | -## Architecture |
117 | | - |
118 | | -The following diagram illustrates the `kmcp` workflow, from local development to a production deployment in Kubernetes: |
119 | | - |
120 | | -```mermaid |
121 | | -graph TD |
122 | | - subgraph Local Development |
123 | | - A[Developer] -- kmcp init --> B(MCP Project); |
124 | | - B -- kmcp add-tool --> B; |
125 | | - B -- kmcp run --> C{Local MCP Server}; |
126 | | - A -- Edits Code --> B; |
127 | | - end |
128 | | -
|
129 | | - subgraph Production Deployment |
130 | | - B -- kmcp build --> D[Docker Image]; |
131 | | - D -- kmcp deploy --> E(Kubernetes Cluster); |
132 | | - end |
| 75 | +```bash |
| 76 | +kmcp --help |
| 77 | +``` |
133 | 78 |
|
134 | | - subgraph Kubernetes Cluster |
135 | | - F[kmcp Controller] -- Manages --> G(MCP Server CRD); |
136 | | - G -- Deploys --> H[Transport Adapter]; |
137 | | - H -- Proxies Traffic --> I[MCP Server Pod]; |
138 | | - end |
| 79 | +<img src="img/cli-help-nov-25.png" alt="kmcp cli help text" width="800"> |
139 | 80 |
|
140 | | - A -- Interacts with --> C; |
141 | | - E -- Contains --> F; |
142 | | - E -- Contains --> G; |
143 | | - E -- Contains --> H; |
144 | | - E -- Contains --> I; |
145 | | -``` |
| 81 | +_You're ready to go! Continue on to [From Prototype to Production](#from-prototype-to-production) or explore our docs at [kagent.dev/docs/kmcp](https://kagent.dev/docs/kmcp)_ |
146 | 82 |
|
147 | | -### How It Works |
| 83 | +## From Prototype to Production |
148 | 84 |
|
149 | | -1. **Local Development**: Developers use `kmcp init` to scaffold a new project and `kmcp add-tool` to add tools. The server runs locally with `kmcp run` for rapid iteration. |
| 85 | +<img src="img/kmcp.png" alt="kmcp architecture" width="800"> |
150 | 86 |
|
151 | | -2. **Build Phase**: `kmcp build` packages your MCP server into a Docker image, handling all dependencies and configuration automatically. |
| 87 | +MCP connectivity affects everyone in an organization. Below are some common quickstart journeys that you may experience: |
152 | 88 |
|
153 | | -3. **Deployment**: `kmcp deploy` creates a Kubernetes custom resource that the controller watches. The controller then: |
154 | | - - Deploys your MCP server as a pod |
155 | | - - Configures and deploys a Transport Adapter as a sidecar or separate service |
156 | | - - Sets up networking and ingress rules |
157 | | - - Manages secrets and environment variables |
| 89 | +- [Your first MCP service prototype](https://kagent.dev/docs/kmcp/develop) |
| 90 | +- [AI/ML Engineer packaging an existing prototype](https://kagent.dev/docs/kmcp/deploy/server#option-1-deploy-an-mcp-server-with-npx-or-uvx) |
| 91 | +- [DevOps engineer building MCP infrastructure in Kubernetes](https://kagent.dev/docs/kmcp/deploy/server#option-2-build-and-deploy-an-mcp-server) |
158 | 92 |
|
159 | | -4. **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. |
| 93 | +## Technical Details |
160 | 94 |
|
161 | | -## Use Cases |
| 95 | +`kmcp` is a comprehensive toolkit for building, deploying, and managing Model Context Protocol (MCP) servers. For a more detailed breakdown of using kmcp in your workflow, check out our [achitecture overview](/devel/architecture/workflow.md). |
162 | 96 |
|
163 | | -`kmcp` is designed for: |
| 97 | +### Core Components |
164 | 98 |
|
165 | | -- **AI/ML Engineers**: Building custom tools and integrations for AI agents with rapid iteration and testing |
166 | | -- **Platform Teams**: Managing multiple MCP servers across development, staging, and production environments |
167 | | -- **DevOps Engineers**: Deploying and scaling MCP infrastructure using familiar Kubernetes patterns |
168 | | -- **Enterprise Organizations**: Standardizing MCP server development and deployment across teams |
169 | | -- **Startups**: Quickly prototyping and deploying AI-powered features without infrastructure overhead |
| 99 | +- **[CLI](/pkg/cli/README.md)** is your primary tool for development. It allows you to scaffold new MCP projects, manage tools, build container images, and run your MCP server locally for testing and development. |
| 100 | +- **Controller**: Manages the lifecycle of your MCP server deployments in your Kubernetes cluster. It uses a Custom Resource Definition (CRD) to define MCP servers as native Kubernetes objects, allowing you to manage them with familiar `kubectl` commands. |
| 101 | +- **Transport Adapater** - Fronts the MCP server and provides features such as external traffic routing for your MCP server with support for multiple transport protocols without requiring any changes to your code. |
170 | 102 |
|
171 | | -## Documentation |
| 103 | +### Core Principles |
172 | 104 |
|
173 | | -The kmcp documentation is available at [kagent.dev/docs/kmcp](https://kagent.dev/docs/kmcp). |
| 105 | +- ✨ **Rapid scaffolding** with support for FastMCP (Python) and MCP Go SDK |
| 106 | +- 🚀 **One-command deployment** to Kubernetes with pre-configured Transport Adapters |
| 107 | +- 🔄 **Consistent workflow** from local development to production |
| 108 | +- 🌐 **Built-in transport support** for HTTP, WebSocket, and Server-Sent Events |
| 109 | +- ☸️ **Kubernetes-native** using Custom Resource Definitions (CRDs) |
| 110 | +- 🔐 **Secrets management** integrated with Kubernetes secrets |
174 | 111 |
|
175 | | -## 🤝 Contributing |
| 112 | +## Get Involved |
176 | 113 |
|
177 | | -We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details. |
| 114 | +_We welcome contributions! Contributors are expected to [respect the kagent Code of Conduct](https://github.com/kagent-dev/community/blob/main/CODE-OF-CONDUCT.md)_ |
178 | 115 |
|
179 | | -### Ways to Contribute |
| 116 | +There are many ways to get involved: |
180 | 117 |
|
181 | | -- 🐛 Report bugs and issues |
182 | | -- 💡 Suggest new features |
183 | | -- 📖 Improve documentation |
184 | | -- 🔧 Submit pull requests |
| 118 | +- 🐛 [Report bugs and issues](https://github.com/kagent-dev/kmcp/issues/) |
| 119 | +- 💡 [Suggest new features](https://github.com/kagent-dev/kmcp/issues/) |
| 120 | +- 📖 [Improve documentation](https://github.com/kagent-dev/website/) |
| 121 | +- 🔧 [Submit pull requests](/CONTRIBUTING.md) |
185 | 122 | - ⭐ Star the repository |
186 | | -- 💬 Help others in Discord |
| 123 | +- 💬 [Help others in Discord](https://discord.gg/Fu3k65f2k3) |
| 124 | +- 💬 [Join the kagent community meetings](https://calendar.google.com/calendar/u/0?cid=Y183OTI0OTdhNGU1N2NiNzVhNzE0Mjg0NWFkMzVkNTVmMTkxYTAwOWVhN2ZiN2E3ZTc5NDA5Yjk5NGJhOTRhMmVhQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20) |
| 125 | +- 🤝 [Share tips in the CNCF #kagent slack channel](https://cloud-native.slack.com/archives/C08ETST0076) |
| 126 | +- 🔒 [Report security concerns](SECURITY.md) |
187 | 127 |
|
188 | 128 | Thanks to all contributors! |
189 | 129 |
|
190 | 130 | <a href="https://github.com/kagent-dev/kmcp/graphs/contributors"> |
191 | | - <img src="https://contrib.rocks/image?repo=kagent-dev/kmcp" /> |
192 | | -</a> |
193 | | - |
194 | | -## 📈 Star History |
195 | | - |
196 | | -<a href="https://www.star-history.com/#kagent-dev/kmcp&Date"> |
197 | | - <picture> |
198 | | - <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=kagent-dev/kmcp&type=Date&theme=dark" /> |
199 | | - <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=kagent-dev/kmcp&type=Date" /> |
200 | | - <img alt="Star history of kagent-dev/kmcp over time" src="https://api.star-history.com/svg?repos=kagent-dev/kmcp&type=Date" /> |
201 | | - </picture> |
| 131 | + <img alt="kmcp contributors" src="https://contrib.rocks/image?repo=kagent-dev/kmcp" /> |
202 | 132 | </a> |
203 | 133 |
|
204 | | -## 📄 License |
205 | | - |
206 | | -Copyright 2025. |
207 | | - |
208 | | -Licensed under the Apache License, Version 2.0 (the "License"); |
209 | | -you may not use this file except in compliance with the License. |
210 | | -You may obtain a copy of the License at |
| 134 | +## Reference |
211 | 135 |
|
212 | | - http://www.apache.org/licenses/LICENSE-2.0 |
| 136 | +### Resources |
213 | 137 |
|
214 | | -Unless required by applicable law or agreed to in writing, software |
215 | | -distributed under the License is distributed on an "AS IS" BASIS, |
216 | | -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
217 | | -See the License for the specific language governing permissions and |
218 | | -limitations under the License. |
| 138 | +- [kMCP documentation](https://kagent.dev/docs/kmcp) |
219 | 139 |
|
220 | | -## 🔗 Resources |
| 140 | +### Ecosystem Resources |
221 | 141 |
|
222 | 142 | - [Model Context Protocol Specification](https://spec.modelcontextprotocol.io/) |
223 | 143 | - [MCP Documentation](https://modelcontextprotocol.io/) |
224 | 144 | - [Anthropic's MCP Announcement](https://www.anthropic.com/news/model-context-protocol) |
225 | 145 | - [FastMCP Python Documentation](https://github.com/jlowin/fastmcp) |
226 | 146 | - [MCP Go SDK](https://github.com/mark3labs/mcp-go) |
227 | 147 |
|
228 | | ---- |
| 148 | +### License |
| 149 | + |
| 150 | +This project is licensed under the [Apache 2.0 License.](/LICENSE) |
| 151 | + |
| 152 | +--- |
229 | 153 |
|
230 | 154 | <div align="center"> |
231 | | - <p>Built with ❤️ by the kagent team</p> |
232 | | - <p> |
233 | | - <a href="https://kagent.dev">Website</a> • |
234 | | - <a href="https://kagent.dev/docs/kmcp">Documentation</a> • |
235 | | - <a href="https://discord.gg/Fu3k65f2k3">Discord</a> • |
236 | | - <a href="https://github.com/kagent-dev/kmcp">GitHub</a> |
237 | | - </p> |
| 155 | + <p>Built with ❤️ by the <a href="https://github.com/kagent-dev">kagent team</a> </p> |
238 | 156 | </div> |
0 commit comments