Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ebdeb6a
test(resources): update generic resources tests to use testify and im…
manusa Oct 30, 2025
09c8b23
chore(docs): missing documentation for nodes_stats_summary (#424)
manusa Oct 30, 2025
ce6ec78
test(pods): update pods tests to use testify and improve readability …
manusa Nov 3, 2025
c58f620
chore(makefile): script clean ups (#431)
matzew Nov 3, 2025
ce404f7
build(deps): bump github.com/mark3labs/mcp-go from 0.42.0 to 0.43.0 (…
dependabot[bot] Nov 3, 2025
9d82959
test(pods): update PodsRun tests to use testify and improve readabili…
manusa Nov 3, 2025
d6f99e9
build(deps): bump sigs.k8s.io/controller-runtime from 0.22.3 to 0.22.…
dependabot[bot] Nov 4, 2025
6f3a2e0
test(mcp): refactor WatchKubeConfig tests to use testify and improve …
manusa Nov 4, 2025
1783144
feat(nodes): nodes_top retrieves Node resource consumption (metrics A…
ngopalak-redhat Nov 4, 2025
711239b
test(mcp): remove redundant testCase function and streamline test set…
manusa Nov 4, 2025
62bd582
test(mcp): refactored OpenShift related tests to use testify (#438)
manusa Nov 4, 2025
a301b0f
test(mcp): refactor logging tests to use testify (#439)
manusa Nov 4, 2025
db3f51d
fix(toolsets): remove "redundant" annotations that have defaults (#441)
manusa Nov 5, 2025
6342379
fix(mcp): do not enable Resource / Prompts yet, as there are none (#442)
matzew Nov 5, 2025
7e9e176
test(authorization): improved tests to use real MCP clients (#443)
manusa Nov 7, 2025
9b1c814
build(deps): bump golang.org/x/sync from 0.17.0 to 0.18.0 (#446)
dependabot[bot] Nov 11, 2025
545b946
build(deps): bump golang.org/x/oauth2 from 0.32.0 to 0.33.0 (#447)
dependabot[bot] Nov 11, 2025
86ed1ba
chore(ci): restrict publish jobs to specific repository (#448)
manusa Nov 11, 2025
24fd9bc
chore(ci): update macOS build (Amd64/x86-64) target from 13 to 15 (#450)
manusa Nov 11, 2025
ae6eced
test(mcp): add tests for WatchKubeConfig tools reload (#449)
manusa Nov 11, 2025
87039f3
build(deps): bump helm.sh/helm/v3 from 3.19.0 to 3.19.1 (#451)
dependabot[bot] Nov 12, 2025
3a56319
fix: use proper context import (#454)
manusa Nov 12, 2025
70b24cc
build(deps): bump golang.org/x/net from 0.46.0 to 0.47.0 (#452)
dependabot[bot] Nov 12, 2025
220bca1
chore(deps): update Go version from 1.24.1 to 1.24.10 (#455)
manusa Nov 12, 2025
fc817bf
feat(cmd)!: remove deprecated http/sse port from cli (#444)
matzew Nov 12, 2025
d072e26
chore(ci): separate npm makefile targets and auto-generate package.js…
manusa Nov 12, 2025
9c9e7fc
chore(ci): update Go version to 1.25 and golangci-lint to v2.6.1 (#456)
manusa Nov 12, 2025
631605b
build(deps): bump k8s.io/apimachinery from 0.34.1 to 0.34.2 (#459)
dependabot[bot] Nov 13, 2025
2d79243
build(deps): bump k8s.io/metrics from 0.34.1 to 0.34.2 (#461)
dependabot[bot] Nov 13, 2025
4a8150a
build(deps): bump k8s.io/kubectl from 0.34.1 to 0.34.2 (#460)
dependabot[bot] Nov 13, 2025
1ff665a
build(deps): bump helm.sh/helm/v3 from 3.19.1 to 3.19.2 (#462)
dependabot[bot] Nov 13, 2025
72ca3f9
build(deps): bump k8s.io/apiextensions-apiserver from 0.34.1 to 0.34.…
dependabot[bot] Nov 13, 2025
655ffae
sync: merge upstream main with downstream config
matzew Nov 14, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.23
GO_VERSION: 1.25

defaults:
run:
Expand All @@ -36,7 +36,7 @@ jobs:
- ubuntu-latest #x64
- ubuntu-24.04-arm #arm64
- windows-latest #x64
- macos-13 #x64
- macos-15-intel #x64
- macos-latest #arm64
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
jobs:
publish-platform-images:
name: 'Publish: linux-${{ matrix.platform.tag }}'
if: github.repository == 'containers/kubernetes-mcp-server'
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -47,6 +48,7 @@ jobs:

publish-manifest:
name: Publish Manifest
if: github.repository == 'containers/kubernetes-mcp-server'
runs-on: ubuntu-latest
needs: publish-platform-images
steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.23
GO_VERSION: 1.25
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}

permissions:
Expand All @@ -22,6 +22,7 @@ permissions:
jobs:
release:
name: Release
if: github.repository == 'containers/kubernetes-mcp-server'
runs-on: macos-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -50,6 +51,7 @@ jobs:
make npm-publish
python:
name: Release Python
if: github.repository == 'containers/kubernetes-mcp-server'
# Python logic requires the tag/release version to be available from GitHub
needs: release
runs-on: ubuntu-latest
Expand Down
32 changes: 3 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ LD_FLAGS = -s -w \
COMMON_BUILD_ARGS = -ldflags "$(LD_FLAGS)"

GOLANGCI_LINT = $(shell pwd)/_output/tools/bin/golangci-lint
GOLANGCI_LINT_VERSION ?= v2.5.0
GOLANGCI_LINT_VERSION ?= v2.6.1

# NPM version should not append the -dirty flag
NPM_VERSION ?= $(shell echo $(shell git describe --tags --always) | sed 's/^v//')
GIT_TAG_VERSION ?= $(shell echo $(shell git describe --tags --always) | sed 's/^v//')
OSES = darwin linux windows
ARCHS = amd64 arm64

CLEAN_TARGETS :=
CLEAN_TARGETS += '$(BINARY_NAME)'
CLEAN_TARGETS += $(foreach os,$(OSES),$(foreach arch,$(ARCHS),$(BINARY_NAME)-$(os)-$(arch)$(if $(findstring windows,$(os)),.exe,)))
CLEAN_TARGETS += $(foreach os,$(OSES),$(foreach arch,$(ARCHS),./npm/$(BINARY_NAME)-$(os)-$(arch)/bin/))
CLEAN_TARGETS += ./npm/kubernetes-mcp-server/.npmrc ./npm/kubernetes-mcp-server/LICENSE ./npm/kubernetes-mcp-server/README.md
CLEAN_TARGETS += $(foreach os,$(OSES),$(foreach arch,$(ARCHS),./npm/$(BINARY_NAME)-$(os)-$(arch)/.npmrc))

# The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`.
# The awk commands is responsible to read the entire set of makefiles included in this invocation, looking for lines of the file as xyz: ## something, and then pretty-format the target and help. Then, if there's a line with ##@ something, that gets pretty-printed as a category.
Expand Down Expand Up @@ -57,33 +54,10 @@ build-all-platforms: clean tidy format lint ## Build the project for all platfor
GOOS=$(os) GOARCH=$(arch) go build $(COMMON_BUILD_ARGS) -o $(BINARY_NAME)-$(os)-$(arch)$(if $(findstring windows,$(os)),.exe,) ./cmd/kubernetes-mcp-server; \
))

.PHONY: npm-copy-binaries
npm-copy-binaries: build-all-platforms ## Copy the binaries to each npm package
$(foreach os,$(OSES),$(foreach arch,$(ARCHS), \
EXECUTABLE=./$(BINARY_NAME)-$(os)-$(arch)$(if $(findstring windows,$(os)),.exe,); \
DIRNAME=$(BINARY_NAME)-$(os)-$(arch); \
mkdir -p ./npm/$$DIRNAME/bin; \
cp $$EXECUTABLE ./npm/$$DIRNAME/bin/; \
))

.PHONY: npm-publish
npm-publish: npm-copy-binaries ## Publish the npm packages
$(foreach os,$(OSES),$(foreach arch,$(ARCHS), \
DIRNAME="$(BINARY_NAME)-$(os)-$(arch)"; \
cd npm/$$DIRNAME; \
jq '.version = "$(NPM_VERSION)"' package.json > tmp.json && mv tmp.json package.json; \
npm publish --tag latest; \
cd ../..; \
))
cp README.md LICENSE ./npm/kubernetes-mcp-server/
jq '.version = "$(NPM_VERSION)"' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
jq '.optionalDependencies |= with_entries(.value = "$(NPM_VERSION)")' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
cd npm/kubernetes-mcp-server && npm publish --tag latest

.PHONY: python-publish
python-publish: ## Publish the python packages
cd ./python && \
sed -i "s/version = \".*\"/version = \"$(NPM_VERSION)\"/" pyproject.toml && \
sed -i "s/version = \".*\"/version = \"$(GIT_TAG_VERSION)\"/" pyproject.toml && \
uv build && \
uv publish

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ In case multi-cluster support is enabled (default) and you have access to multip
- `query` (`string`) **(required)** - query specifies services(s) or files from which to return logs (required). Example: "kubelet" to fetch kubelet logs, "/<log-file-name>" to fetch a specific log file from the node (e.g., "/var/log/kubelet.log" or "/var/log/kube-proxy.log")
- `tailLines` (`integer`) - Number of lines to retrieve from the end of the logs (Optional, 0 means all logs)

- **nodes_stats_summary** - Get detailed resource usage statistics from a Kubernetes node via the kubelet's Summary API. Provides comprehensive metrics including CPU, memory, filesystem, and network usage at the node, pod, and container levels. On systems with cgroup v2 and kernel 4.20+, also includes PSI (Pressure Stall Information) metrics that show resource pressure for CPU, memory, and I/O. See https://kubernetes.io/docs/reference/instrumentation/understand-psi-metrics/ for details on PSI metrics
- `name` (`string`) **(required)** - Name of the node to get stats from

- **nodes_top** - List the resource consumption (CPU and memory) as recorded by the Kubernetes Metrics Server for the specified Kubernetes Nodes or all nodes in the cluster
- `label_selector` (`string`) - Kubernetes label selector (e.g. 'node-role.kubernetes.io/worker=') to filter nodes by label (Optional, only applicable when name is not provided)
- `name` (`string`) - Name of the Node to get the resource consumption from (Optional, all Nodes if not provided)

- **pods_list** - List all the Kubernetes pods in the current cluster from all namespaces
- `labelSelector` (`string`) - Optional Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label

Expand Down
36 changes: 0 additions & 36 deletions build/acm.mk

This file was deleted.

2 changes: 2 additions & 0 deletions build/keycloak.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ keycloak-install:
keycloak-uninstall:
@kubectl delete -f dev/config/keycloak/deployment.yaml 2>/dev/null || true

##@ Keycloak

.PHONY: keycloak-status
keycloak-status: ## Show Keycloak status and connection info
@if kubectl get svc -n $(KEYCLOAK_NAMESPACE) keycloak >/dev/null 2>&1; then \
Expand Down
74 changes: 74 additions & 0 deletions build/node.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
##@ Node/NPM build targets

NPM_PACKAGE = kubernetes-mcp-server

CLEAN_TARGETS += $(foreach os,$(OSES),$(foreach arch,$(ARCHS),./npm/$(BINARY_NAME)-$(os)-$(arch)))
CLEAN_TARGETS += ./npm/$(NPM_PACKAGE)/LICENSE ./npm/$(NPM_PACKAGE)/package.json ./npm/$(NPM_PACKAGE)/README.md

.PHONY: npm-copy-binaries
npm-copy-binaries: build-all-platforms ## Copy the binaries to each npm package
$(foreach os,$(OSES),$(foreach arch,$(ARCHS), \
EXECUTABLE=./$(BINARY_NAME)-$(os)-$(arch)$(if $(findstring windows,$(os)),.exe,); \
NPM_EXECUTABLE=$(NPM_PACKAGE)-$(os)-$(arch)$(if $(findstring windows,$(os)),.exe,); \
DIRNAME=$(NPM_PACKAGE)-$(os)-$(arch); \
mkdir -p ./npm/$$DIRNAME/bin; \
cp $$EXECUTABLE ./npm/$$DIRNAME/bin/$$NPM_EXECUTABLE; \
))


MAIN_PACKAGE_JSON=./npm/$(NPM_PACKAGE)/package.json
.PHONY: npm-copy-project-files
npm-copy-project-files: npm-copy-binaries ## Copy the project files to the main npm package and generate all package.json files
cp README.md LICENSE ./npm/$(NPM_PACKAGE)/
@echo '{"name": "$(NPM_PACKAGE)",' > $(MAIN_PACKAGE_JSON)
@echo '"version": "$(GIT_TAG_VERSION)",' >> $(MAIN_PACKAGE_JSON)
@echo '"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",' >> $(MAIN_PACKAGE_JSON)
@echo '"main": "./bin/index.js",' >> $(MAIN_PACKAGE_JSON)
@echo '"bin": {"$(NPM_PACKAGE)": "bin/index.js"},' >> $(MAIN_PACKAGE_JSON)
@echo '"optionalDependencies": {' >> $(MAIN_PACKAGE_JSON)
@for os in $(OSES); do \
for arch in $(ARCHS); do \
if [ "$$os" = "$(lastword $(OSES))" ] && [ "$$arch" = "$(lastword $(ARCHS))" ]; then \
echo " \"$(NPM_PACKAGE)-$$os-$$arch\": \"$(GIT_TAG_VERSION)\""; \
else \
echo " \"$(NPM_PACKAGE)-$$os-$$arch\": \"$(GIT_TAG_VERSION)\","; \
fi \
done; \
done >> $(MAIN_PACKAGE_JSON)
@echo '},' >> $(MAIN_PACKAGE_JSON)
@echo '"repository": {"type": "git", "url": "git+https://github.com/containers/kubernetes-mcp-server.git"},' >> $(MAIN_PACKAGE_JSON)
@echo '"keywords": ["mcp","kubernetes","openshift","model context protocol","model","context","protocol"],' >> $(MAIN_PACKAGE_JSON)
@echo '"author": {"name": "Marc Nuri", "url": "https://www.marcnuri.com"},' >> $(MAIN_PACKAGE_JSON)
@echo '"license": "Apache-2.0",' >> $(MAIN_PACKAGE_JSON)
@echo '"bugs": {"url": "https://github.com/containers/kubernetes-mcp-server/issues"},' >> $(MAIN_PACKAGE_JSON)
@echo '"homepage": "https://github.com/containers/kubernetes-mcp-server#readme"' >> $(MAIN_PACKAGE_JSON)
@echo '}' >> $(MAIN_PACKAGE_JSON)
$(foreach os,$(OSES),$(foreach arch,$(ARCHS), \
OS_PACKAGE_JSON=./npm/$(NPM_PACKAGE)-$(os)-$(arch)/package.json; \
echo '{"name": "$(NPM_PACKAGE)-$(os)-$(arch)",' > $$OS_PACKAGE_JSON; \
echo '"version": "$(GIT_TAG_VERSION)",' >> $$OS_PACKAGE_JSON; \
echo '"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",' >> $$OS_PACKAGE_JSON; \
echo '"repository": {"type": "git", "url": "git+https://github.com/containers/kubernetes-mcp-server.git"},' >> $$OS_PACKAGE_JSON; \
OS="$(os)"; \
if [ "$$OS" = "windows" ]; then OS="win32"; fi; \
echo '"os": ["'$$OS'"],' >> $$OS_PACKAGE_JSON; \
NPM_ARCH="$(arch)"; \
if [ "$$NPM_ARCH" = "amd64" ]; then NPM_ARCH="x64"; fi; \
echo '"cpu": ["'$$NPM_ARCH'"]' >> $$OS_PACKAGE_JSON; \
echo '}' >> $$OS_PACKAGE_JSON; \
))

.PHONY: npm-publish
npm-publish: npm-copy-project-files ## Publish the npm packages
$(foreach os,$(OSES),$(foreach arch,$(ARCHS), \
DIRNAME="$(BINARY_NAME)-$(os)-$(arch)"; \
cd npm/$$DIRNAME; \
jq '.version = "$(GIT_TAG_VERSION)"' package.json > tmp.json && mv tmp.json package.json; \
npm publish --tag latest; \
cd ../..; \
))
cp README.md LICENSE ./npm/kubernetes-mcp-server/
jq '.version = "$(GIT_TAG_VERSION)"' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
jq '.optionalDependencies |= with_entries(.value = "$(GIT_TAG_VERSION)")' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
cd npm/kubernetes-mcp-server && npm publish --tag latest

2 changes: 1 addition & 1 deletion build/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ $(KIND):
GOBIN=$(PWD)/_output/bin go install sigs.k8s.io/kind@$(KIND_VERSION)

.PHONY: kind
kind: $(KIND) ## Download kind locally if necessary
kind: $(KIND)
13 changes: 0 additions & 13 deletions docs/openshift/README.md

This file was deleted.

123 changes: 0 additions & 123 deletions docs/openshift/acm.md

This file was deleted.

Binary file not shown.
Loading