File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,24 +286,8 @@ make bin/kagent-tools-linux-amd64
286286# Build Docker image
287287make docker-build
288288
289- # Build with specific version
290- VERSION=v1.0.0 make docker-build
291-
292289# Run in Docker
293- docker run --rm kagent-tools:latest
294- ```
295-
296- ### Release Process
297-
298- ``` bash
299- # Tag version
300- git tag v1.0.0
301-
302- # Build release artifacts
303- make release
304-
305- # Push Docker image
306- make docker-push
290+ make run
307291```
308292
309293## Environment Configuration
Original file line number Diff line number Diff line change 11DOCKER_REGISTRY ?= ghcr.io
22BASE_IMAGE_REGISTRY ?= cgr.dev
33DOCKER_REPO ?= kagent-dev/kagent
4+ KIND_CLUSTER_NAME ?= kagent
45
56BUILD_DATE := $(shell date -u '+% Y-% m-% d')
67GIT_COMMIT := $(shell git rev-parse --short HEAD || echo "unknown")
@@ -81,6 +82,18 @@ build:
8182 @echo " Build complete. Binaries are available in the bin/ directory."
8283 ls -lt bin/kagent-tools-*
8384
85+ .PHONY : run
86+ run : docker-build
87+ @echo " Running tool server on http://localhost:8084/mcp ..."
88+ @echo " Use: npx @modelcontextprotocol/inspector to connect to the tool server"
89+ @docker run --rm -p 8084:8084 -e KAGENT_TOOLS_PORT=8084 $(TOOLS_IMG )
90+
91+ PHONY : retag
92+ retag : docker-build
93+ @echo " Retagging tools image to $( RETAGGED_TOOLS_IMG) "
94+ docker tag $(TOOLS_IMG ) $(RETAGGED_TOOLS_IMG )
95+ kind load docker-image --name $(KIND_CLUSTER_NAME ) $(RETAGGED_TOOLS_IMG )
96+
8497TOOLS_IMAGE_NAME ?= tools
8598TOOLS_IMAGE_TAG ?= $(VERSION )
8699TOOLS_IMG ?= $(DOCKER_REGISTRY ) /$(DOCKER_REPO ) /$(TOOLS_IMAGE_NAME ) :$(TOOLS_IMAGE_TAG )
Original file line number Diff line number Diff line change @@ -568,8 +568,6 @@ func RegisterK8sTools(s *server.MCPServer) {
568568 // Log the error and proceed without native tool implementations
569569 logger .Get ().Info ("Failed to initialize Kubernetes client, falling back to kubectl commands" ,
570570 "level" , "warn" , "error" , err .Error ())
571- // Here you could register the pure-kubectl versions of the tools as a fallback
572- return
573571 }
574572 s .AddTool (mcp .NewTool ("k8s_get_resources" ,
575573 mcp .WithDescription ("Get Kubernetes resources using kubectl with enhanced native client support" ),
You can’t perform that action at this time.
0 commit comments