mat-drupal-mcp
v1.2.9
Published
MatDrupal MCP - AI Assistant for Drupal Projects with bilingual FR/EN support
Maintainers
Readme
🚀 MatDrupal MCP - AI Assistant for Drupal Projects
An intelligent Model Context Protocol (MCP) server for advanced Drupal project analysis with bilingual French/English support.
Created by Mathieu Boisvert to enhance GitHub Copilot with specialized Drupal development intelligence.
⚡ One-Click Installation
🚀 Installation
Option 1: Installation complète (recommandée)
# Installation + configuration automatique GitHub Copilot
curl -sL https://raw.githubusercontent.com/boisvertmath/mat-drupal-mcp/main/scripts/install.sh | bashOption 2: Package NPM (développeurs)
# Installation du binaire seulement
npm install -g mat-drupal-mcp
# Vérification
matdrupal --version
# Configuration GitHub Copilot manuelle requise
# Voir docs/npm-publication.md pour les détailsOption 3: Installation manuelle
For development or custom setup:
git clone https://github.com/boisvertmath/mat-drupal-mcp.git ~/.matdrupal
cd ~/.matdrupal
npm install && npm run buildConfigure Existing Drupal Projects
Optional: Configure Drupal file associations for better syntax highlighting:
# Auto-configure Drupal project (file associations only)
~/.matdrupal/setup-project.sh /path/to/your/drupal/project
# Or configure current directory
cd /path/to/your/drupal/project
~/.matdrupal/setup-project.shNote: @matdrupal is now configured globally and works in all projects automatically!
� Usage Examples
Once installed, use these commands in GitHub Copilot Chat:
🔍 Project Analysis
@matdrupal Analyze this Drupal project completely
@matdrupal Analyser ce projet Drupal en détailWhat you'll get:
- Drupal version detection
- Docroot structure analysis
- Custom modules inventory
- Technical debt assessment
📦 Module Exploration
@matdrupal Explore the custom module "my_module"
@matdrupal Explorer le module custom "mon_module"What you'll get:
- Module dependencies mapping
- Hook implementations analysis
- Business logic overview
- Security considerations
🔧 Technical Debt Assessment
@matdrupal Assess technical debt and generate D11 migration roadmap
@matdrupal Évaluer la dette technique et créer un plan de migration D11What you'll get:
- D11 compatibility analysis
- Migration complexity score
- Step-by-step upgrade plan
- Risk assessment
🐳 Lando Environment
@matdrupal Start Lando environment
@matdrupal Analyser l'environnement Lando actuelWhat you'll get:
- Environment status check
- Container management
- Performance optimization tips
🔄 Updates & Maintenance
Quick Update (Recommended)
# Simple one-line update
~/.matdrupal/update.shClean Reinstall
# Reinstall latest version (keeps your configuration)
curl -sL https://raw.githubusercontent.com/boisvertmath/mat-drupal-mcp/main/scripts/install.sh | bashCheck Version
# See current version
node ~/.matdrupal/dist/index.js --versionUninstall (Complete Removal)
# Complete uninstallation with backup
curl -sL https://raw.githubusercontent.com/boisvertmath/mat-drupal-mcp/main/scripts/uninstall.sh | bash
# Or if installed locally
~/.matdrupal/scripts/uninstall.sh🔒 Safe uninstallation: Creates automatic backup before removal, preserves other MCP servers.
Update Process
- Automatic backup of existing configuration
- Download latest version from GitHub
- Preserve your custom settings
- Test installation integrity
- Restore if update fails
🔔 Update notifications: You'll be notified in GitHub Copilot when new versions are available.
� Real-World Examples
🎯 Common Workflows
New Team Member Onboarding:
@matdrupal I'm new to this project. Help me understand the Drupal architecture, custom modules, and current technical state.Pre-Migration Planning:
@matdrupal We need to migrate to Drupal 11. Analyze compatibility, create migration plan, and identify risks.Code Review Assistance:
@matdrupal Review this custom module for best practices and suggest improvements for D11 compatibility.Development Environment Setup:
@matdrupal Start the Lando environment and check if everything is properly configured.💼 Business Use Cases
| Scenario | Command | Expected Output |
|----------|---------|-----------------|
| Project Audit | @matdrupal Complete project analysis | Version, modules, technical debt score |
| Module Documentation | @matdrupal Document the "user_management" module | Purpose, dependencies, API overview |
| Performance Review | @matdrupal Identify performance optimization opportunities | Bottlenecks, recommendations |
| Security Check | @matdrupal Security analysis of custom modules | Vulnerabilities, best practices |
🛠️ Available Tools
| Tool | Description | Capabilities |
|------|-------------|--------------|
| analyze_project_overview | Complete project analysis | Docroot detection, Drupal version, module inventory |
| explore_custom_module | Detailed module inspection | Dependencies, hooks, business logic mapping |
| assess_technical_debt | D11 migration planning | Compatibility analysis, upgrade complexity assessment |
| manage_lando_environment | Lando container management | Start/stop/analyze local development environments |
| acquia_intelligence_helper | Acquia CLI integration | Cloud deployment compatibility checks |
📋 Prerequisites
- macOS
- Node.js 18+
- GitHub Copilot subscription
- VS Code or PhpStorm with GitHub Copilot extension
📚 Documentation
- Installation Guide - Detailed setup instructions
- Usage Examples - Comprehensive command examples
- Troubleshooting - Common issues and solutions
- Quick Start - Get up and running in 5 minutes
🏗️ Architecture
MatDrupal MCP leverages the Model Context Protocol to provide:
- Intelligent Context Awareness - Understands Drupal project structures
- Bilingual Processing - Adapts responses based on user language preference
- Environment Integration - Works seamlessly with Lando and Acquia workflows
- Extensible Design - Easy to add new analysis tools and capabilities
🔧 Development
# Clone the repository
git clone https://github.com/boisvertmath/mat-drupal-mcp.git
cd mat-drupal-mcp
# Install dependencies
npm install
# Build and test
npm run build
npm test
# Run full test suite
./test-mcp.sh🤝 Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
📄 License
MIT License - see LICENSE file for details.
👨💻 Author
Mathieu Boisvert
- GitHub: @boisvertmath
- Created for enhanced Drupal development workflows
Transform your Drupal development experience with AI-powered project intelligence.
