# [2.0.0](https://github.com/icy-r/kubemcp/compare/v1.2.0...v2.0.0) (2025-12-02)
* feat!: refactor to 9 consolidated tools with safety features ([c87aee1](https://github.com/icy-r/kubemcp/commit/c87aee1555d6f593aac5733bf84a7a5ce690f16b))
### Bug Fixes
* **ci:** use master branch instead of main ([2d29a26](https://github.com/icy-r/kubemcp/commit/2d29a2696875904f62645e703489bfede4f1e16c))
* correct repository URL and add .env.example ([1206e9f](https://github.com/icy-r/kubemcp/commit/1206e9f2a91fc2d67414f1287d029c61d16a5a6a))
### BREAKING CHANGES
* Tool API has been completely redesigned
- Consolidate 35 individual tools into 9 action-based tools:
- k8s_deployments (list, get, scale, restart, get_status, get_metrics)
- k8s_pods (list, get, delete, get_logs, summarize_logs, get_status)
- k8s_services (list, get, get_endpoints)
- k8s_configmaps (list, get, create, update, delete)
- k8s_secrets (list, get, create, update, delete)
- k8s_namespaces (list, get, create, delete)
- k8s_metrics (get_pod_metrics, get_node_metrics)
- k8s_events (list, get_resource_events, get_recent_events, get_events_by_type)
- k8s_audit (get_config, configure, get_session_log, clear_session_log, get_session_stats)
- Remove multipass support, keep only local and custom kubeconfig
- Add safety features:
- Audit logging for all operations
- Dry-run mode for previewing changes
- Confirmation required for destructive operations
- Migrate from Jest to Vitest for testing
- Set up CI/CD with semantic-release
- Update README with new tool documentation
# Changelog
All notable changes to the KubeMCP 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).
## [1.2.0] - 2025-11-09
### Security
- **Fixed critical security vulnerabilities** in dependencies:
- Resolved Prototype Pollution vulnerability in tough-cookie (Moderate)
- Fixed unsafe random function in form-data boundary generation (Critical)
- Addressed Server-Side Request Forgery in Request (Moderate)
### Changed
- **Upgraded @kubernetes/client-node from 0.22.3 to 1.4.0**
- Breaking API changes migrated: all Kubernetes API calls now use object-based parameters
- Updated API response handling: removed `.body` wrapper from responses
- Refactored 8 tool files to support new API structure
- Updated pnpm version in CI workflows from v8 to v9 for lockfile compatibility
### Added
- Automated security audit scripts (`pnpm audit` and `pnpm security:check`)
- GitHub Actions Security Audit workflow with weekly scanning
- Pre-commit security checks via Husky hooks
- Comprehensive security vulnerability management system
### Removed
- Dependabot configuration (automated dependency PRs disabled)
### Fixed
- ESLint warnings for unavoidable `any` types in Kubernetes API responses
- CI/CD pipeline lockfile compatibility issues
## [1.1.5] - 2025-11-07
### Added
- Dual publishing support: Now publishes to both npm and GitHub Packages
- GitHub Packages available as `@icy-r/kubemcp`
- Automated GitHub Packages publishing in release workflow
### Changed
- Release workflow now publishes to both registries simultaneously
- Updated installation documentation with both registry options
## [1.1.4] - 2025-11-07
### Added
- Comprehensive npx usage documentation in README
- Multiple installation options (npx, global install, local development)
- Clear MCP configuration examples for Cursor IDE
### Documentation
- Added quick install section with npx instructions
- Reorganized installation section for better clarity
- Added three configuration options for Cursor IDE integration
## [1.1.3] - 2025-11-07
### Fixed
- Merged publish workflow into release workflow to ensure automatic npm publishing on tag push
- GitHub workflows created by GITHUB_TOKEN don't trigger other workflows, so combined them
### Changed
- Release workflow now handles both GitHub release creation and npm publishing
- Publish workflow is now manual-only for emergency use
## [1.1.2] - 2025-11-07
### Fixed
- Removed test requirement from `prepublishOnly` script to fix npm publish failures
## [1.1.1] - 2025-11-07
### Changed
- Removed test steps from release and publish workflows to streamline the release process
### Fixed
- Enhanced package.json with additional metadata (bin entry, files specification, repository information)
## [1.1.0] - 2025-11-02
### Added
- **Token Optimization with TOON Format**: Automatic response formatting using TOON (Token-Oriented Object Notation)
- 50-60% token reduction for list operations (pods, deployments, services, metrics, events)
- Intelligent format selection (TOON for uniform arrays, JSON for complex structures)
- Tab-delimited encoding for maximum compression
- Configurable via `KUBEMCP_RESPONSE_FORMAT` environment variable (auto/json/toon)
- **Advanced Log Filtering**: Comprehensive log filtering capabilities for `k8s_get_pod_logs`
- Severity filtering: Filter logs by level (ERROR, WARN, INFO, DEBUG, TRACE)
- Time-based filtering: `sinceSeconds` and `sinceTime` parameters
- Content filtering: Grep-style regex pattern matching
- Size limits: `maxBytes` and `tail` with smart defaults
- 80-95% token reduction when filtering logs
- **Log Summarization Tool**: New `k8s_summarize_pod_logs` tool for efficient log analysis
- Returns statistics instead of full logs (90%+ token reduction)
- Severity level counts
- Top error pattern extraction with grouping
- Recent error samples
- Time range coverage
- Estimated size information
- **Configuration Options**:
- `KUBEMCP_RESPONSE_FORMAT`: Control response format (auto/json/toon)
- `KUBEMCP_LOG_MAX_LINES`: Default maximum lines per log request (default: 100)
- `KUBEMCP_LOG_MAX_BYTES`: Default maximum bytes per response (default: 100KB)
- `KUBEMCP_LOG_DEFAULT_SEVERITY`: Default severity filter for logs
- **New Utilities**:
- `src/utils/formatter.ts`: Smart response formatting with TOON support
- `src/utils/log-processor.ts`: Advanced log filtering and summarization
- **Comprehensive Testing**: Added test suites for new features
- `tests/formatter.test.ts`: TOON formatting tests
- `tests/log-processor.test.ts`: Log filtering and summarization tests
- **GitHub Actions Workflows**:
- Automated release workflow with changelog extraction
- CI workflow with multi-node testing and caching
### Changed
- Enhanced `k8s_get_pod_logs` tool with filtering parameters
- Updated tool schemas with detailed parameter descriptions
- Improved documentation with token optimization guide
### Performance
- **Massive token savings** across all operations:
- List 50 pods: 60% reduction (~2,500 → ~1,000 tokens)
- Pod logs (10K lines): 95% reduction (~40,000 → ~2,000 tokens with filters)
- Log summary: 99% reduction (~40,000 → ~400 tokens)
- List deployments (20): 61% reduction (~1,800 → ~700 tokens)
### Documentation
- Added comprehensive Token Optimization section to README
- Included TOON format examples and comparisons
- Added best practices for efficient log querying
- Token savings comparison table
## [1.0.0] - 2025-10-30
### Added
- Initial release of KubeMCP server
- Comprehensive Kubernetes resource management tools:
- Deployments (list, get, scale, restart, status)
- Pods (list, get, delete, logs, status)
- Services (list, get, endpoints)
- ConfigMaps (full CRUD operations)
- Secrets (full CRUD operations with secure handling)
- Namespaces (list, create, delete)
- Metrics (pod, node, deployment resource usage)
- Events (monitoring and troubleshooting)
- Dual kubeconfig mode support (local and multipass)
- Environment-based configuration
- Comprehensive error handling
- TypeScript with strict type checking
- ESLint and Prettier for code quality
- Jest testing framework
- Detailed documentation
### Features
- MCP SDK integration for Cursor IDE
- Kubernetes JavaScript client for API interaction
- Dynamic kubeconfig loading from Multipass VMs
- Real-time metrics retrieval
- Event monitoring capabilities
- Secure secret management
### Developer Experience
- Hot reload in development mode
- Comprehensive test coverage
- Pre-commit hooks with Husky
- Type-safe implementations
- Clear error messages