A comprehensive setup integrating n8n workflow automation with Claude Code and Model Context Protocol (MCP) servers for intelligent project management, automated memory dumps, and AI-powered development workflows.
- π n8n Workflow Automation: Visual workflow builder for complex automations
- π€ Claude Code Integration: AI-powered coding assistant with MCP support
- πΎ Persistent Memory System: Project state and knowledge preservation
- π Automated Dumps: Daily summaries and shutdown backups
- π― Target Directory Management: Organized code generation across multiple directories
- π οΈ Development Tools: Scripts for automation, monitoring, and maintenance
- π§ Windows Compatible: Optimized for MINGW64/Git Bash environments
my-project-n8n/
βββ π README.md # This file
βββ π§ .env # Environment configuration
βββ βοΈ .mcp.json # MCP server configuration
βββ π¦ package.json # Project dependencies and scripts
βββ π« .gitignore # Git ignore rules
β
βββ π€ mcp-servers/ # Custom MCP servers
β βββ memory-dump-server.js # Memory management server
β βββ package.json # MCP server dependencies
β
βββ π automation/ # Automation scripts
β βββ auto-dump.sh # Memory dump automation
β βββ setup-cron.sh # Cron job setup (Linux/Mac)
β βββ check-dumps.sh # System status checker
β βββ windows-fix.sh # Windows compatibility fixes
β
βββ πΎ memory-dumps/ # Automated memory dumps
β βββ daily-summary-*.md # Daily project summaries
β βββ memory-dump-*.md # Full memory dumps
β βββ shutdown-backup-*.json # Emergency backups
β
βββ πΏ backups/ # Compressed backups
β βββ *.json.gz # Timestamped backup files
β
βββ π logs/ # System logs
β βββ project.log # Main project log
β βββ dump.log # Dump operation log
β βββ cron.log # Cron job logs
β
βββ ποΈ workflows/ # n8n workflow exports
β βββ *.json # Exported n8n workflows
β
βββ π― [Target Directories]/ # Code generation targets
βββ frontend/ # Frontend applications
βββ backend/ # Backend APIs
βββ shared/ # Shared libraries
βββ docs/ # Documentation
- Node.js 18.0.0 or higher
- npm 8.0.0 or higher
- Git
- Claude Pro/Team subscription (for Claude Code)
- Windows: Git Bash or WSL2 recommended
# Clone or download the project
git clone <your-repo-url>
cd my-project-n8n
# Install dependencies
npm install
# Run setup scripts
./automation/windows-fix.sh # Windows users
./setup-targets.sh # Set target directories
# Edit .env file with your settings
cp .env.example .env
nano .env
# Key settings to update:
# - N8N_API_KEY=your_api_key_here
# - N8N_BASIC_AUTH_PASSWORD=your_password
# - TARGET_PROJECT_DIR=/c/Workspace/MyProject
# Start n8n
npm run start &
# Authenticate Claude Code (one-time setup)
claude auth
claude --dangerously-skip-permissions
# Start Claude Code with MCP
claude
# Check system status
npm run check:dumps
# Test MCP servers
claude "/mcp"
# Test code generation
claude "Create a simple README.md in the target directory"
# Project Configuration
PROJECT_NAME=My Awesome Project
PROJECT_VERSION=1.0.0
# n8n Configuration
N8N_HOST=http://localhost:5678
N8N_API_KEY=your_api_key_here
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=your_secure_password
# Code Generation Targets
TARGET_PROJECT_DIR=/c/Workspace/MyProject
FRONTEND_DIR=/c/Workspace/MyProject/frontend
BACKEND_DIR=/c/Workspace/MyProject/backend
SHARED_DIR=/c/Workspace/MyProject/shared
# Memory & Dumps
MEMORY_FILE=./project-memory.json
DUMP_DIR=./memory-dumps
BACKUP_DIR=./backups
AUTO_DUMP=true
# Automation
CRON_ENABLED=true
DAILY_DUMP_TIME=18:00
BACKUP_INTERVAL=4h
CLEANUP_DAYS=30
# Logging
LOG_LEVEL=info
LOG_FILE=./logs/project.log
{
"mcpServers": {
"memory-dump": {
"command": "node",
"args": ["./mcp-servers/memory-dump-server.js"],
"env": {
"MEMORY_FILE": "./project-memory.json",
"DUMP_DIR": "./memory-dumps",
"AUTO_DUMP": "true"
}
},
"filesystem-target": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "${TARGET_PROJECT_DIR}"],
"env": {}
},
"filesystem-current": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "./"],
"env": {}
}
}
}
# Add tasks and track progress
claude "Add todo: Implement user authentication, high priority, due tomorrow"
claude "Update project status to development with 75% progress"
claude "Record decision: Use PostgreSQL for database with rationale: better performance for complex queries"
# Get project insights
claude "Get project overview with details"
claude "What are my next recommended actions?"
claude "Show me all high priority pending tasks"
# Frontend development
claude "Create a React UserProfile component with TypeScript in the frontend directory"
claude "Generate a responsive dashboard layout in the frontend/src/pages directory"
# Backend development
claude "Create Express API routes for user CRUD operations in the backend directory"
claude "Generate Mongoose models for User and Product in the backend/models directory"
# Full-stack features
claude "Create a complete authentication system with React frontend, Express backend, and shared TypeScript types"
# Workflow documentation
claude "Show me available n8n nodes for HTTP requests"
claude "Create a workflow that triggers when a GitHub issue is created and sends a Slack notification"
# Workflow management
claude "List all n8n workflows and their status"
claude "Export the user-registration workflow to the workflows directory"
# Manual dumps
claude "Create memory dump with type full"
claude "Create daily summary with metrics and tomorrow's plan"
# Search and insights
claude "Search memory for 'authentication' across all types"
claude "What decisions have we made about the database?"
claude "Show me recent learnings from the past week"
# n8n Management
npm run start # Start n8n server
npm run start:docker # Start with Docker
npm run stop:docker # Stop Docker containers
# Claude Code
npm run claude # Start Claude Code
npm run test:mcp # Test MCP server connections
# Memory & Dumps
npm run dump:manual # Create manual memory dump
npm run dump:daily # Create daily summary
npm run dump:shutdown # Create shutdown dump
# System Management
npm run check:dumps # Check system status
npm run setup:cron # Setup automation (Linux/Mac)
npm run change-target # Change target directory
npm run test:targets # Test target directory access
# Logs
npm run logs:n8n # View n8n logs
npm run logs:project # View project logs
- Project Status Management: Track phases, progress, milestones
- Todo Management: Add, update, complete tasks with priorities
- Knowledge Base: Record decisions, learnings, and insights
- Auto-Dump System: Automatic memory preservation on events
- Search & Analytics: Find information across project history
- Multi-Directory Access: Target different project areas
- Organized Code Generation: Frontend, backend, shared code
- File Operations: Read, write, search, and manage files
- Project Structure: Maintain organized directory hierarchies
- 6:00 PM: Daily summary generation
- 11:30 PM: Full memory dump and backup
- Every 4 hours: Incremental backups (workdays)
- Weekly: Comprehensive project reports
- Task Completion: Auto-dump when tasks are marked complete
- Milestone Achievement: Comprehensive dumps for milestones
- Shutdown Detection: Emergency dumps on system shutdown
- Error Recovery: Backup creation on critical errors
- Log Rotation: Automatic log file management
- Backup Cleanup: Remove backups older than 30 days
- Memory Optimization: Compress old dumps and backups
- Health Monitoring: System status checks and alerts
# Morning: Check project status
npm run check:dumps
claude "Get project overview and next actions"
# Development: Use AI assistance
claude "Add todo: Implement password reset feature"
claude "Create React component for password reset form"
# Evening: Review and dump
claude "Update project status with today's progress"
npm run dump:daily
# Planning
claude "Add upcoming feature: Real-time notifications with medium priority"
claude "Break down the implementation steps for real-time notifications"
# Implementation
claude "Create WebSocket server in backend for real-time features"
claude "Generate React hooks for WebSocket connection in frontend"
# Completion
claude "Complete task with notes: Real-time notifications implemented successfully"
claude "Record learning: WebSocket implementation requires careful connection management"
# Documentation
claude "Create API documentation for the authentication endpoints"
claude "Generate team update report for the past sprint"
# Knowledge Sharing
claude "Record decision: Use Redis for session storage with rationale and alternatives"
claude "Export project report for stakeholder meeting"
# Check MCP status
claude "/mcp"
# Restart Claude Code
# Exit and restart in project directory
cd /path/to/project
claude
# Check if n8n is running
curl http://localhost:5678/rest/health
# Restart n8n
npm run start
# Fix script permissions
chmod +x automation/*.sh
chmod +x mcp-servers/*.js
# Fix directory permissions
chmod 755 memory-dumps backups logs
# Run Windows fix script
./automation/windows-fix.sh
# Convert paths manually
# C:\Workspace\Project -> /c/Workspace/Project
# System check
./automation/check-dumps.sh
# View logs
tail -f logs/project.log
tail -f logs/dump.log
# Test individual components
node mcp-servers/memory-dump-server.js
curl http://localhost:5678/rest/health
- n8n API: Access at
http://localhost:5678/rest/
- MCP Protocol: Model Context Protocol Docs
- Claude Code: Claude Code Documentation
.env
: Environment variables and settings.mcp.json
: MCP server configurationpackage.json
: Dependencies and scripts- Project Memory: Stored in
project-memory.json
- Memory Dumps: Markdown files in
memory-dumps/
- Backups: Compressed JSON in
backups/
- Logs: Operation logs in
logs/
- Workflows: n8n exports in
workflows/
- Create server in
mcp-servers/
directory - Add configuration to
.mcp.json
- Update documentation
- Test with Claude Code
- Add scripts to
automation/
directory - Update
package.json
scripts - Document usage in README
- Test on target platforms
- Extend memory dump server capabilities
- Add new tool functions
- Update auto-dump triggers
- Enhance search and analytics
This project is licensed under the MIT License - see the LICENSE file for details.
- Check Documentation: Review this README and inline comments
- Run Diagnostics: Use
npm run check:dumps
and debug scripts - Check Logs: Review logs in
logs/
directory - Community Resources:
When reporting issues, include:
- System information (OS, Node.js version)
- Error messages and logs
- Steps to reproduce
- Configuration files (without sensitive data)
Suggestions for improvements:
- New MCP server capabilities
- Additional automation features
- Better Windows compatibility
- Enhanced documentation
- Anthropic for Claude Code and MCP protocol
- n8n for the excellent workflow automation platform
- Community contributors for MCP servers and tools
- Open source libraries that make this integration possible
Happy Coding! π
Built with β€οΈ using n8n, Claude Code, and MCP