Ga naar hoofdinhoud

n8n MCP Integration

Overviewโ€‹

OpenRegister includes built-in support for the Model Context Protocol (MCP) integration with n8n, enabling AI agents to programmatically control workflow automation.

What is n8n?โ€‹

n8n is a powerful workflow automation tool that allows you to connect different services and automate tasks. Think of it as a more flexible, self-hosted alternative to Zapier or IFTTT.

What is MCP?โ€‹

The Model Context Protocol (MCP) is an open standard that enables AI assistants (like Cursor, Claude Desktop, etc.) to connect to external tools and data sources. With MCP, AI agents can:

  • ๐Ÿ” Discover available tools and workflows.
  • โšก Execute workflows programmatically.
  • ๐Ÿ“ Create and modify workflows.
  • ๐Ÿ› Debug workflow executions.
  • ๐Ÿ“š Access documentation.

Why Use n8n MCP in OpenRegister?โ€‹

Combining n8n with MCP provides powerful capabilities:

  1. AI-Assisted Development: AI agents can help you create, test, and debug workflows.
  2. Automated Testing: Programmatically execute workflows as part of your CI/CD pipeline.
  3. Intelligent Debugging: AI can analyze workflow failures and suggest fixes.
  4. Code Quality Automation: Use workflows for automated PHPCS fixing, linting, testing, and more.
  5. Integration Hub: Connect OpenRegister with hundreds of external services.

Featuresโ€‹

โœ… Included in OpenRegisterโ€‹

  • Pre-configured n8n container with Docker socket access.
  • n8n-mcp module integration.
  • Ready-to-use workflow templates for PHPCS automation.
  • Comprehensive documentation and examples.

๐Ÿ”ง Capabilitiesโ€‹

  • Execute workflows from Cursor or Claude Desktop.
  • AI-powered workflow creation and debugging.
  • Integrate with Ollama for local LLM inference.
  • Access n8n node documentation via MCP.
  • Webhook-based workflow triggers.

Quick Startโ€‹

  1. Start n8n:

    docker-compose --profile n8n up -d
  2. Configure MCP in Cursor:

    • Edit ~/.cursor/mcp.json
    • Add the n8n MCP server configuration
    • Restart Cursor
  3. Test the integration:

    • Ask your AI agent: "List my n8n workflows"

For detailed setup instructions, see the Setup Guide.

Documentationโ€‹

Screenshotsโ€‹

n8n Settingsโ€‹

n8n Settings Menu The n8n settings menu showing various configuration options including MCP Access (Enterprise feature).

n8n API Configurationโ€‹

n8n API Settings Generate API keys for secure MCP authentication.

n8n Workflowsโ€‹

n8n Workflows The n8n workflow overview showing available automation workflows.

Architectureโ€‹

Example Use Casesโ€‹

1. Automated PHPCS Fixingโ€‹

Use n8n with Ollama to automatically fix PHP coding standard violations:

AI Agent โ†’ n8n โ†’ Run PHPCS โ†’ Parse Errors โ†’ 
Ollama (CodeLlama) โ†’ Generate Fixes โ†’ Apply to Files โ†’
Run Tests โ†’ Commit Changes

2. Webhook-Based CI/CDโ€‹

Trigger workflows from Git webhooks for automated testing and deployment:

GitHub Push โ†’ Webhook โ†’ n8n โ†’ Run Tests โ†’ 
Deploy if Passed โ†’ Notify Team

3. AI-Powered Code Reviewโ€‹

Automatically analyze code changes and provide AI-powered feedback:

Pull Request โ†’ n8n โ†’ Extract Diff โ†’ 
Ollama (Analysis) โ†’ Post Review Comments

Community Edition vs. Enterpriseโ€‹

OpenRegister uses the n8n Community Edition (free, open-source). Some features are Enterprise-only:

FeatureCommunityEnterprise
Workflow Automationโœ…โœ…
API Accessโœ…โœ…
Docker Integrationโœ…โœ…
MCP via n8n-mcpโœ…โœ…
Built-in MCP ServerโŒโœ…
OAuth2 for MCPโŒโœ…
LDAP/SSOโŒโœ…

Note: We use the open-source n8n-mcp package, which works with the Community Edition.

Technical Detailsโ€‹

  • Container: openregister-n8n
  • Port: 5678
  • Volume: n8n (persistent data storage)
  • User: root (for Docker socket access)
  • Default Credentials: admin / admin (โš ๏ธ change in production!)
  • MCP Package: n8n-mcp v2.31.3+

Next Stepsโ€‹

  1. Follow the Setup Guide to configure MCP.
  2. Explore example workflows.
  3. Learn about security best practices.
  4. Read the troubleshooting guide if you encounter issues.

Referencesโ€‹