Self-hosted workflow automation
## n8n MCP Server: Open-Source Workflow Automation The **n8n MCP Server** connects Google Antigravity to the self-hostable workflow automation platform, enabling developers to create, trigger, and manage complex automation workflows with full control over data and infrastructure. ### Why n8n MCP? - **Self-hostable** - Full control over your automation infrastructure - **400+ integrations** - Connect to popular apps and services - **Code nodes** - Write custom JavaScript/Python logic - **Workflow control** - Trigger and manage workflows via API - **Data privacy** - Keep sensitive data on your infrastructure ### Key Features #### 1. Workflow Execution ```python # Trigger workflow execution = await mcp.call("n8n", "execute_workflow", { "workflow_id": "abc123", "data": { "input": "process this data", "options": {"format": "json"} } }) print(f"Execution: {execution[\"id\"]}") # Get execution result result = await mcp.call("n8n", "get_execution", { "execution_id": execution["id"] }) print(f"Output: {result[\"data\"][\"output\"]}") ``` #### 2. Workflow Management ```python # List workflows workflows = await mcp.call("n8n", "list_workflows", { "active": True }) for wf in workflows: print(f"{wf[\"name\"]}: {wf[\"active\"]}") # Activate/deactivate workflow await mcp.call("n8n", "update_workflow", { "workflow_id": "abc123", "active": True }) ``` #### 3. Webhook Triggers ```python # Get webhook URL for workflow webhook = await mcp.call("n8n", "get_webhook_url", { "workflow_id": "abc123", "node": "Webhook" }) # Trigger webhook await mcp.call("n8n", "trigger_webhook", { "url": webhook["url"], "method": "POST", "data": {"event": "new_order"} }) ``` #### 4. Execution History ```python # Get execution history history = await mcp.call("n8n", "list_executions", { "workflow_id": "abc123", "status": "error", "limit": 10 }) for exec in history: print(f"{exec[\"id\"]}: {exec[\"status\"]} - {exec[\"finished_at\"]}") ``` ### Configuration ```json { "mcpServers": { "n8n": { "command": "npx", "args": ["-y", "@anthropic/mcp-n8n"], "env": { "N8N_HOST": "http://localhost:5678", "N8N_API_KEY": "your-api-key" } } } } ``` ### Use Cases **Custom Integrations**: Build complex workflows with custom code nodes. **Data Processing**: Process and transform data through multi-step pipelines. **Event-Driven Automation**: React to webhooks with sophisticated logic. **Self-Hosted Automation**: Keep automations on your own infrastructure. The n8n MCP Server brings self-hosted automation to your development workflow.
{
"mcpServers": {
"n8n": {
"mcpServers": {
"n8n": {
"env": {
"N8N_HOST": "http://localhost:5678",
"N8N_API_KEY": "your-api-key"
},
"args": [
"-y",
"n8n-mcp-server"
],
"command": "npx"
}
}
}
}
}