kagent
Cloud Native Agentic AI | Discord: https://bit.ly/kagentdiscord
claude mcp add --transport stdio kagent-dev-kagent docker run -i kagent-dev/kagent:latest \ --env KAGENT_LOG_LEVEL="INFO" \ --env KAGENT_KUBECONFIG="path/to/kubeconfig (optional)"
How to use
kagent provides an MCP server with a collection of Kubernetes-focused tools that agents can connect to and leverage within their workflows. These tools are exposed as Kubernetes custom resources (ToolServers) and cover areas such as managing Kubernetes resources, Istio, Helm, Argo workflows, Prometheus, Grafana, and Cilium, among others. Agents can discover available tools, invoke them through the MCP interface, and orchestrate complex automation pipelines inside a Kubernetes cluster. The framework is designed to be declarative and observable, so you can define your agents and their tools in YAML, and monitor their activity using standard tracing and metrics pipelines.
To use the server, start the MCP instance (as described in installation). Once running, connect your agent or controller to the MCP server and begin listing tools, invoking operations, and handling tool output. Tools are modeled as resources that can be reused across agents, enabling shared automation across teams. You can inspect tool capabilities, pass parameters, and capture results, all while benefiting from Kubernetes-native management and observability features such as OpenTelemetry tracing.
How to install
Prerequisites:
- A Kubernetes cluster or a local cluster (e.g., kind, minikube) for testing
- Docker installed on the host (for running the MCP server if using docker-based deployment)
- kubectl configured to access your cluster
Steps:
-
Ensure you have a Kubernetes cluster and kubectl configured
-
Deploy the MCP server (example using Docker run):
docker run -d --name kagent-mcp
-p 8080:8080
-e KAGENT_LOG_LEVEL=INFO
kagent-dev/kagent:latest -
Verify the MCP server is running:
docker ps | grep kagent
-
Connect an MCP client or agent to the server endpoint (e.g., http://<host>:8080) and begin listing/using ToolServers
-
If you are running inside Kubernetes, consider deploying via Helm or manifests as described in your project docs and ensure service accounts have appropriate permissions
Notes:
- Adjust environment variables (such as KAGENT_LOG_LEVEL) as needed for your environment
- If you deploy inside a cluster, expose the MCP server with a Service and use in-cluster DNS names
- Ensure appropriate RBAC permissions for the Tools you intend to use
Additional notes
Tips and common considerations:
- ToolServers are Kubernetes resources; ensure your cluster has the necessary CRD definitions installed for Tools
- Enable observability (OpenTelemetry) to trace tool usage and agent actions across the MCP server
- If you see connection issues, verify network policies and firewall rules allow access to the MCP server port
- Use descriptive labels for ToolServers to help with organization and discovery
- For production deployments, consider using a managed Kubernetes environment and configure high availability for the MCP server
- Environment variables like KAGENT_KUBECONFIG can be used to point tooling at a specific kubeconfig; keep credentials secure
Related MCP Servers
mindsdb
Query Engine for AI Analytics: Build self-reasoning agents across all your live data
adk-go
An open-source, code-first Go toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.
context-space
Ultimate Context Engineering Infrastructure, starting from MCPs and Integrations
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
mcp-for-argocd
An implementation of Model Context Protocol (MCP) server for Argo CD.
ai-infrastructure-agent
AI Infrastructure Agent is an intelligent system that allows you to manage AWS infrastructure using natural language commands.