rossella/fleet-mcp
If you are the rightful owner of fleet-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Fleet MCP Server is a Model Context Protocol server that facilitates interaction between AI assistants and Fleet's GitOps capabilities.
Fleet MCP Server
Model Context Protocol (MCP) server for Fleet that enables AI assistants to interact with Fleet's GitOps capabilities.
Prerequisites
- Go 1.21 or later (required by MCP SDK)
- Kubernetes cluster with Fleet installed
- Access credentials (kubeconfig or Rancher token)
Overview
This MCP server exposes Fleet resources (GitRepos, Bundles, BundleDeployments, Clusters, ClusterGroups) and operations through MCP tools, allowing AI assistants to:
- Query GitRepo status and deployments
- List and inspect Bundles and BundleDeployments
- Manage Fleet resources (create, update, delete)
- Diagnose deployment issues
- Monitor cluster health
Architecture
The server follows the architecture patterns from rancher-ai-mcp:
- MCP Server: HTTP handler with SSE streaming support
- Tools: Fleet-specific operations implemented as MCP tools
- Client: Kubernetes dynamic client wrapper
- Converter: Maps Fleet resource kinds to GroupVersionResources
- Response: Formats responses for LLM and UI consumption
Authentication
The server uses Rancher token authentication:
R_token: Rancher bearer token (required)R_url: Rancher server URL (required)
Tools
Read Operations
listGitRepos- List GitRepos in a namespacegetGitRepo- Get specific GitRepo detailsgetGitRepoStatus- Get GitRepo deployment statuslistBundles- List BundlesgetBundle- Get Bundle detailsgetBundleDeployments- List BundleDeployments for a BundlelistClusters- List managed clustersgetCluster- Get cluster detailslistClusterGroups- List cluster groupsinspectGitRepo- Deep inspection with related resources
Write Operations
createGitRepo- Create new GitRepoupdateGitRepo- Update GitRepo specpatchGitRepo- Patch GitRepo with JSON patchdeleteGitRepo- Delete GitRepopauseGitRepo- Pause/unpause GitRepoforceSyncGitRepo- Force GitRepo redeploymentupdateBundleTarget- Modify Bundle targetspauseCluster- Pause/unpause clustercreateClusterGroup- Create cluster groupdeleteClusterGroup- Delete cluster group
Diagnostic Operations
getGitRepoEvents- Get events for a GitRepogetBundleDeploymentDetails- Detailed BundleDeployment troubleshootinggetFleetAgentStatus- Check Fleet agent health
Development
# Build
go build -o fleet-mcp
# Run locally
./fleet-mcp
# Run tests
go test ./...
Deployment
The server is designed to run in a Kubernetes cluster with proper RBAC:
kubectl apply -f package/fleet-mcp.yaml
TLS Configuration
The server expects TLS certificates from Kubernetes secrets:
cattle-mcp-tls- Server certificatecattle-mcp-ca- CA certificate
Set INSECURE_SKIP_TLS=true for development environments.