Provides git operations including status checking and creating commits with validation for conventional commit format and enforced human-only authorship attribution.
Provides tools for contributing to Google Cloud Platform's k8s-config-connector project, including adding fields to resources, migrating resources from Terraform-based to direct controller architecture, and creating commits with enforced attribution rules.
Enables contributions to Kubernetes Config Connector resources, including scaffolding API types, identity handlers, controllers, and MockGCP implementations for Kubernetes resource definitions.
Supports migration of Terraform-based resources to direct controller architecture through a 7-phase workflow, including detection of Terraform resources and migration planning.
KCC MCP Server
Model Context Protocol (MCP) server for contributing to Google Cloud Platform's k8s-config-connector.
This MCP server provides AI assistants with tools to:
Add fields to existing direct controller resources
Migrate resources from Terraform-based to direct controller architecture
Create commits with enforced attribution rules (NO AI attribution)
Features
✅ 12 MCP Tools for k8s-config-connector contributions ✅ Universal AI Attribution Blocking - enforces human-only commit authorship ✅ Resource Detection - automatically determines controller type ✅ Migration Planning - 7-phase workflow for Terraform → Direct migration ✅ Code Scaffolding - generates boilerplate for types, controller, MockGCP ✅ Proto Annotations - maintains KRM ↔ GCP proto mappings
Quick Start
Installation with Gemini CLI (Recommended)
Manual Installation
Configuration
Option 1: Interactive Setup (Easiest)
Run the setup script after installation:
This creates ~/.config/kcc-mcp-server/config.json with your settings.
Option 2: Manual Config File
Create ~/.config/kcc-mcp-server/config.json:
Option 3: Environment Variables
Usage with Gemini CLI
Example prompts:
See GEMINI_CLI_USAGE.md for more examples.
Verifying Installation
After installation, verify the MCP server is connected:
Then in the chat:
You should see:
If you see 🔴 kccServer - Disconnected, see Troubleshooting below.
Usage with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Available Tools
Resource Detection (3 tools)
kcc_find_resource
Locate files for a KCC resource (types, controller, mapper, test fixtures).
Parameters:
resource(string): Resource name (e.g., "EdgeCacheService")
kcc_detect_controller_type
Detect if a resource uses direct controller or Terraform-based controller.
Parameters:
resource(string): Resource name
Returns:
kcc_migration_status
Get migration status for a resource (shows which phases are complete).
Parameters:
resource(string): Resource name
Returns:
Migration Tools (5 tools)
kcc_plan_migration
Create a detailed 7-phase migration plan for migrating a Terraform-based resource to direct controller.
Parameters:
resource(string): Resource name
kcc_scaffold_types
Generate API types file (Phase 2 of migration).
Parameters:
resource,service,version,proto_package,proto_message,description(optional)
kcc_scaffold_identity
Generate identity handler file (Phase 3 of migration).
Parameters:
resource,service,version,resource_name_format
kcc_scaffold_controller
Generate controller file (Phase 5 of migration).
Parameters:
resource,service,version,proto_package,proto_message
kcc_scaffold_mockgcp
Generate MockGCP server file (Phase 6 of migration).
Parameters:
resource,service,proto_package,proto_message,resource_name_format
Field Addition (2 tools)
kcc_add_field
Add a field to an existing direct controller with proper proto annotations.
Parameters:
kcc_generate_mapper
Regenerate KRM ↔ Proto mapper after adding fields.
Parameters:
resource(string): Resource name
Git Operations (2 tools)
kcc_git_commit
Create git commit with enforced rules: blocks AI attribution, uses your git identity, validates message format.
Parameters:
Validation:
✅ Blocks AI attribution (Claude, Anthropic, Gemini, OpenAI, etc.)
✅ Validates conventional commit format (feat:, fix:, chore:, etc.)
✅ Uses your configured git identity
kcc_git_status
Get current git status.
No parameters required.
Example Workflows
Example 1: Add Field to Existing Direct Controller
Scenario: Add routeMethods field to EdgeCacheService
Example 2: Migrate Terraform Resource to Direct Controller
Scenario: Migrate ComputeURLMap from Terraform to direct controller
Testing
Test Results:
Troubleshooting
kccServer shows as Disconnected
If /mcp list shows 🔴 kccServer - Disconnected:
1. Check config file exists:
If missing, run the setup script:
2. Verify SDK version (must be 1.11.0+):
Should show: "@modelcontextprotocol/sdk": "^1.11.0"
If it shows 0.5.0 or older, update the extension:
3. Test server manually:
Should show:
4. Check repository path is valid:
Make sure the kcc_repo_path in your config points to a valid k8s-config-connector directory.
Updating the Extension
To get the latest version:
Option 1: Reinstall
Option 2: Manual update
Then restart Gemini CLI.
Config File Not Found
If you see errors about config not found, create the config file:
Replace the paths and details with your actual information.
Migration Phases
The migration process consists of 7 phases:
Proto Definitions - Verify proto files exist
API Types (KRM) - Define Kubernetes resource types
Identity Handler - Implement resource name parsing
Mapper Generation - Generate KRM ↔ Proto conversions
Controller Implementation - Implement CRUD operations
MockGCP Implementation - Create mock GCP server for testing
Test Fixtures - Create YAML test fixtures
Each phase builds on the previous phase. Use kcc_migration_status to track progress.
Critical Rules
⚠️ AI Attribution is BLOCKED
This server ENFORCES that only human contributors are credited in git commits. It will REJECT any commit message containing:
AI assistant names (Claude, Gemini, GPT, etc.)
AI company names (Anthropic, OpenAI, etc.)
Co-Authored-By lines with AI emails
Phrases like "Generated with", "AI-generated", etc.
This is a NON-NEGOTIABLE requirement for k8s-config-connector contributions.
Conventional Commits
Commit messages must follow the conventional commits format:
Types: feat, fix, docs, chore, refactor, test
Example:
Architecture
Configuration Priority
Configuration is loaded in this order (first found wins):
Environment variables (highest priority)
KCC_REPO_PATH,KCC_AUTHOR_NAME,KCC_AUTHOR_EMAIL
Config file (
~/.config/kcc-mcp-server/config.json)Git config (lowest priority, used as fallback for author name/email only)
Resources
License
Apache License 2.0 (following k8s-config-connector)
Authors
Frank Currie (fcurrie@google.com)