Skip to content
Back to search

mcp-n8n-builder

πŸͺ„ MCP server for programmatic creation and management of n8n workflows. Enables AI assistants to build, modify, and manage workflows without direct user intervention through a comprehensive set of tools and resources for interacting with n8n's REST API.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/spences10--mcp-n8n-builder/badge.svg)](/listings/spences10--mcp-n8n-builder)

HTML

<a href="/listings/spences10--mcp-n8n-builder"><img src="/api/listings/spences10--mcp-n8n-builder/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone the repository 2. Install dependencies:

npm install

3. Build the project:

npm run build

4. Run in development mode:

npm run dev

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md Β· README Β· 220 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # mcp-n8n-builder
  2. A Model Context Protocol (MCP) server for programmatic creation and
  3. management of n8n workflows. This server provides tools and resources
  4. for interacting with n8n's REST API, allowing AI assistants to build,
  5. modify, and manage workflows without direct user intervention.
  6. <a href="https://glama.ai/mcp/servers/@spences10/mcp-n8n-builder">
  7. <img width="380" height="200" src="https://glama.ai/mcp/servers/@spences10/mcp-n8n-builder/badge" />
  8. </a>
  9. ## Features
  10. - πŸ”„ **Workflow Management**: Create, read, update, delete, activate,
  11. and deactivate workflows
  12. - πŸ“Š **Execution Management**: List and retrieve workflow execution
  13. details
  14. - βœ… **Schema Validation**: Comprehensive validation with Zod for both
  15. input and output data
  16. - πŸ” **Node Validation**: Validates node types against n8n's available
  17. nodes before workflow creation to prevent errors
  18. - πŸ€” **Smart Suggestions**: Provides suggestions for similar node
  19. types when invalid nodes are detected
  20. - πŸ› οΈ **Error Handling**: Detailed error messages for troubleshooting
  21. - πŸ“ **Documentation**: Extensive documentation for all tools and
  22. resources
  23. - πŸ” **Search & Filter**: Filter workflows by name, tags, or active
  24. status
  25. ## ⚠️ Token Consumption Warning
  26. This tool is a "token monster" due to the nature of n8n workflows:
  27. - **N8N workflows are complex JSON structures** with nested nodes, connections, parameters, and settings
  28. - **A single workflow can easily consume thousands of tokens** when viewed or edited
  29. - **The JSON structure cannot be meaningfully reduced** without losing essential workflow information
  30. - **LLM context windows are finite** - complex workflows may exceed available context
  31. ### Mitigation Strategies
  32. The tool implements several optimizations to reduce token usage:
  33. - **Verbosity Control**: Use `OUTPUT_VERBOSITY=concise` (default) for summaries instead of full JSON
  34. - **Object Simplification**: Workflow listings show only essential fields (id, name, status, node count)
  35. - **Selective Guide Inclusion**: Error messages include only relevant sections of the composition guide
  36. - **Per-tool Verbosity**: Override verbosity on individual tool calls with the `verbosity` parameter
  37. ### Recommended Usage
  38. - **List workflows first** to identify what you need (low token cost)
  39. - **Work with simple workflows** when possible
  40. - **Use `concise` verbosity** unless you specifically need full JSON
  41. - **Break complex workflows into smaller pieces** for easier management
  42. - **Consider the token cost** before retrieving or editing large workflows
  43. ## Configuration
  44. This server requires configuration through your MCP client. Here are
  45. examples for different environments:
  46. ### Cline Configuration
  47. Add this to your Cline MCP settings:
  48. ```json
  49. {
  50. "mcpServers": {
  51. "n8n-workflow-builder": {
  52. "command": "npx",
  53. "args": ["-y", "mcp-n8n-builder"],
  54. "env": {
  55. "N8N_HOST": "http://localhost:5678/api/v1",
  56. "N8N_API_KEY": "your-n8n-api-key",
  57. "OUTPUT_VERBOSITY": "concise" // Options: 'concise' or 'full'
  58. }
  59. }
  60. }
  61. }
  62. ```
  63. ### Claude Desktop with WSL Configuration
  64. For WSL environments, add this to your Claude Desktop configuration:
  65. ```json
  66. {
  67. "mcpServers": {
  68. "n8n-workflow-builder": {
  69. "command": "wsl.exe",
  70. "args": [
  71. "bash",
  72. "-c",
  73. "N8N_HOST=http://localhost:5678/api/v1 N8N_API_KEY=your-n8n-api-key OUTPUT_VERBOSITY=concise npx -y mcp-n8n-builder"
  74. ]
  75. }
  76. }
  77. }
  78. ```
  79. ### Environment Variables
  80. The server can be configured using environment variables:
  81. | Variable | Description | Default |
  82. | ------------------ | -------------------------------------------- | ------------------------------ |
  83. | `N8N_HOST` | URL of the n8n API | `http://localhost:5678/api/v1` |
  84. | `N8N_API_KEY` | API key for n8n authentication | `""` |
  85. | `SERVER_NAME` | Name of the MCP server | `"n8n-workflow-builder"` |
  86. | `SERVER_VERSION` | Version of the MCP server | Package version |
  87. | `LOG_LEVEL` | Logging level | `"info"` |
  88. | `CACHE_ENABLED` | Enable caching | `false` |
  89. | `CACHE_TTL` | Cache TTL in seconds | `300` |
  90. | `OUTPUT_VERBOSITY` | Output verbosity level (`concise` or `full`) | `"concise"` |
  91. ## MCP Tools
  92. ### Node Management
  93. - `list_available_nodes`: Lists all available nodes in the n8n
  94. instance. **IMPORTANT**: Use this tool BEFORE creating or updating
  95. workflows to ensure you only use valid node types. This helps
  96. prevent errors caused by using node types that don't exist in the
  97. current n8n instance.
  98. ### Workflow Management
  99. - `list_workflows`: Lists all workflows from n8n with their basic
  100. information including ID, name, status, creation date, and tags.
  101. Results can be filtered by active status, tags, or name.
  102. - `create_workflow`: Creates a new workflow in n8n with specified
  103. nodes and connections. Returns the created workflow with its
  104. assigned ID. Validates that all node types exist in the n8n
  105. instance.
  106. - `get_workflow`: Retrieves complete details of a specific workflow by
  107. its ID, including all nodes, connections, settings, and metadata.
  108. - `update_workflow`: Updates an existing workflow with new
  109. configuration. The entire workflow structure must be provided, not
  110. just the parts being changed. Validates that all node types exist in
  111. the n8n instance.
  112. - `delete_workflow`: Permanently deletes a workflow by its ID. This
  113. action cannot be undone.
  114. - `activate_workflow`: Activates a workflow by its ID, enabling it to
  115. run automatically based on its trigger.
  116. - `deactivate_workflow`: Deactivates a workflow by its ID, preventing
  117. it from running automatically.
  118. ### Execution Management
  119. - `list_executions`: Lists workflow execution history with details on
  120. success/failure status, duration, and timestamps. Results can be
  121. filtered by workflow ID, status, and limited to a specific number.
  122. - `get_execution`: Retrieves detailed information about a specific
  123. workflow execution, including execution time, status, and optionally
  124. the full data processed at each step.
  125. ## MCP Resources
  126. - `n8n://workflows`: List of all workflows in n8n
  127. - `n8n://workflows/{id}`: Details of a specific n8n workflow
  128. - `n8n://executions/{id}`: Details of a specific n8n workflow
  129. execution
  130. ## Development
  131. ### Setup
  132. 1. Clone the repository
  133. 2. Install dependencies:
  134. ```bash
  135. npm install
  136. ```
  137. 3. Build the project:
  138. ```bash
  139. npm run build
  140. ```
  141. 4. Run in development mode:
  142. ```bash
  143. npm run dev
  144. ```
  145. ### Publishing
  146. The project uses changesets for version management. To publish:
  147. 1. Create a changeset:
  148. ```bash
  149. npm changeset
  150. ```
  151. 2. Version the package:
  152. ```bash
  153. npm changeset version
  154. ```
  155. 3. Publish to npm:
  156. ```bash
  157. npm release
  158. ```
  159. ## Contributing
  160. Contributions are welcome! Please feel free to submit a Pull Request.
  161. ## License
  162. MIT License - see the [LICENSE](LICENSE) file for details.
  163. ## Acknowledgments
  164. - Built on the
  165. [Model Context Protocol](https://github.com/modelcontextprotocol)
  166. - Powered by [n8n](https://n8n.io/)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.