Labsco
aywengo logo

Kafka Schema Registry

โ˜… 31

from aywengo

A comprehensive Message Control Protocol (MCP) server for Kafka Schema Registry.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Trust Score

Kafka Schema Registry MCP Server

A comprehensive Model Context Protocol (MCP) server that provides Claude Desktop and other MCP clients with tools for Kafka Schema Registry operations. Features advanced schema context support, multi-registry management, and comprehensive schema export capabilities.

Kafka Schema Registry MCP Logo

๐ŸŽฏ True MCP Implementation: Uses modern FastMCP 2.8.0+ framework with full MCP 2025-06-18 specification compliance. Fully compatible with Claude Desktop and other MCP clients using JSON-RPC over stdio.

Latest Version: v2.1.5 | Docker: aywengo/kafka-schema-reg-mcp:stable

๐Ÿ“‹ Table of Contents

โœจ Key Features

  • ๐Ÿค– Claude Desktop Integration - Direct MCP integration with natural language interface
  • ๐Ÿข Multi-Registry Support - Manage up to 8 Schema Registry instances simultaneously
  • ๐Ÿ“‹ Schema Contexts - Logical grouping for production/staging environment isolation
  • ๐Ÿ”„ Schema Migration - Cross-registry migration with backup and verification
  • ๐Ÿ“Š Comprehensive Export - JSON, Avro IDL formats for backup and documentation
  • ๐Ÿ”’ Production Safety - VIEWONLY mode and per-registry access control
  • ๐Ÿ” OAuth 2.1 Authentication - Enterprise-grade security with scope-based permissions
  • ๐Ÿ“ˆ Real-time Progress - Async operations with progress tracking and cancellation
  • ๐Ÿ”— Resource Linking - HATEOAS navigation with enhanced tool responses
  • ๐Ÿงช Full MCP Compliance - 50+ tools following MCP 2025-06-18 specification
  • ๐Ÿš€ SLIM_MODE - Reduce tool overhead from 50+ to ~9 essential tools for better LLM performance

๐Ÿ“– See detailed feature descriptions: docs/api-reference.md

๐Ÿ› ๏ธ Claude Code Skills

This project includes 5 specialized Claude Code skills โ€“ 4 for automated schema development workflows plus 1 for schema context comparison (/context-compare, documented below):

Available Skills

  • /schema-generate - Generate production-ready Avro schemas from natural language

    /schema-generate event UserRegistered "user registration with userId, email, timestamp"
  • /schema-evolve - Safely evolve schemas with automatic compatibility checking

    /schema-evolve user-profile "add optional phoneNumber field"
  • /migration-plan - Create detailed migration plans between environments

    /migration-plan development staging
  • /lint-and-test - Automated quality assurance workflows

    /lint-and-test quick        # Before commit (2-3s)
    /lint-and-test fix          # Auto-fix issues (20-30s)
    /lint-and-test pre-push     # Before push (10-15s)

Getting Started with Skills

Quick Start: Read .claude-code/SKILLS_GUIDE.md - 5-minute tutorial

Complete Reference: .claude-code/skills/README.md - Full documentation

Setup Summary: .claude-code/skills/README.md - Configuration details

Skills Features

  • โœ… Natural language schema generation with templates
  • โœ… Automatic compatibility checking (BACKWARD, FORWARD, FULL)
  • โœ… Migration planning with rollback procedures
  • โœ… Pre-commit and pre-push quality automation
  • โœ… Integration with Black, Ruff, isort, Flake8
  • โœ… Docker-based test execution
  • โœ… Comprehensive error handling and auto-fix

Try it now: /schema-generate event TestEvent "test with id and timestamp"

๐Ÿ“Š MCP Tools and Resources

This section provides a comprehensive analysis of all MCP tools and resources exposed by the Kafka Schema Registry MCP Server.

Backward Compatibility Wrapper Tools

These tools are maintained for backward compatibility with existing clients. They internally use efficient implementations but are exposed as tools to prevent "Tool not listed" errors. Consider migrating to the corresponding resources for better performance.

Tool NameSLIM_MODEScopeRecommended ResourceDescription
list_registriesโœ…readregistry://namesList all configured registries
get_registry_infoโœ…readregistry://info/{name}Get registry information
test_registry_connectionโœ…readregistry://status/{name}Test registry connection
test_all_registriesโœ…readregistry://statusTest all registry connections
list_subjectsโœ…readregistry://{name}/subjectsList all subjects
get_schemaโœ…readschema://{name}/{context}/{subject}Get schema content
get_schema_versionsโœ…readschema://{name}/{context}/{subject}/versionsGet schema versions
get_global_configโœ…readregistry://{name}/configGet global configuration
get_modeโœ…readregistry://modeGet registry mode
list_contextsโœ…readregistry://{name}/contextsList all contexts
get_subject_configโœ…readsubject://{name}/{context}/{subject}/configGet subject configuration
get_subject_modeโœ…readsubject://{name}/{context}/{subject}/modeGet subject mode

Core MCP Tools

CategoryNameTypeSLIM_MODEScopeDescription
CorepingToolโœ…readMCP ping/pong health check
Registry Managementset_default_registryToolโœ…adminSet default registry
Registry Managementget_default_registryToolโœ…readGet current default registry
Schema Operationsregister_schemaToolโœ…writeRegister new schema version
Schema Operationscheck_compatibilityToolโœ…readCheck schema compatibility
Context Managementcreate_contextToolโœ…writeCreate new context
Context Managementdelete_contextToolโŒadminDelete context
Subject Managementdelete_subjectToolโŒadminDelete subject and versions
Configurationupdate_global_configToolโŒadminUpdate global configuration
Configurationupdate_subject_configToolโŒadminUpdate subject configuration
Configurationadd_subject_aliasToolโŒwriteCreate alias subject pointing to an existing subject
Configurationdelete_subject_aliasToolโŒwriteRemove an alias subject
Mode Managementupdate_modeToolโŒadminUpdate registry mode
Mode Managementupdate_subject_modeToolโŒadminUpdate subject mode
Statisticscount_contextsToolโœ…readCount contexts
Statisticscount_schemasToolโœ…readCount schemas
Statisticscount_schema_versionsToolโœ…readCount schema versions
Statisticsget_registry_statisticsToolโŒreadGet comprehensive registry stats
Exportexport_schemaToolโœ…readExport single schema
Exportexport_subjectToolโœ…readExport all subject versions
Exportexport_contextToolโŒreadExport all context subjects
Exportexport_globalToolโŒreadExport all contexts/schemas
Exportexport_global_interactiveToolโŒreadInteractive global export
Migrationmigrate_schemaToolโŒadminMigrate schema between registries
Migrationmigrate_contextToolโŒadminMigrate context between registries
Migrationmigrate_context_interactiveToolโŒadminInteractive context migration
Comparisoncompare_registriesToolโŒreadCompare two registries
Comparisoncompare_contexts_across_registriesToolโŒreadCompare contexts across registries
Comparisonfind_missing_schemasToolโŒreadFind missing schemas
Batch Operationsclear_context_batchToolโŒadminClear context with batch operations
Batch Operationsclear_multiple_contexts_batchToolโŒadminClear multiple contexts
Interactiveregister_schema_interactiveToolโŒwriteInteractive schema registration
Interactivecheck_compatibility_interactiveToolโŒreadInteractive compatibility check
Interactivecreate_context_interactiveToolโŒwriteInteractive context creation
Resource Discoverylist_available_resourcesToolโœ…readList all available resources
Resource Discoverysuggest_resource_for_toolToolโœ…readGet resource migration suggestions
Resource Discoverygenerate_resource_templatesToolโœ…readGenerate resource URI templates
Elicitationsubmit_elicitation_responseToolโŒwriteSubmit elicitation response
Elicitationlist_elicitation_requestsToolโŒreadList elicitation requests
Elicitationget_elicitation_requestToolโŒreadGet elicitation request details
Elicitationcancel_elicitation_requestToolโŒadminCancel elicitation request
Elicitationget_elicitation_statusToolโŒreadGet elicitation system status
Workflowslist_available_workflowsToolโŒreadList available workflows
Workflowsget_workflow_statusToolโŒreadGet workflow status
Workflowsguided_schema_migrationToolโŒadminStart schema migration wizard
Workflowsguided_context_reorganizationToolโŒadminStart context reorganization wizard
Workflowsguided_disaster_recoveryToolโŒadminStart disaster recovery wizard
Utilityget_mcp_compliance_status_toolToolโŒreadGet MCP compliance status
Utilityget_oauth_scopes_info_toolToolโŒreadGet OAuth scopes information
Utilitytest_oauth_discovery_endpointsToolโŒreadTest OAuth discovery endpoints
Utilityget_operation_info_toolToolโŒreadGet operation metadata
Utilitycheck_viewonly_modeToolโŒreadCheck if registry is in viewonly mode
RESOURCESregistry://statusResourceโœ…readOverall registry connection status
RESOURCESregistry://infoResourceโœ…readDetailed server configuration
RESOURCESregistry://modeResourceโœ…readRegistry mode detection
RESOURCESregistry://namesResourceโœ…readList of configured registry names
RESOURCESregistry://status/{name}Resourceโœ…readSpecific registry connection status
RESOURCESregistry://info/{name}Resourceโœ…readSpecific registry configuration
RESOURCESregistry://mode/{name}Resourceโœ…readSpecific registry mode
RESOURCESregistry://{name}/subjectsResourceโœ…readList subjects for registry
RESOURCESregistry://{name}/contextsResourceโœ…readList contexts for registry
RESOURCESregistry://{name}/configResourceโœ…readGlobal config for registry
RESOURCESschema://{name}/{context}/{subject}Resourceโœ…readSchema content with context
RESOURCESschema://{name}/{subject}Resourceโœ…readSchema content default context
RESOURCESschema://{name}/{context}/{subject}/versionsResourceโœ…readSchema versions with context
RESOURCESschema://{name}/{subject}/versionsResourceโœ…readSchema versions default context
RESOURCESsubject://{name}/{context}/{subject}/configResourceโœ…readSubject config with context
RESOURCESsubject://{name}/{subject}/configResourceโœ…readSubject config default context
RESOURCESsubject://{name}/{context}/{subject}/modeResourceโœ…readSubject mode with context
RESOURCESsubject://{name}/{subject}/modeResourceโœ…readSubject mode default context
RESOURCESelicitation://response/{request_id}ResourceโŒwriteElicitation response handling

๐Ÿ”’ Authentication & Security

OAuth 2.1 Support (Optional)

# Enable authentication
export ENABLE_AUTH=true
export AUTH_ISSUER_URL="https://your-oauth-provider.com"
export AUTH_AUDIENCE="your-client-id"

Supported Providers: Azure AD, Google OAuth, Keycloak, Okta, GitHub

Permission Scopes:

  • read - View schemas, configurations
  • write - Register schemas, update configs (includes read)
  • admin - Delete subjects, full control (includes write + read)

Production Safety Features

  • VIEWONLY Mode - Prevent accidental changes in production
  • URL Validation - SSRF protection with configurable localhost access
  • Scope-based Authorization - Fine-grained tool-level permissions
  • Per-Registry Controls - Independent safety settings

๐Ÿ“– Security guide: docs/deployment.md#security

๐Ÿ“š Documentation

GuideDescription
API ReferenceComplete tool documentation with examples
Subject AliasingHow to add and remove subject aliases
Use CasesReal-world scenarios and implementation patterns
Deployment GuideDocker, Kubernetes, cloud platforms, CI/CD
IDE IntegrationVS Code, Claude Code, Cursor setup
Configuration ExamplesReady-to-use Claude Desktop configs
Testing GuideComprehensive testing setup
ChangelogVersion history and migration notes
v2.0.0 HighlightsMajor version features

Additional Resources

  • Examples - Usage examples and code samples
  • Scripts - Utility scripts and automation
  • Helm Charts - Kubernetes deployment
  • Tests - Test suites and validation

๐Ÿงช Testing

Quick Test

cd tests/
./run_all_tests.sh --quick    # Essential tests
./run_all_tests.sh           # Complete test suite

Docker Testing

python tests/test_docker_mcp.py

MCP Inspector Tests (UI-driven)

# From repository root
cd inspector-tests

# Single registry (DEV)
./run-inspector-tests.sh stable

# Multi-registry (DEV + PROD)
./run-inspector-tests.sh multi

# Test a specific Docker tag
DOCKER_VERSION=latest ./run-inspector-tests.sh stable

๐Ÿ“– Testing guide: TESTING_SETUP_GUIDE.md

๐Ÿค Contributing

We welcome contributions! Please see:

Quick Development Setup

git clone https://github.com/aywengo/kafka-schema-reg-mcp
cd kafka-schema-reg-mcp
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python kafka_schema_registry_unified_mcp.py

๐Ÿ†• What's New

v2.1.x (Latest)

  • ๐Ÿงญ Subject Aliasing - New tools add_subject_alias and delete_subject_alias
  • ๐Ÿ› ๏ธ Fixes - Evolution assistant and import interactive fixes
  • ๐Ÿ“ฆ Enhancements - Continued MCP tool refinements and testing improvements
  • ๐Ÿ—‘๏ธ Removed Deprecated Tools - Custom task management tools removed in favor of FastMCP's built-in Docket system

v2.0.x

  • ๐Ÿ”’ Security Fixes - Resolved credential exposure in logging
  • ๐Ÿค– Interactive Schema Migration - Smart migration with user preference elicitation
  • ๐Ÿ’พ Automatic Backups - Pre-migration backup creation
  • โœ… Post-Migration Verification - Comprehensive schema validation
  • ๐Ÿš€ FastMCP 2.8.0+ Framework - Complete architecture upgrade
  • ๐Ÿ“Š MCP 2025-06-18 Compliance - Latest protocol specification
  • ๐Ÿ” OAuth 2.1 Generic Discovery - Universal provider compatibility
  • ๐Ÿ”— Resource Linking - HATEOAS navigation in tool responses

๐Ÿ“– Full changelog: CHANGELOG.md | ๐Ÿ“– v2.0.0 features: README-v2.0.0-HIGHLIGHTS.md


๐Ÿณ Glama.ai:


๐Ÿณ Docker Hub: aywengo/kafka-schema-reg-mcp | ๐Ÿ“Š Stats: 50+ MCP Tools (12 backward compatibility), 19 Resources, 8 Registries, OAuth 2.1, Multi-platform

License: MIT | Maintainer: @aywengo | Issues: GitHub Issues