Matrix Pattern MCP Server
Advanced pattern management and synchronization MCP server for Claude applications. The Matrix Pattern System provides a structured approach to organizing and coordinating complex development patterns across multiple dimensions.
๐ Quick Start
Clone and setup:
git clone <repository-url> cd matrix-mcp-server ./setup.shInstall dependencies:
npm installStart the server:
npm startAdd to Claude configuration:
# Copy the provided configuration cp claude_mcp_config.json ~/.claude/mcp_servers.json
๐ Matrix Pattern System Overview
The Matrix Pattern System organizes development patterns in a two-dimensional structure:
Horizontal (Rows): Different pattern types (requirements, architecture, implementation, etc.)
Vertical (Columns): Feature domains (authentication, data-processing, ui-components, etc.)
Key Concepts
Forward-Only Constraint: Cells can only be created once, ensuring pattern integrity
Horizontal Synchronization: Share patterns across feature domains
Vertical Synchronization: Cascade updates through development phases
Metadata Tracking: Comprehensive lifecycle and relationship tracking
๐ ๏ธ Available Tools (7 Total)
1. matrix_create_cell - Create Pattern Cells
Create new cells in the matrix pattern system.
2. matrix_read_cell - Read Pattern Cells
Retrieve cell content and metadata.
3. matrix_sync_horizontal - Horizontal Pattern Sync
Synchronize patterns across feature domains within the same development phase.
4. matrix_sync_vertical - Vertical Pattern Sync
Cascade patterns from one development phase to another.
5. matrix_list_verticals - List Column Cells
Show all cells in a vertical column (feature domain).
6. matrix_list_horizontals - List Row Cells
Show all cells in a horizontal row (development phase).
7. matrix_read_horizontal_instructions - Get Sync Instructions
Retrieve synchronization instructions and metadata for horizontal patterns.
๐ Project Structure
โ๏ธ Configuration
Claude MCP Configuration
The claude_mcp_config.json file contains the complete MCP server configuration for Claude integration.
System Configuration
The Matrix Pattern system is configured via .matrix_pattern/config.json:
๐ฏ Usage Examples
Complete Development Flow
Content Validation
๐งช Available Scripts
npm start- Start the MCP servernpm run dev- Start with file watchingnpm test- Run comprehensive test suitenpm run build- Build and validate projectnpm run setup- Run setup scriptnpm run init-matrix- Initialize pattern managementnpm run validate- Validate pattern integritynpm run lint- Code lintingnpm run format- Code formatting
๐๏ธ Core Features
1. Advanced Pattern Management
Cell-based Storage: Each pattern stored as individual JSON cell
Metadata Tracking: Comprehensive lifecycle and relationship tracking
Version Control: Pattern version management and history
Schema Validation: Content structure validation with CellValidator
2. Multi-Dimensional Synchronization
Horizontal Sync: Share patterns across feature domains
Vertical Sync: Cascade patterns through development phases
Selective Sync: Choose specific columns/cells to synchronize
Conflict Detection: Intelligent conflict resolution mechanisms
3. Content Validation System
Format Validation: Markdown structure and formatting checks
Section Requirements: Validate required sections per horizontal type
Quality Assessment: Content quality scoring (0-100)
Custom Validators: Extensible validation system
4. Intelligent Reporting
Sync Reports: Detailed synchronization operation reports
Quality Metrics: Content quality and completeness tracking
Relationship Mapping: Track dependencies and relationships
Audit Trail: Complete operation history
๐ง Installation & Setup
Prerequisites
Node.js >= 18.0.0
npm package manager
Claude CLI (for MCP integration)
Step-by-Step Installation
Clone repository:
git clone <repository-url> cd matrix-mcp-serverRun setup script:
chmod +x setup.sh ./setup.shInstall dependencies:
npm installValidate installation:
npm test npm run validateConfigure Claude MCP:
# Copy configuration to Claude cp claude_mcp_config.json ~/.claude/mcp_servers.json # Or merge with existing configuration cat claude_mcp_config.json >> ~/.claude/mcp_servers.jsonStart the server:
npm start
๐จ Troubleshooting Guide
Common Issues
1. Server Connection Failed
Symptoms: Server not responding, connection timeout Solutions:
Check Node.js version:
node --version(must be >= 18.0.0)Verify server is running:
npm startCheck working directory path in claude_mcp_config.json
Ensure dependencies installed:
npm install
2. Cell Creation Validation Errors
Symptoms: Cell creation fails, validation error messages Solutions:
Verify cell data format matches schema
Ensure cellId has both row and column properties
Check content is non-empty string
Use CellValidator to validate content before creation
3. Synchronization Issues
Symptoms: Sync operations fail, forward-only constraint errors Solutions:
Verify source cells exist before syncing
Check target cells don't exist (forward-only constraint)
Review sync reports in
.matrix_pattern/metadata/sync-reports/Ensure proper file permissions on
.matrix_pattern/directory
4. File Permission Errors
Symptoms: Cannot read/write matrix files Solutions:
Check directory permissions:
ls -la .matrix_pattern/Fix permissions:
chmod -R 755 .matrix_pattern/Re-run setup:
./setup.sh
Debugging Tools
Log Files
Server logs:
.matrix_pattern/logs/server.logSync reports:
.matrix_pattern/metadata/sync-reports/Error logs: Check console output during operations
Diagnostic Commands
๐ Advanced Usage
Custom Validation Rules
Batch Operations
Pattern Templates
Create reusable pattern templates for consistent cell structure:
๐ Performance Considerations
File System: Uses efficient JSON file storage with fs-extra
Caching: Implements intelligent caching for frequently accessed cells
Batch Operations: Supports batch validation and operations
Memory Management: Optimized for large pattern collections
Concurrent Access: Thread-safe operations with proper locking
๐ค Contributing
Fork the repository
Create feature branch:
git checkout -b feature/amazing-featureCommit changes:
git commit -m 'Add amazing feature'Push to branch:
git push origin feature/amazing-featureOpen pull request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
Documentation: Check this README and inline code comments
Issues: Create GitHub issues for bugs and feature requests
Community: Join discussions in the repository
Professional Support: Contact for enterprise support options
Matrix Pattern System - Organize, synchronize, and scale your development patterns with confidence.
This server cannot be installed
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityFacilitates AI session handoffs and next steps tracking through project-based organization, supporting task prioritization and seamless workflow management.Last updated -87
- AsecurityAlicenseAqualityFacilitates interactive software development planning by managing tasks, tracking progress, and creating detailed implementation plans through the Model Context Protocol.Last updated -617385MIT License
- -securityFlicense-qualityEnables bidirectional synchronization between IDEs and Figma for Design System management, allowing developers to generate React components and synchronize design tokens, icons, and components across platforms.Last updated -1
- Asecurity-licenseAqualityProvides structured spec-driven development workflow tools for AI-assisted software development with sequential spec creation (Requirements โ Design โ Tasks). Features a real-time web dashboard for monitoring project progress and managing development workflows.Last updated -144,5312,951GPL 3.0