mcp server
react-codebase-guru
π― Intelligent React codebase consultant that detects design system drift and guides AI coding agents via CLI and MCP
Set up
Runs on your computer. Pick your agent and operating system.
Before you start
- Node.js 20 or newer
{
"mcpServers": {
"react-codebase-guru": {
"command": "npx",
"args": [
"-y",
"react-codebase-guru"
]
}
}
}same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12
Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs
README
synced Oct 24, 2026React Codebase Guru
Real-time design system drift detection and codebase consultation for React projects.
Overview
React Codebase Guru is a CLI tool and MCP server that detects and prevents design system drift in React projects. It acts as a real-time drift detector and codebase consultant, learning your project's UI patterns and catching inconsistencies before they accumulate.
Problem Statement
Design System Drift: Codebases gradually drift away from established patterns as:
- Developers forget existing components and create custom variations
- AI coding agents generate inconsistent implementations
- New team members don't know established conventions
- Design system updates aren't consistently applied
Features
- π Pattern Detection: Automatically learns your project's design patterns
- π¨ Real-time Monitoring: Catches drift as you code with file watching
- π€ AI Agent Integration: MCP server for proactive design consultation
- π Compliance Scoring: Track design system adherence over time
- π¨ Multi-Framework Support: React, TypeScript, CSS, Tailwind, and more
- π Historical Analytics: Track drift trends and improvements
Installation
npm install -g react-codebase-guru
Quick Start
# Navigate to your React project
cd my-react-project
# Initialize React Codebase Guru
guru init
# Run a drift analysis
guru scan
# Start real-time monitoring
guru watch
# Generate a detailed report
guru report
Core Commands
guru init- Initialize project monitoring and learn patternsguru scan- Manual drift analysis of your projectguru watch- Real-time drift detection during developmentguru report- Generate detailed drift reportguru plan <intent>- Generate drift-aware feature plan
Configuration
Create a guru.config.js file in your project root:
module.exports = {
include: ['src/**/*.{js,jsx,ts,tsx}'],
exclude: ['node_modules', 'dist', 'build'],
framework: {
type: 'react',
typescript: true,
cssFramework: 'tailwind'
},
patterns: {
spacingGrid: 8,
componentNaming: 'PascalCase'
},
thresholds: {
compliance: 90,
maxViolations: 5
}
};
MCP Integration
React Codebase Guru includes an MCP server for AI agent integration:
# Start MCP server
guru mcp
# The server provides consultation functions for AI agents:
# - consult_before_change()
# - validate_proposed_code()
# - get_component_recommendations()
# - check_style_compliance()
Development
# Clone the repository
git clone https://github.com/lylecodes/react-codebase-guru.git
cd react-codebase-guru
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Development mode
npm run dev
Testing
# Run unit tests
npm test
# Run with coverage
npm run test:coverage
# Run integration tests
npm run test:integration
# Watch mode for development
npm run test:watch
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE file for details.
Support
- π Documentation
- π Issue Tracker
- π¬ Discussions
Roadmap
- Multi-framework support (Vue, Angular, Svelte)
- Visual diff reports
- Design tool integration (Figma, Sketch)
- AI-powered suggestions for pattern improvements
- Browser extension for real-time web app analysis
Built with β€οΈ to prevent design system drift and improve code consistency.