# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.1] - 2026-09-02

### Changed
- Version bump to 2.0.1


## [2.0.0] - 2026-08-12

### Added
- **Implement approval-gated access for sensitive tools in code mode. Expose `kube_exec` and `kube_port` as top-level tools requiring user approval, while preventing their invocation through `run_code`. Update README and CHANGELOG to reflect these changes. Adjust package dependencies for `isolated-vm` and enhance sandbox runtime behavior. Add tests for sensitive tool approval and ensure proper tool discovery in various modes.**

### Changed
- **Refactor README for clarity and conciseness, introducing a new section on tool functionality. Add TypeScript build configuration and a clean script for build hygiene. Implement sensitive tool approval mechanisms with replay protection, enhancing security for `kube_pod_exec`. Update `GetResourceTool` to support aliases and improve validation. Add tests for new features and ensure proper tool discovery and approval flow.**
- **Update .gitignore to include AGENTS.md, enhance README with new features and capabilities, and adjust Node.js version requirement to >=22.0.0 in package.json and package-lock.json. Implement optional capability detection for Argo and Argo CD tools, and refine tool access policies in code mode. Update CHANGELOG to reflect these changes.**
- **Refactor KubernetesClient to utilize client-node auth/TLS options, simplifying request handling. Update GetResourceTool to support aliases for resourceType and implement event listing functionality. Add tests for GetResourceTool to verify new features and aliases.**
- **Update CHANGELOG for MCP 2026-07-28 migration, requiring Node.js 20+. Migrate to split TypeScript SDK v2 packages, removing sessionful HTTP mode. Enhance Streamable HTTP support with modern request handling and stateless protocol features. Update dependencies in package.json and package-lock.json.**
- **Enhance MCP publisher functionality by adding permission checks and server name validation. Update token parsing to handle claims and implement logout on namespace mismatch during publishing. Add tests for reauthentication flow.**

## [1.9.5] - 2026-08-05

### Changed

- **Updates for @emnapi/wasi-threads, brace-expansion, @hono/node-server, @modelcontextprotocol/sdk, body-parser, and fast-uri.**

## [1.9.4] - 2026-07-14

### Changed

- **Update .gitignore to include .envrc and bump version to 1.9.3 in package-lock.json**

### Removed

- **Remove pre-commit hook and enhance KubeListTool functionality by adding support for listing ReplicaSets and Jobs across namespaces. Update ArgoToolsPlugin to include ArgoCronListTool and adjust KubeListTool's resource type descriptions.**

## [1.9.3] - 2026-06-21

### Changed

- **Update to fix security issues**
- **Update package-lock.json to reflect version bump**

## [1.9.2] - 2026-06-13

### Added

- **Add npm source and issue metadata (#2)**

## [1.9.1] - 2026-06-13

### Fixed

- **(fix) Fix the launch issue for claude desktop**

## [1.9.0] - 2026-06-02

### Added

- **Add robust HelmDebugTool for enhanced Helm release diagnostics**

## [1.8.2] - 2026-05-26

### Changed

- **Enhance MCP publishing workflow by adding home directory support for token management and login checks. Update qs to 6.15.2 for improved security.**

## [1.8.1] - 2026-05-19

### Changed

- **Upgrading express-rate-limit, fast-uri, hono, ip-address, and ws for improved functionality and security**

## [1.8.0] - 2026-05-03

### Added

- **Streamable HTTP transport mode** with configurable host, port, path, stateless mode, JSON responses, and host/origin allowlists.

### Changed

- **Refactor MCP server startup** to support explicit transport injection and shared mode-specific server creation.
- **Upgrade `@modelcontextprotocol/sdk` to `^1.29.0`** for newer Streamable HTTP transport support and compatibility updates.

### Fixed

- **HTTP runtime correctness**: handle IPv6 `::1` bindings correctly, return JSON-RPC parse errors for malformed HTTP request bodies, and stop pre-session app servers when `initialize` is rejected before a session is created.
- **HTTP startup reporting**: log the actual bound port when `MCP_HTTP_PORT=0` assigns an ephemeral port.
- **Transport config scoping**: only enforce HTTP host allowlist validation when `MCP_TRANSPORT=http`, so default `stdio` startup is unaffected by HTTP-only environment variables.

## [1.7.6] - 2026-05-03

### Changed

- Version bump to 1.7.6

## [1.7.5] - 2026-04-22

### Changed

- **Update hono to version 4.12.14.**

## [1.7.4] - 2026-04-08

### Changed

- **Upgrade dependencies including @hono/node-server, hono, and path-to-regexp for improved functionality and security.**

## [1.7.3] - 2026-03-27

### Changed

- **Upgrading dependencies including brace-expansion, flatted, handlebars, picomatch, and yaml for improved functionality and security.**

## [1.7.2] - 2026-03-14

### Changed

- **Update dependencies in package-lock.json and modify release script in package.json to include npm install step. Key updates include upgrading minimatch, express, and ajv versions for improved functionality and security.**
- **Update package-lock.json to version 1.7.1**

## [1.7.1] - 2026-03-07

### Changed

- **Refactor publishing scripts and add tests for release workflow**
- **Enhance publish scripts and update README for clarity**
- **Update publish:mcp script in package.json to remove login requirement for mcp-publisher**
- **Refactor CLI run-command.js to simplify Kubernetes and Helm tool class handling**

## [1.7.0] - 2026-02-17

### Added

- **feat(helm): add API-first backend support for Helm commands**
- **feat(helm): add CLI fallback support for Helm v4 commands**

### Changed

- **Refactor CLI run-command.js to simplify Kubernetes and Helm tool class handling**

## [1.6.0] - 2026-02-04

### Changed

- **MCP SDK compatibility hardening**: Pin `@modelcontextprotocol/sdk` to `^1.25.3`.
- **Type import policy**: Disallow removed loose type exports (`Tools`, `Prompts`, `Resources`, `Roots`, `Sampling`) from `@modelcontextprotocol/sdk/types.js`.

### Added

- Introduced a structured planning helper for investigations.
- Added detailed skills documentation for debugging Kubernetes clusters in SKILL.md.
- Improved error handling for malformed JSON-RPC payloads in MCPServer.
- Added tests for structured planning and compatibility with the updated SDK.

## [1.5.1] - 2026-01-14

### Changed

- **Add error logging for ArgoCD API log fetch failure**

## [1.5.0] - 2025-12-21

### Added

- **Add direct Kubernetes API support for Argo/ArgoCD tools**

### Changed

- **Refactor Argo tools to use direct Kubernetes API support and enhance error handling**
- **Refactor ArgoCD tools to remove ArgoCDAppLogsTool and enhance ArgoCDAppTool**
- **Release v1.5.0**
- **Update README.md to enhance project description and add link to the article**

## [1.4.7] - 2025-12-03

### Changed

- **Update README.md to enhance project description and add link to the article**

## [1.4.6] - 2025-11-30

### Changed

- **Release v1.4.6**

## [1.4.5] - 2025-11-30

### Changed

- Version bump to 1.4.5

## [1.4.4] - 2025-11-30

### Changed

- **Update build-release and update-version scripts for automated version management**

## [1.4.0] - 2025-11-29

### Added

- **RunCode Tool Exposure**: Exposed `run_code` tool by default in standard mode alongside other tools.
- **Code-Mode Prompt**: Added `code-mode` prompt for injecting the full TypeScript API documentation, tool overview, and examples into the context.

### Changed

- **Documentation**: Improved README.md to be more professional, valid, and concise.
- **Name Change**: Changed name from `kubeview-mcp` to `kubeview` to align with the new MCP server name.
- **Dependencies**: Updated deprecated dependencies.

### Fixed

- **Filter Logic**: `kube_list` now honors namespace/selector filters even when `resourceType` is omitted.
- **Runtime Errors**: Fixed `ERR_MODULE_NOT_FOUND` for `typescript` package.
- **Build Issues**: Resolved TypeScript compilation errors in `src/index.ts`.
- **Logging**: Fixed missing-name errors in Kubernetes log tools.

## [1.3.0] - 2025-11-27

### Added

- **Code-Mode Execution**: Added sandboxed TypeScript code execution runtime following Anthropic's code execution with MCP approach
- **RunCodeTool**: Implemented `run_code` tool for executing TypeScript code in a sandboxed Node.js VM environment
- **Code-Mode CLI**: Added `kubeview-mcp-code-mode` binary and `npm run code-mode` script for standalone code execution
- **TypeScript Transpilation**: Integrated TypeScript compiler for runtime transpilation of agent code (ES2022 target)
- **Global Type Definitions**: Added `/sys/global.d.ts` resource providing TypeScript type definitions for all available tools
- **Tool Executor**: Implemented tool executor allowing sandboxed code to call MCP tools internally
- **Helper Functions**: Added namespaced `tools.*` helpers for discovery (`tools.list()`, `tools.search()`, `tools.help()`, `tools.call()`) and execution
- **Code-Mode Configuration**: Added `CodeModeConfig` with configurable sandbox limits (memory, timeout) and workspace settings
- **Mode Support**: Added `MCP_MODE` environment variable with three modes:
  - `code`: exposes only `run_code` tool
  - `tools`: exposes only Kubernetes/Helm/Argo tools (no `run_code`)
  - `all`: exposes both tools and `run_code` (default)
  - Replaced `NODE_MODE=code` with `MCP_MODE=code|tools|all`

### Changed

- **Plugin Architecture**: Removed version property from various tools plugins and MCPServer for simplified plugin management
- **Dependencies**: Added TypeScript as a runtime dependency (previously dev-only) for code-mode transpilation
- **Tool Manifest**: Enhanced tool manifest system to support dynamic tool generation for agent code execution

### Fixed

- **Type Definitions**: Fixed TypeScript typing for generated global DTS resources and resource registration

## [1.2.0] - 2025-08-19

### Changed

- **Changed variable naming**
- **Diabled logging by default**

## [1.1.0] - 2025-08-09

### Added

- **CLI Support Detection**: Added optional CLI support detection and improve plugin loading.
- **Multi-pod Log Streaming**: Added `KubeLogTool` for multi-pod log streaming with event merging.
- **Storage Diagnostics**: Enhanced `KubernetesClient` and `KubeListTool` with storage diagnostics.
- **RBAC Support**: Enhanced `KubernetesClient` and tools with RBAC support.
- **Network Diagnostics**: Added `KubeNetTool` for network diagnostics.
- **Sensitive Data Masking**: Implement sensitive data masking across outputs.
- **Exec Tool**: Added `ExecTool` for executing commands in Kubernetes pods.
- **Port Forward Tool**: Added `PortForwardTool` to Kubernetes tools.
- **Prometheus Target Discovery**: Enhanced Prometheus target discovery and metrics handling.
- **onNewConversation Hook**: Implemented `onNewConversation` hook for Kubernetes tools.

### Changed

- **URL and Timeout Parsing**: Updated `kubeview-mcp` URL and refactor timeout parsing.
- **Resource Tool Renaming**: Renamed `GetResourceTool` and `KubeListTool` for clarity.
- **Resource Tool Enhancement**: Enhanced `GetResourceTool` for broader resource support and improved diagnostics.
- **Helm Tool Streamlining**: Streamlined Helm tools and update CLI commands.
- **BaseToolsPlugin**: Refactored to introduce `BaseToolsPlugin` to reduce duplication across tool plugins.

### Fixed

- **Metric Retrieval**: Enhanced metric retrieval with improved proxy handling and fallback mechanisms.
- **API Call Signatures**: Corrected `CustomObjectsApi` call signatures and return `response.body` from raw metrics requests; improve kubelet summary fallback logging.
- **ESLint Rules**: Satisfied ESLint rules in `PortForwardTool` (no-empty/no-unused-vars).
- **Global Timeout Handling**: Implemented global timeout handling for tool commands.
- **Delay Handling**: Optimized delay handling in `RetryStrategy` for test environments.

## [1.0.0] - 2024-12-19

### Added

- **Initial stable release** 🎉
- Complete **Kubernetes MCP Server** with read-only cluster introspection
- **Comprehensive tool coverage**:
  - Resource management (Pods, Services, Deployments, Ingresses, ConfigMaps, Secrets, Namespaces)
  - Storage & persistence (PVs, PVCs with analysis)
  - Monitoring & observability (Metrics, Events, Logs)
  - Generic resource inspector
- **Helm integration** with full lifecycle support:
  - Release listing, status, history
  - Values, manifests, notes, hooks inspection
  - Kubernetes resource mapping
- **Argo Workflows integration**:
  - Workflow listing and inspection
  - Log streaming
  - Cron workflow support
- **ArgoCD integration**:
  - Application management
  - History and resource tracking
  - Log access
- **Production-ready features**:
  - Robust error handling with circuit breakers
  - Connection pooling and retry strategies
  - Comprehensive test suite (261 tests)
  - TypeScript strict mode
  - ESLint + Prettier formatting
  - Husky git hooks with lint-staged
- **Release automation**:
  - Added `npm run release` script for streamlined releases
  - Pre-release validation (git status, quality checks)
  - Automatic version tagging

### Technical Details

- **Node.js ≥ 18** requirement
- **ESNext modules** with TypeScript 5.8+
- **Model Context Protocol SDK v1.17+**
- **Kubernetes JavaScript client v1.3+**
- Full **CI/CD pipeline** with automated quality gates

### Documentation

- Comprehensive README with usage examples
- CLI reference for all 30+ tools
- Integration guides for Cursor IDE
- API documentation for developers

[1.0.0]: https://github.com/mikhae1/kubeview-mcp/releases/tag/v1.0.0
