Package Information
Available Nodes
Documentation
š Claude Code for n8n
Bring the power of Claude Code directly into your n8n automation workflows!
Imagine having an AI coding assistant that can analyze your codebase, fix bugs, write new features, manage databases, interact with APIs, and automate your entire development workflow - all within n8n. That's exactly what this node enables.
š What Can You Build?
š§ Automated Code Reviews
Create workflows that automatically review pull requests, suggest improvements, and even fix issues before merging.
š Intelligent Bug Fixing
Connect error monitoring tools to Claude Code - automatically diagnose and fix production issues in real-time.
š Database Management
Let Claude Code write complex SQL queries, optimize database schemas, and generate migration scripts based on your requirements.
š¤ Self-Improving Workflows
Build n8n workflows that can modify and improve themselves using Claude Code's capabilities.
š Documentation Generation
Automatically generate and update documentation for your entire codebase, APIs, or databases.
š Code Migration
Automate the migration of legacy codebases to modern frameworks with intelligent refactoring.
š« Customer Support Automation
Transform support tickets into code fixes automatically:
- Analyze customer bug reports and reproduce issues
- Generate fixes for reported problems
- Create test cases to prevent regression
- Update documentation based on common questions
- Auto-respond with workarounds while fixes are deployed
ā” Quick Start
Prerequisites
- Claude Code CLI (required on your n8n server):
npm install -g @anthropic-ai/claude-code claude # Authenticate (requires Claude Pro/Team subscription)
Install in n8n
Option 1: Via n8n UI (Recommended)
- Open your n8n instance
- Go to Settings ā Community Nodes
- Click Install a community node
- Enter:
@holtweb/n8n-nodes-claudecode - Click Install
- Restart n8n when prompted
Option 2: Manual Installation
cd ~/.n8n/nodes
npm install @holtweb/n8n-nodes-claudecode
# Restart n8n
Option 3: Docker
docker run -it --rm \
-p 5678:5678 \
-e N8N_COMMUNITY_NODE_PACKAGES=@holtweb/n8n-nodes-claudecode \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
Note: For Docker, you'll need to ensure Claude Code CLI is installed inside the container. Consider creating a custom Dockerfile.
š¦ NPM Package: @holtweb/n8n-nodes-claudecode
šÆ Real-World Use Cases
1. GitHub Issue to Code
Webhook (GitHub Issue) ā Claude Code ā Create PR ā Notify Slack
Automatically implement features or fix bugs when issues are created.
2. Database Query Builder
Form Trigger ā Claude Code ā Execute Query ā Send Results
Natural language to SQL - let non-technical users query databases safely.
3. Code Quality Guardian
Git Push ā Claude Code ā Analyze Code ā Block/Approve ā Notify
Enforce coding standards and catch issues before they reach production.
4. API Integration Builder
HTTP Request ā Claude Code ā Generate Integration ā Test ā Deploy
Automatically create integrations with third-party APIs.
5. Intelligent Log Analysis
Error Logs ā Claude Code ā Diagnose ā Create Fix ā Open PR
Turn error logs into actionable fixes automatically.
6. Customer Support to Code Fix
Support Ticket ā Claude Code ā Reproduce Issue ā Generate Fix ā Test ā Deploy ā Auto-Reply
Transform customer complaints into deployed fixes in minutes, not days.
š ļø Powerful Features
Project Context Awareness
Set a project path and Claude Code understands your entire codebase context:
- Analyzes existing code patterns
- Follows your coding standards
- Understands your architecture
- Respects your dependencies
Tool Arsenal
Claude Code comes equipped with powerful tools:
- š File Operations: Read, write, edit multiple files
- š» Bash Commands: Execute any command
- š Smart Search: Find patterns across your codebase
- š Web Access: Fetch documentation and resources
- š Database Access: Via MCP servers
- š API Integration: GitHub, Slack, and more via MCP
Model Context Protocol (MCP)
Extend Claude Code with specialized capabilities:
- PostgreSQL/MySQL database access
- GitHub repository management
- Slack workspace integration
- Custom tool development
š Configuration Examples
Simple Code Analysis
{
"operation": "query",
"prompt": "Analyze this codebase and suggest performance improvements",
"projectPath": "/path/to/your/project",
"model": "sonnet"
}
Advanced Database Operations
{
"operation": "query",
"prompt": "Create an optimized query to find users who haven't logged in for 30 days",
"projectPath": "/path/to/project",
"model": "opus"
}
Customer Support Automation
{
"operation": "query",
"prompt": "Customer reports: 'Login button not working on mobile devices'\n\nAnalyze this issue, find the root cause, and create a fix",
"projectPath": "/path/to/web-app",
"model": "opus",
"allowedTools": ["Read", "Write", "Edit", "Bash", "Grep"],
"additionalOptions": {
"systemPrompt": "Focus on mobile compatibility issues. Check responsive CSS and JavaScript event handlers."
}
}
With MCP configuration (.mcp.json):
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "${DATABASE_URL}"]
}
}
}
š Workflow Patterns
Pattern 1: Continuous Code Improvement
Schedule Trigger (Daily)
ā
Claude Code (Analyze codebase for improvements)
ā
Create GitHub Issues
ā
Assign to Team
Pattern 2: Natural Language to Code
Slack Command
ā
Claude Code (Generate code from description)
ā
Create Pull Request
ā
Run Tests
ā
Notify Results
Pattern 3: Intelligent Monitoring
Error Webhook
ā
Claude Code (Diagnose issue)
ā
If (Can fix automatically)
āā Yes: Create Fix PR
āā No: Create Detailed Issue
š¦ Getting Started
1. Verify Prerequisites
Make sure Claude Code CLI is installed and authenticated on your n8n server:
claude --version # Should show the version
If not installed, see the Quick Start section above.
2. Create Your First Workflow
- In n8n, create a new workflow
- Add a Manual Trigger node (for testing)
- Add the Claude Code node
- Configure:
- Operation: Query
- Prompt: "Analyze the code in this directory and suggest improvements"
- Project Path:
/path/to/your/project - Model: Sonnet (faster) or Opus (more powerful)
- Click Execute Workflow
- Watch Claude Code analyze your project!
3. Explore Advanced Features
- Check out the workflow templates for ready-to-use examples
- See the examples directory for configuration options
- Read about MCP servers for database and API access
š” Pro Tips
šÆ Use Project Paths
Always set a project path for better context and results:
/home/user/projects/my-app
š Configure Permissions
Control what Claude Code can do in .claude/settings.json:
{
"permissions": {
"allow": ["Read(*)", "Write(*)", "Bash(npm test)"],
"deny": ["Bash(rm -rf *)"]
}
}
š Chain Operations
Use "Continue" operation to build complex multi-step workflows while maintaining context.
š Output Formats
- Structured: Full details with metrics
- Messages: For debugging
- Text: Simple results for chaining
š¤ Community & Support
- š Documentation
- š Report Issues
- š¬ Discussions
- š Star on GitHub
š What's Next?
We're constantly improving! Upcoming features:
- Visual workflow builder for Claude Code operations
- Pre-built workflow templates
- Enhanced debugging tools
- More MCP server integrations
š License
MIT - Build amazing things!
Ready to revolutionize your development workflow? Install Claude Code for n8n today and join the future of automated software development!
Made with ā¤ļø by Adam Holt