This file provides essential context for AI assistants working on the MCPEG project.
MCPEG (Model Context Protocol Enablement Gateway) is a lightweight service that provides a Model Context Protocol (MCP) API on one side and integrates with external services via API calls or binary invocations on the other side.
This project follows the XVC (Extreme Vibe Coding) principles for human-LLM collaboration:
- Single Source of Truth: Every piece of information exists in exactly one place
- No Redundancy: Eliminate duplication across all systems
- Surgical Precision: Every change is intentional and well-documented
- Bar-Raising Solutions: Only implement patterns that improve the overall system
- Forward Progress Only: No regression, always building on solid foundations
- Always Solve Never Mask: Address root causes, not symptoms
- Unified Binary: Single
mcpegbinary with subcommands (gateway,codegen,validate) - API-First: All functionality derives from OpenAPI specifications
- Single Source of Truth Build: All build logic centralized in
scripts/build.sh - Module Path:
github.com/osakka/mcpeg
- Build System: Always use
scripts/build.shor delegate via Makefile - CLI Interface: Use
mcpeg <subcommand>pattern consistently - Logging: LLM-optimized structured logging for complete debuggability
- Error Handling: Comprehensive error context for troubleshooting
- Documentation: All decisions documented in ADRs
When completing any significant task, execute this checklist when the user mentions 'wrapup':
- Run linting and formatting tools
- Verify all imports use correct module path (
github.com/osakka/mcpeg) - Ensure unified binary usage throughout codebase
- Check for any remaining separate binary references
- Create or update relevant ADR if architectural decisions were made
- Update CHANGELOG.md with changes (Added/Changed/Fixed sections)
- Verify README.md reflects current functionality
- Update project structure documentation if needed
- Check all documentation for module path consistency
- Build and test the unified binary functionality
- Verify all subcommands work correctly
- Run any existing tests
- Validate OpenAPI specifications if modified
- Stage all relevant changes
- Create descriptive commit message following project patterns
- Include "🤖 Generated with Claude Code" footer
- Add "Co-Authored-By: Claude" line
- Push to remote repository (if requested)
- Summarize what was accomplished
- Note any breaking changes or migration requirements
- Highlight any remaining work or follow-up tasks
feat: implement [feature description]
[Detailed explanation of changes]
Changes:
- Bullet point list of specific changes
- Focus on the "what" and "why"
Benefits:
- List of benefits or improvements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- cmd/: Application entry points only
- internal/: Private application code
- pkg/: Public reusable packages
- api/: OpenAPI specifications
- docs/: All documentation with clear categorization
- scripts/: Build and utility scripts
- build/: Build artifacts (gitignored)
- Always read existing code to understand patterns
- Use existing utilities and frameworks
- Follow single source of truth principle
- Document architectural decisions in ADRs
- Update CHANGELOG.md for all changes
- Maintain unified binary architecture
# Standard commands
./scripts/build.sh build # Build unified binary
./scripts/build.sh dev # Start development server
./scripts/build.sh test # Run tests
./scripts/build.sh validate # Validate OpenAPI specs
# Via Makefile (delegates to build script)
make build
make dev
make test
make validate- ✅ Unified binary architecture implemented
- ✅ Single source of truth build system
- ✅ Service registry and routing
- ✅ OpenAPI-based code generation
- ✅ MCP Plugin Integration (Phases 1-4)
- ✅ Phase 1: Plugin access control and routing consistency
- ✅ Phase 2: Plugin discovery with capability analysis
- ✅ Capability Analysis Engine with semantic categorization
- ✅ Plugin Discovery Engine with dependency resolution
- ✅ Capability Aggregation Engine with conflict resolution
- ✅ Capability Validation Engine with automated remediation
- ✅ Phase 3: Inter-plugin communication with message passing and event bus
- ✅ Phase 4: Hot plugin reloading with versioning and operation tracking
- ✅ MCP endpoints for plugin management and inter-plugin communication
- ✅ Plugin ecosystem with reloading operations
- ✅ MCP Testing Infrastructure: Test client, integration tests, and MCP Inspector configuration
- ✅ Concurrency Implementation: Thread-safe capability analysis with mutex synchronization
- ✅ Documentation Improvements: Comprehensive package-level documentation with LLM-optimized structure
- ✅ MIT License: Open source licensing for community development
- ✅ Truth in Documentation: Removed false production-ready claims, added experimental disclaimer
- ✅ Complete MCP Resources/Read Implementation: Full protocol compliance with plugin resource access via URI
- ✅ Comprehensive ADR Timeline: Complete architectural decision records from project inception (ADR-001 to ADR-027)
- ✅ Single Source of Truth Validation: Eliminated duplicate data files and enforced path standardization
- Never create separate binaries - always use unified
mcpegbinary - Always check module paths - use
github.com/osakka/mcpeg - Build system is source of truth - modify
scripts/build.shnot Makefile - Document decisions - create ADRs for architectural changes
- LLM-optimized logging - every log entry should provide complete context
- We don't use - we always use -- for long flags
- Project Characteristics:
- This is an MCP server
This context file should be consulted before making any significant changes to ensure consistency with project principles and patterns.