N8n Mcp

v1.0.1

Operate n8n workflow automation platform via MCP (Model Context Protocol). Use when: (1) Creating, updating, or managing n8n workflows, (2) Executing or test...

0· 97·0 current·0 all-time
byitian@itian932

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for itian932/n8n-mcp.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "N8n Mcp" (itian932/n8n-mcp) from ClawHub.
Skill page: https://clawhub.ai/itian932/n8n-mcp
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: N8N_MCP_URL, N8N_MCP_TOKEN
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install n8n-mcp

ClawHub CLI

Package manager switcher

npx clawhub@latest install n8n-mcp
Security Scan
Capability signals
Requires OAuth tokenRequires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (operate n8n via MCP) match the declared env vars (N8N_MCP_URL, N8N_MCP_TOKEN) and the SKILL.md examples (HTTP calls to the MCP server). No unrelated services, binaries, or credentials are requested.
Instruction Scope
SKILL.md instructs the agent to call the MCP HTTP endpoints (curl/json-rpc/SSE) and to use a Bearer token. It does not direct the agent to read arbitrary local files, other environment variables, or contact unexpected external endpoints beyond the configured N8N_MCP_URL. Minor nit: one curl example uses $TOKEN instead of the declared N8N_MCP_TOKEN environment variable (typo), which should be corrected.
Install Mechanism
No install spec or code files that would write or execute arbitrary code on disk; the skill is instruction-only which minimizes installation risk.
Credentials
Only N8N_MCP_URL and N8N_MCP_TOKEN are required — these are proportionate and expected for an MCP HTTP integration. No unrelated credentials, config paths, or broad secrets are requested.
Persistence & Privilege
always is false and there are no instructions to modify other skills or system-wide configs. The skill does not request permanent platform-level privileges.
Assessment
This skill is coherent for managing n8n via MCP, but treat the MCP token like any privileged credential: only point N8N_MCP_URL to trusted n8n instances, create a scoped/rotatable MCP token, avoid using tokens reused elsewhere, and monitor n8n audit logs. Fix the example variable mismatch ($TOKEN vs N8N_MCP_TOKEN) before running examples. If you will allow the agent to call the MCP endpoint autonomously, ensure network access and token scope are tightly controlled (don't expose a production n8n to untrusted networks).

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

EnvN8N_MCP_URL, N8N_MCP_TOKEN
latestvk972semqn52779p8bds5k5sbv984z52c
97downloads
0stars
2versions
Updated 1w ago
v1.0.1
MIT-0

n8n MCP Integration

Connect to n8n's official MCP server to programmatically build, execute, and manage workflows.

Version Support

  • n8n version: 2.16.1+
  • MCP protocol: 2024-11-05
  • Server name: n8n MCP Server v1.1.0

Configuration

MCP Server Setup

In n8n UI:

  1. Go to Settings → n8n API
  2. Create an API key for REST API access
  3. Create an MCP token for MCP server access

Connection Config

{
  "mcpServers": {
    "n8n-mcp": {
      "type": "http",
      "url": "http://localhost:5678/mcp-server/http",
      "headers": {
        "Authorization": "Bearer <MCP_TOKEN>"
      }
    }
  }
}

Environment Variables

export N8N_MCP_URL="http://localhost:5678/mcp-server/http"
export N8N_MCP_TOKEN="<your-mcp-token>"

Available Tools

Workflow Management

ToolDescription
search_workflowsSearch workflows with filters
get_workflow_detailsGet workflow details + trigger info
publish_workflowActivate workflow for production
unpublish_workflowDeactivate workflow
archive_workflowArchive a workflow
update_workflowUpdate workflow from code

Workflow Execution

ToolDescription
execute_workflowExecute workflow by ID
get_executionGet execution details
test_workflowTest workflow with pin data
prepare_test_pin_dataGenerate test data for workflow

Workflow Creation (SDK)

ToolDescription
get_sdk_referenceGet SDK docs and patterns
search_nodesSearch n8n nodes by service/type
get_node_typesGet TypeScript type definitions
get_suggested_nodesGet curated node recommendations
validate_workflowValidate workflow code
create_workflow_from_codeCreate workflow from SDK code

Data Tables

ToolDescription
search_data_tablesSearch data tables
create_data_tableCreate new data table
rename_data_tableRename data table
add_data_table_columnAdd column to table
delete_data_table_columnDelete column
rename_data_table_columnRename column
add_data_table_rowsInsert rows into table

Projects & Folders

ToolDescription
search_projectsSearch projects
search_foldersSearch folders

Usage Patterns

1. Creating a Workflow

# Step 1: Get SDK reference
curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_sdk_reference","arguments":{"section":"all"}}}' \
  "$N8N_MCP_URL"

# Step 2: Search nodes
curl -X POST ... -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_nodes","arguments":{"queries":["schedule trigger","slack","set"]}}}'

# Step 3: Get node types
curl -X POST ... -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_node_types","arguments":{"nodeIds":["n8n-nodes-base.scheduleTrigger","n8n-nodes-base.slack"]}}}'

# Step 4: Validate code
curl -X POST ... -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"validate_workflow","arguments":{"code":"..."}}}'

# Step 5: Create workflow
curl -X POST ... -d '{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"create_workflow_from_code","arguments":{"code":"...","name":"My Workflow","description":"..."}}}'

2. Executing a Workflow

# Execute workflow
curl -X POST ... -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"execute_workflow","arguments":{"workflowId":"xxx"}}}'

# Get execution result
curl -X POST ... -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_execution","arguments":{"workflowId":"xxx","executionId":"yyy","includeData":true}}}'

3. Testing with Pin Data

# Prepare test data
curl -X POST ... -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"prepare_test_pin_data","arguments":{"workflowId":"xxx"}}}'

# Test workflow
curl -X POST ... -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"test_workflow","arguments":{"workflowId":"xxx","pinData":{...}}}}'

SDK Workflow Example

import { workflow, trigger, node } from 'n8n-workflow-sdk';

export default workflow({
  name: 'Daily Slack Notification',
  description: 'Send daily summary to Slack',
  nodes: [
    trigger.schedule({
      name: 'Schedule',
      rule: { interval: [{ field: 'hours', hoursInterval: 24 }] }
    }),
    node.set({
      name: 'Prepare Message',
      values: { text: 'Daily report ready!' }
    }),
    node.slack({
      name: 'Send to Slack',
      resource: 'message',
      operation: 'send',
      channel: '#general',
      text: '={{ $node["Prepare Message"].json.text }}'
    })
  ],
  connections: [
    { from: 'Schedule', to: 'Prepare Message' },
    { from: 'Prepare Message', to: 'Send to Slack' }
  ]
});

MCP Protocol Notes

  • Transport: HTTP with SSE (Server-Sent Events)
  • Content-Type: application/json
  • Accept: application/json, text/event-stream (required)
  • Auth: Bearer token in Authorization header

Common Errors

ErrorSolution
"Not Acceptable"Add Accept: application/json, text/event-stream header
"Unauthorized"Check MCP token is valid
"Not found"Verify MCP server URL is correct

References

Comments

Loading comments...