Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ bin/
/helm/kagent-tools/Chart.yaml
/reports/tools-cve.csv
.dagger/
/tools/.cache/
.gocache/
/dist/*
4 changes: 3 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ These tools enhance functionality but aren't required for basic development:
- `kubectl` - Kubernetes CLI for k8s tools
- `helm` - Helm package manager for helm tools
- `istioctl` - Istio service mesh CLI for istio tools
- `linkerd` - Linkerd service mesh CLI for linkerd tools
- `cilium` - Cilium CLI for cilium tools

## Project Structure
Expand All @@ -32,6 +33,7 @@ These tools enhance functionality but aren't required for basic development:
│ ├── k8s/ # Kubernetes tools
│ ├── helm/ # Helm package manager tools
│ ├── istio/ # Istio service mesh tools
│ ├── linkerd/ # Linkerd service mesh tools
│ ├── cilium/ # Cilium CNI tools
│ ├── argo/ # Argo Rollouts tools
│ ├── prometheus/ # Prometheus monitoring tools
Expand Down Expand Up @@ -422,4 +424,4 @@ git commit -m "docs(readme): update installation instructions"
- Check existing issues in the repository
- Review the CLAUDE.md file for project-specific guidance
- Consult Go documentation and best practices
- Ask questions in code reviews or team discussions
- Ask questions in code reviews or team discussions
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ RUN curl -Lo cilium.tar.gz https://github.com/cilium/cilium-cli/releases/downloa
&& rm -rf cilium.tar.gz \
&& /downloads/cilium version

# Install Linkerd CLI
ARG TOOLS_LINKERD_VERSION
RUN curl -Lo /downloads/linkerd https://github.com/linkerd/linkerd2/releases/download/${TOOLS_LINKERD_VERSION}/linkerd2-cli-${TOOLS_LINKERD_VERSION}-linux-${TARGETARCH} \
&& chmod +x /downloads/linkerd \
&& /downloads/linkerd version --client

### STAGE 2: build-tools MCP
ARG BASE_IMAGE_REGISTRY=cgr.dev
ARG BUILDARCH=amd64
Expand Down Expand Up @@ -96,6 +102,7 @@ COPY --from=tools --chown=65532:65532 /downloads/istioctl /bin/isti
COPY --from=tools --chown=65532:65532 /downloads/helm /bin/helm
COPY --from=tools --chown=65532:65532 /downloads/kubectl-argo-rollouts /bin/kubectl-argo-rollouts
COPY --from=tools --chown=65532:65532 /downloads/cilium /bin/cilium
COPY --from=tools --chown=65532:65532 /downloads/linkerd /bin/linkerd
# Copy the tool-server binary
COPY --from=builder --chown=65532:65532 /workspace/tool-server /tool-server

Expand All @@ -106,4 +113,4 @@ LABEL org.opencontainers.image.description="Kagent MCP tools server"
LABEL org.opencontainers.image.authors="Kagent Creators 🤖"
LABEL org.opencontainers.image.version="$VERSION"

ENTRYPOINT ["/tool-server"]
ENTRYPOINT ["/tool-server"]
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ TOOLS_ARGO_ROLLOUTS_VERSION ?= 1.8.3
TOOLS_KUBECTL_VERSION ?= 1.34.2
TOOLS_HELM_VERSION ?= 3.19.0
TOOLS_CILIUM_VERSION ?= 0.18.9
TOOLS_LINKERD_VERSION ?= edge-25.11.3

# build args
TOOLS_IMAGE_BUILD_ARGS = --build-arg VERSION=$(VERSION)
Expand All @@ -151,6 +152,7 @@ TOOLS_IMAGE_BUILD_ARGS += --build-arg TOOLS_ARGO_ROLLOUTS_VERSION=$(TOOLS_ARGO_R
TOOLS_IMAGE_BUILD_ARGS += --build-arg TOOLS_KUBECTL_VERSION=$(TOOLS_KUBECTL_VERSION)
TOOLS_IMAGE_BUILD_ARGS += --build-arg TOOLS_HELM_VERSION=$(TOOLS_HELM_VERSION)
TOOLS_IMAGE_BUILD_ARGS += --build-arg TOOLS_CILIUM_VERSION=$(TOOLS_CILIUM_VERSION)
TOOLS_IMAGE_BUILD_ARGS += --build-arg TOOLS_LINKERD_VERSION=$(TOOLS_LINKERD_VERSION)

.PHONY: buildx-create
buildx-create:
Expand Down Expand Up @@ -299,4 +301,4 @@ GOBIN=$(LOCALBIN) go install $${package} ;\
mv $(1) $(1)-$(3) ;\
} ;\
ln -sf $(1)-$(3) $(1)
endef
endef
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,33 @@ Provides Istio service mesh management:
- **istio_waypoint_status**: Get waypoint proxy status
- **istio_ztunnel_config**: Get ztunnel configuration

### 4. Argo Rollouts Tools (`argo.go`)
### 4. Linkerd Tools (`linkerd.go`)
Provides Linkerd service mesh management:

- **linkerd_check**: Run pre-flight or proxy checks
- **linkerd_install**: Install Linkerd control plane manifests
- **linkerd_install_cni**: Install the Linkerd CNI components
- **linkerd_upgrade**: Upgrade Linkerd installation components
- **linkerd_uninstall**: Remove Linkerd components
- **linkerd_version**: Show Linkerd client and server versions
- **linkerd_authz**: Inspect authorizations for a workload
- **linkerd_stat**: Retrieve Linkerd metrics for resources
- **linkerd_top**: Inspect live traffic for workloads
- **linkerd_edges**: Display allowed edges between resources
- **linkerd_routes**: Inspect HTTP routes for a resource
- **linkerd_diagnostics_proxy_metrics**: Collect raw proxy metrics
- **linkerd_diagnostics_controller_metrics**: Fetch controller metrics
- **linkerd_diagnostics_endpoints**: Inspect service discovery endpoints
- **linkerd_diagnostics_policy**: Inspect policy state for an authority
- **linkerd_diagnostics_profile**: Inspect service discovery profile data
- **linkerd_viz_install**: Install the Linkerd viz extension
- **linkerd_viz_uninstall**: Remove the Linkerd viz extension
- **linkerd_viz_top**: Inspect live traffic using viz extension
- **linkerd_viz_stat**: Retrieve viz metrics for resources
- **linkerd_fips_audit**: Audit Linkerd proxies for FIPS compliance
- **linkerd_policy_generate**: Generate policy manifests for workloads

### 5. Argo Rollouts Tools (`argo.go`)
Provides Argo Rollouts progressive delivery functionality:

- **verify_argo_rollouts_controller_install**: Verify controller installation
Expand All @@ -115,7 +141,7 @@ Provides Argo Rollouts progressive delivery functionality:
- **verify_gateway_plugin**: Verify Gateway API plugin
- **check_plugin_logs**: Check plugin installation logs

### 5. Cilium Tools (`cilium.go`)
### 6. Cilium Tools (`cilium.go`)
Provides Cilium CNI and networking functionality:

- **cilium_status_and_version**: Get Cilium status and version
Expand All @@ -131,36 +157,36 @@ Provides Cilium CNI and networking functionality:
- **toggle_hubble**: Enable/disable Hubble
- **toggle_cluster_mesh**: Enable/disable cluster mesh

### 6. Prometheus Tools (`prometheus.go`)
### 7. Prometheus Tools (`prometheus.go`)
Provides Prometheus monitoring and alerting functionality:

- **prometheus_query**: Execute PromQL queries
- **prometheus_range_query**: Execute PromQL range queries
- **prometheus_labels**: Get available labels
- **prometheus_targets**: Get scraping targets and their status

### 7. Grafana Tools (`grafana.go`)
### 8. Grafana Tools (`grafana.go`)
Provides Grafana dashboard and alerting management:

- **grafana_org_management**: Manage Grafana organizations
- **grafana_dashboard_management**: Manage dashboards
- **grafana_alert_management**: Manage alerts and alert rules
- **grafana_datasource_management**: Manage data sources

### 8. DateTime Tools (`datetime.go`)
### 9. DateTime Tools (`datetime.go`)
Provides time and date utilities:

- **current_date_time**: Get current date and time in ISO 8601 format
- **format_time**: Format timestamps with optional timezone
- **parse_time**: Parse time strings into RFC3339 format

### 9. Documentation Tools (`docs.go`)
### 10. Documentation Tools (`docs.go`)
Provides documentation query functionality:

- **query_documentation**: Query documentation for supported products (simplified implementation)
- **list_supported_products**: List supported products for documentation queries

### 10. Common Tools (`common.go`)
### 11. Common Tools (`common.go`)
Provides general utility functions:

- **shell**: Execute shell commands
Expand All @@ -174,6 +200,7 @@ Provides general utility functions:
- `kubectl` (for Kubernetes tools)
- `helm` (for Helm tools)
- `istioctl` (for Istio tools)
- `linkerd` (for Linkerd tools)
- `cilium` (for Cilium tools)

### Building
Expand Down
2 changes: 2 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/kagent-dev/tools/pkg/helm"
"github.com/kagent-dev/tools/pkg/istio"
"github.com/kagent-dev/tools/pkg/k8s"
"github.com/kagent-dev/tools/pkg/linkerd"
"github.com/kagent-dev/tools/pkg/prometheus"
"github.com/kagent-dev/tools/pkg/utils"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -291,6 +292,7 @@ func registerMCP(mcp *server.MCPServer, enabledToolProviders []string, kubeconfi
"cilium": cilium.RegisterTools,
"helm": helm.RegisterTools,
"istio": istio.RegisterTools,
"linkerd": linkerd.RegisterTools,
"k8s": func(s *server.MCPServer) { k8s.RegisterTools(s, nil, kubeconfig) },
"prometheus": prometheus.RegisterTools,
"utils": utils.RegisterTools,
Expand Down
Loading