Railway

Deploy n8n MCP

MCP server for Claude & agents

Deploy n8n MCP

Just deployed

/home/node/.n8n

/var/lib/postgresql/data

Just deployed

/data

Just deployed

Deploy and Host self hosted n8n MCP (Open-Source MCP Server) on Railway

n8n MCP exposes n8n workflows as MCP tools for Claude Desktop, Cursor, Windsurf, and other agents. Railway deploys queue mode: editor, worker, PostgreSQL, Redis Bull. Worker handles parallel tool calls; no per-execution fees.

About Hosting n8n MCP open-source software on Railway (self hosted n8n template)

Railway runs editor, worker, PostgreSQL, and Redis as separate services with independent scaling and logs. Scale workers horizontally, keep the editor small, and store N8N_ENCRYPTION_KEY in Railway secrets. The persistent volume survives redeploys. Official n8n image keeps workflows, credentials, and executions in your own Postgres—no external MCP gateway needed.

Why Deploy n8n MCP, the Zapier MCP alternative on Railway (Railway Free Trial)

Zapier MCP bills per tool call and runs on Zapier's servers. n8n MCP runs the MCP server, workflow engine, queue, and database on your own Railway infrastructure. You pay a flat $10-$25 monthly cost, not a per-execution tax. Credentials stay in your own Postgres, encrypted with your key. Railway's $5 free trial on GitHub signup lets you test the full stack before committing.

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying n8n MCP on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Railway vs Other Hosting Providers and VPS for n8n MCP self hosting

ProviderEffortCost
RailwayOne-click, managed DBs$10–$25
DigitalOceanManual, separate DBs$20–$40
AWSComplex, separate services$30–$80
HetznerManual VPS$10–$20

Railway bundles Postgres and Redis, scaling per service. Others need separate provisioning.

Common Use Cases for hosted n8n MCP

Hosted n8n MCP turns workflows into tools for AI clients. Claude Desktop uses them for CRM, support, and doc search; Cursor and Windsurf agents fetch customer data, create Jira tickets, or send notifications. Multiple MCP clients share one instance with Redis Bull queues for fair job distribution. Build reusable internal tools, enrich data from APIs and databases, and trigger Slack, email, or CRM updates.

Dependencies for n8n MCP Docker hosted on Railway

Four services: n8n editor, n8n worker, PostgreSQL, Redis (queue mode).

Deployment Dependencies for Managed n8n MCP Service (MCP Server & Agent Tools)

The Railway template provisions four services. The editor runs n8nio/n8n:2.36.8 on port 5678, serving the UI and MCP tool schema endpoint. The worker runs the same image with n8n worker, consuming jobs from Redis Bull. PostgreSQL stores workflows, executions, credentials, and settings—DB_TYPE=postgresdb is mandatory because SQLite cannot run queue mode. Redis acts as the Bull queue backend. The persistent volume /home/node/.n8n holds n8n config and local files.

Implementation Details for n8n MCP (Using n8n official docker image)

The MCP bridge reads workflows via n8n REST API and generates MCP tool schemas from input parameters. Each workflow's input parameters become MCP tool arguments, enabling agents to call n8n workflows directly. Agent tool calls hit the n8n execution API, enqueueing jobs into Redis Bull. The worker runs the workflow; the bridge polls for completion and returns output. The editor stays responsive. Set EXECUTIONS_MODE=queue, WEBHOOK_URL, N8N_PROXY_HOPS=1, and EXECUTIONS_DATA_PRUNE=true to keep the database lean.

How does n8n MCP compare against other MCP Servers and Agent Tooling platforms

n8n MCP turns existing n8n workflows into MCP tools—no standalone server or per-call gateway.

n8n MCP vs Claude Desktop MCP DIY (Claude Desktop MCP DIY Alternative)

Claude Desktop MCP DIY needs Python/TypeScript servers with hardcoded tools—no visual editor. n8n MCP offers 400+ nodes; drag a node to add tools.

n8n MCP vs Zapier MCP (Zapier MCP Alternative)

Zapier MCP executes on Zapier servers, consuming task quota quickly; agent sessions can exhaust plans, and workflow complexity is limited. n8n MCP runs on your Railway stack, offering flat infrastructure pricing regardless of execution volume.

n8n MCP vs Composio (Composio Alternative)

Composio limits you to pre-built SaaS tools and hosted execution. n8n MCP builds any tool from 400+ integrations or custom code, with no per-execution cost on Railway.

n8n MCP vs FastMCP (FastMCP Alternative)

FastMCP is a Python framework requiring code for every tool and server management. n8n MCP eliminates code with visual workflows, offering built-in execution history and error handling—ideal for teams.

How to use n8n MCP (the OSS MCP Server & Agent Tools)?

For a simpler single-node option see the cheapest n8n without queue mode.

Open the n8n editor and create workflows with input parameters. Each workflow becomes an MCP tool. Connect your MCP client (Claude Desktop, Cursor, Windsurf) to the n8n MCP endpoint. Agent calls execute the workflow and return results. Manage credentials from the n8n UI.

How to self host n8n MCP on other VPS Services (n8n MCP self hosting guide)

Prefer a VPS? Deploy the same stack manually with Docker Compose. This guide covers the essential steps.

Clone the Repository

Clone the n8n MCP repo or create a new directory for your Docker Compose file. It includes the MCP bridge config and example workflows. Or use the official n8n Docker image and add the MCP bridge as a separate service.

Install Dependencies

Install Docker and Docker Compose on your VPS. Ensure you have PostgreSQL and Redis available—either as Docker containers or managed services. Create a Docker network for the services to communicate. Pull the n8nio/n8n:2.36.8 image and the MCP bridge image.

Configure Environment Variables

Set EXECUTIONS_MODE=queue, DB_TYPE=postgresdb, Postgres and Redis connection vars, WEBHOOK_URL, N8N_PROXY_HOPS=1, N8N_ENCRYPTION_KEY, EXECUTIONS_DATA_PRUNE=true. Mount /home/node/.n8n for persistence.

Start the n8n MCP Application

Run docker compose up -d to start the editor, worker, PostgreSQL, Redis, and MCP bridge. The editor will be available on port 5678. Configure your MCP client to connect to the bridge endpoint. Test a workflow to ensure queue mode is working.

Official Pricing of n8n MCP (n8n MCP pricing)

n8n MCP is open-source and free under fair-code Community Edition. No license fee—only infrastructure costs. n8n Cloud Starter is about $24/month for 2,500 executions but excludes MCP server. Self-hosting on Railway gives unlimited executions for a flat infrastructure fee.

n8n MCP cloud vs self hosted comparison (Pricing, features, costs, and more)

When deciding between n8n Cloud and self-hosting n8n MCP on Railway, the primary trade-offs are cost, control, and maintenance. n8n Cloud is fully managed—you never touch a server, and updates are automatic. However, it lacks the MCP server component entirely, so you would need to run a separate MCP bridge anyway. Self-hosting on Railway gives you the full stack in one place, with unlimited executions and complete data control. You also get the Community Edition features, but note that Community has no SSO.

Monthly cost of self hosting n8n MCP on Railway

A minimal Railway setup with small Postgres, Redis, and two n8n containers costs $10–$15/month. Scale up to $20–$25 for more concurrency. The $5 free trial on GitHub signup lets you test without upfront cost.

System Requirements for Hosting n8n MCP on a VPS

Minimum: 2 vCPU, 4 GB RAM, 20 GB SSD. For moderate production, 4 GB works; 8 GB recommended for many concurrent workflows or large data transformations. The worker scales horizontally by adding containers; editor and database stay single.

Frequently Asked Questions (FAQs)

Can I use n8n MCP with Claude Desktop for free?

Yes. n8n MCP is open-source; Claude Desktop's MCP client is free. You only pay for Railway infrastructure. The $5 Railway free trial covers testing.

Does n8n MCP work with Cursor and Windsurf?

Yes. Any MCP-compatible client can connect to n8n MCP. Cursor and Windsurf both support MCP servers, so you can expose your n8n workflows as tools inside those IDEs.

What happens if I lose my N8N_ENCRYPTION_KEY?

Losing it makes all stored credentials and API tokens unreadable; the key cannot be recovered. Store it in Railway's secret manager and back it up securely.

Can I run n8n MCP without queue mode?

Yes, but you lose concurrency benefits. Without queue mode, the editor executes workflows inline, blocking the UI during long tool calls. Queue mode is recommended for MCP agents firing parallel calls.

Is n8n MCP suitable for production use?

Yes. Queue mode with PostgreSQL and Redis is production-ready. The MCP bridge adds minimal overhead. Set up SSL, backups, and monitoring as usual.

How do I update n8n MCP on Railway?

Change the Docker image tag in Railway service settings to a newer n8n version (e.g., n8nio/n8n:2.37.0). Railway redeploys with the new image. Back up database and encryption key first.

This Railway queue-mode template uses n8nio/n8n:2.36.8 with EXECUTIONS_MODE=queue, DB_TYPE=postgresdb, Redis Bull, and a persistent volume at /home/node/.n8n so editor and worker share state safely.

This Railway queue-mode template uses n8nio/n8n:2.36.8 with EXECUTIONS_MODE=queue, DB_TYPE=postgresdb, Redis Bull, and a persistent volume at /home/node/.n8n so editor and worker share state safely.

Queue-mode on Railway keeps the n8n editor responsive while workers process MCP tool-call executions via Redis Bull.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
119
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
84
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
870