n8n-flow-bridge-mcp
Provides version control for n8n workflows with automatic credential remapping, enabling consistent management across environments.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
n8n Flow Bridge
Git-based version control for n8n workflows with automatic credential remapping — stop rewiring nodes every import.
The problem
Exporting/importing n8n workflows breaks credential bindings because node references point to internal instance-specific ids, not names. Every environment switch (dev → prod, or teammate → teammate) means manually reopening every credentialed node and rewiring it by hand. This tool fixes that.
Related MCP server: n8n Architect MCP Server
What it does
Pulls workflows from n8n into clean, diffable git files
Auto-rewrites credential references to stable symbolic keys (
cred:<type>:<slug>)Auto-remaps symbolic keys back to real local credential ids on push
Detects and blocks on missing credential bindings before they break a workflow silently
Quick start
No install step — works the same on Windows, macOS, and Linux:
export N8N_BASE_URL=http://localhost:5678
export N8N_API_KEY=...
npx n8n-flow-bridge-mcp pull --workflow 123
npx n8n-flow-bridge-mcp bind cred:slackApi:team-bot
npx n8n-flow-bridge-mcp push --workflow 123Prefer a shorter command? npm install -g n8n-flow-bridge-mcp once, then use
bridge directly (bridge pull --workflow 123, etc.) instead of
npx n8n-flow-bridge-mcp ....
Developing on this repo instead of the published package
git clone https://github.com/dorkian/n8n-flow-bridge-mcp.git
cd n8n-flow-bridge-mcp
npm install
npm run build
npm link # makes the local build available as `bridge`Running separate dev and prod n8n instances from one checkout? Every command
accepts -e, --env-dir <path> (and -d, --dir <path> for workflows/
itself, rarely needed) to say which environment's .env and
credentials.map.json to use — point it at any two folders you like, e.g.:
bridge push --workflow 123 --env-dir ./environments/dev
bridge push --workflow 123 --env-dir ./environments/prodworkflows/ stays a single shared, git-tracked folder; only .env and
credentials.map.json differ per environment. Register bridge mcp --env-dir <path> twice (once per environment) to get the same separation
through MCP tools.
Before / after
Raw n8n export (instance-specific, breaks on import elsewhere):
{
"name": "Post Release Alert",
"type": "n8n-nodes-base.slack",
"credentials": {
"slackApi": { "id": "17", "name": "Team Bot" }
}
}After bridge pull (portable, committed to git):
{
"name": "Post Release Alert",
"type": "n8n-nodes-base.slack",
"credentials": {
"slackApi": { "id": "cred:slackApi:team-bot", "name": "Team Bot" }
}
}bridge push remaps cred:slackApi:team-bot back to whatever the real
local credential id is on the target machine — see
docs/credential-remap.md for the full
walkthrough.
CLI commands
Command | What it does |
| Fetch, sanitize, and save workflow(s) to |
| Remap credentials and push workflow(s) to n8n |
| Bind a symbolic credential key to a local credential id |
| Auto-bind all unbound keys by exact type + name match |
| Show credential drift and remote sync status |
| Run the MCP server (stdio) for Claude Code / Cursor |
All of the above accept -e, --env-dir <path> (which .env +
credentials.map.json to use) and -d, --dir <path> (where workflows/
lives, defaults to cwd, rarely needs overriding).
Configuration
Set N8N_BASE_URL and N8N_API_KEY (env vars or a .env file, optionally
loaded from --env-dir).
Want AI to build the workflow itself, not just version it?
This tool has no opinion about which n8n nodes solve your problem — pair it
with n8n-mcp for that (node
catalog, validation, natural-language workflow creation/editing on dev),
and use bridge to snapshot the result into git and promote it to prod.
See docs/pairing-with-n8n-mcp.md.
Architecture
bridge pull fetches a workflow from n8n, strips instance-specific
metadata, and rewrites each node's credential id to a portable symbolic key
(sanitize.ts) before writing it to workflows/ in a deterministically
ordered, diff-friendly format (diffFormat.ts). Each machine keeps a
git-ignored credentials.map.json binding those symbolic keys to its own
real credential ids (credentialMap.ts). bridge push substitutes the
real ids back in (remap.ts) — aborting first if any key is unbound — then
calls the n8n API. The CLI (src/cli/*) and the MCP server
(src/mcp/server.ts) both call the same core modules, so both surfaces stay
in sync. Full details in docs/architecture.md.
Roadmap
MCP server for Claude Code / Cursor
Multi-environment support from one checkout (
--env-dir)Web UI for credential binding
Multi-instance orchestration (sync dev → staging → prod in one command)
See docs/roadmap.md.
About me
Ashkan Dorkian — AI-native frontend & automation engineer.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Build, check and fix n8n workflows from Claude, Cursor or ChatGPT. Built on 1,100+ real n8n node definitions and curated templates, with a validator that repairs common mistakes (wrong node types, missing settings) and returns JSON ready to import into n8n. Sign in with a free gydmation.com account; nothing to install.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Plain-English git for agents: 22 tools to branch, commit, push and tag. Free tier.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables creation, management, and deployment of n8n workflows with enhanced context and automation capabilities. Features code extraction, automatic documentation, template generation, and intelligent project organization for streamlined workflow development.27MIT
- FlicenseNot gradedqualityDmaintenanceEnables orchestration and management of n8n workflows through tools for creating, updating, diagnosing failed executions, auto-fixing workflows, and installing community nodes.-
- AlicenseAqualityDmaintenanceEnables full workflow automation management in n8n through 40+ tools covering workflows, executions, credentials, tags, variables, projects, users, and source control operations.52137 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables users to create, manage, and monitor n8n workflows through natural language using AI interfaces like Claude and Cursor. It supports multi-instance environments and provides tools for workflow lifecycle management, execution monitoring, and tag organization.75 npm239MIT