Building a Custom MCP Server to Connect Gemini CLI with n8n for Workflow Automation

Introduction In this post, I’ll walk you through my journey of integrating Google’s Gemini CLI (v0.24.0) with my self-hosted n8n instance (v2.2.6) using the Model Context Protocol (MCP). While n8n provides built-in MCP support, it only exposes read-only actions. To unlock full workflow automation—creating, modifying, and deleting workflows via Gemini CLI—I built a custom Python MCP server that leverages n8n’s API. Project Overview Goal: Enable Gemini CLI to create, read, update, and delete n8n workflows programmatically. ...

January 16, 2026 · 6 min · 1109 words · Indunil Sandaruwan Thembuwana