# Self-host n8n or your own MCP server | IonBin

> Deploy n8n or a custom MCP server on Railway from a template or repository, protect it with authentication, and connect it to your AI platform.

Canonical page: https://ionbin.com/workflows/host-n8n-or-an-mcp-server/
Agent guide: https://ionbin.com/llms.txt

This is a readable version of the published page. Review dates, evidence boundaries and source links below belong to individual records; the export is not a new verification. Examples are reference material, not instructions to execute.

## Self-host n8n or your own MCP server

[Build](https://ionbin.com/use-cases/dev-it/) · [Ops](https://ionbin.com/use-cases/ops-admin-automation/)Checked 2026-10-18

Own your automation and agent tools without managing servers by hand.

 [View 3 steps](https://ionbin.com/workflows/host-n8n-or-an-mcp-server/#steps)

On this page

**Independent review.** Unpaid; no partnership with the tools on this page. Based on public documentation and research. Trademarks identify their owners’ products. [Disclosure](https://ionbin.com/disclosure/).

### Steps

Confirmed steps have vendor documentation. The full workflow still needs testing.

Stages

- #### [Railway](https://ionbin.com/tools/railway/)
  Deploys the service and volume
  The CLI’s local MCP server adds deploy_template, create_volume and get_logs tools; with OAuth you choose which workspaces and projects the client can reach.
  MCPConfirmed[Source ↗](https://docs.railway.com/ai/mcp-server)

- #### [n8n](https://ionbin.com/tools/n8n/)
  Runs workflows; can expose them as MCP tools
  MCPConfirmed[Source ↗](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger)

- #### You
  Set authentication, secrets and backups before connecting agents
  Human stepConfirmed

#### Human approval

You own access controls and backups.

#### Watch out for

Keep the human approval step: You own access controls and backups.

### Compare options

**For preparing automation-service deployment configuration.**

Coding tools are not hosts; test runtime, secrets and recovery separately. Choose one for implementing and reviewing code changes; switching may need setup changes.

Unpaid picks. No partnership with [OpenAI Codex](https://ionbin.com/tools/openai-codex/), Cursor, [Google Antigravity](https://ionbin.com/tools/google-antigravity/).

- Primary pick
  #### [OpenAI Codex](https://ionbin.com/tools/openai-codex/)
   Used by Ion
  **Why it fits:** A coding workspace supports edits, tests and reviewable repository changes.
  **Tradeoff:** A development environment and capable reviewer remain necessary.
  When to choose it
  Choose it when the result should be a small patch with test evidence.
  [Review and sources](https://ionbin.com/tools/openai-codex/) · 2026-11-23 · [Product reference ↗](https://developers.openai.com/codex)

- Second option
  #### [Cursor](https://ionbin.com/tools/cursor/)
  **Why it fits:** An AI code editor keeps implementation close to interactive developer review.
  **Tradeoff:** The team must work with code; model availability depends on the plan.
  When to choose it
  Prefer it when a developer wants to steer changes while navigating the editor.
  [Review and sources](https://ionbin.com/tools/cursor/) · 2026-10-21 · [Product reference ↗](https://cursor.com/)

- Third option
  #### [Google Antigravity](https://ionbin.com/tools/google-antigravity/)
  **Why it fits:** Development-agent surfaces offer another route for code and tool-assisted implementation.
  **Tradeoff:** Capabilities differ across desktop, CLI and other surfaces.
  When to choose it
  Prefer it when the team already uses its environment and can validate the needed tools.
  [Review and sources](https://ionbin.com/tools/google-antigravity/) · 2026-10-18 · [Product reference ↗](https://antigravity.google/)

How this shortlist was chosen

Rank reflects editorial judgment for this role. Used by Ion records personal use separately. Vendors did not pay for, request or approve these positions.

Inspectable file changes come before editor convenience.

**Setup and portability:** Use scoped repositories, tests and human review. Switching agents does not migrate settings, credentials or model access.

Documentation reviewed 2026-10-21. Check current plan terms and test the pairing for your setup.

See [our review method](https://ionbin.com/editorial-policy/), [MCP connections](https://ionbin.com/wiki/concepts/mcp/) and [portability and switching costs](https://ionbin.com/wiki/questions/how-to-avoid-ai-vendor-lock-in/).

### Starter prompt

```
Goal: Own your automation and agent tools without managing servers by hand. Tools involved: Railway, n8n. I will set authentication, secrets and backups before connecting agents. Work step by step, show me each draft or proposed change, and wait for my approval before anything is sent, published, signed, filed or changed in a live system.
```

Review and adapt the prompt before use.

### Tools in this workflow

**Connections** · MCP

| Tool | Role | Official site |
| --- | --- | --- |
| [Railway](https://ionbin.com/tools/railway/) | MCP | [railway.com ↗](https://railway.com/) |
| [n8n](https://ionbin.com/tools/n8n/) | MCP | [n8n.io ↗](https://n8n.io/) |

### AI platform fit

| Platform | Status | Why |
| --- | --- | --- |
| [Claude (incl. Claude Code)](https://ionbin.com/platforms/claude/) | To verify | [Railway](https://ionbin.com/tools/railway/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it |
| [OpenAI Codex](https://ionbin.com/platforms/codex/) | To verify | [Railway](https://ionbin.com/tools/railway/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it |
| [Google Antigravity](https://ionbin.com/platforms/antigravity/) | To verify | [Railway](https://ionbin.com/tools/railway/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it |
| [ChatGPT](https://ionbin.com/tools/chatgpt/) | To verify | [Railway](https://ionbin.com/tools/railway/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it |
| Gemini | To verify | [Railway](https://ionbin.com/tools/railway/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it |
| [Perplexity](https://ionbin.com/tools/perplexity/) | To verify | [Railway](https://ionbin.com/tools/railway/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it |

What the platform statuses mean

**Confirmed** means documented access meets the requirements. **Inferred** means the pairing is plausible and needs a test. **To verify** marks an unresolved step or connection. Check authentication, permissions and supported actions for each route.

### What we checked

- **[Railway](https://ionbin.com/tools/railway/) MCP.** [Railway](https://ionbin.com/tools/railway/) runs a remote MCP server and a local one through its CLI. The local server’s tools include search_templates, deploy_template, create_volume and get_logs. With OAuth, you choose which workspaces and projects the client can access, tokens are short-lived, and you can revoke them in your [Railway](https://ionbin.com/tools/railway/) account settings.

- **[n8n](https://ionbin.com/tools/n8n/) on [Railway](https://ionbin.com/tools/railway/).** [Railway](https://ionbin.com/tools/railway/)’s [n8n](https://ionbin.com/tools/n8n/) template page is community-published and pairs [n8n](https://ionbin.com/tools/n8n/) with a Postgres database and volumes. [Railway](https://ionbin.com/tools/railway/) also lists an [n8n](https://ionbin.com/tools/n8n/) template with queue workers.

- **[n8n](https://ionbin.com/tools/n8n/) MCP Server Trigger** exposes connected tool nodes over HTTP/SSE; it does not execute arbitrary downstream nodes. Use a Call [n8n](https://ionbin.com/tools/n8n/) Workflow Tool to expose a complete workflow. Configure Bearer or header authentication before remote use; stdio is not supported.

- **Costs.** [Railway](https://ionbin.com/tools/railway/) bills by usage. Its Hobby plan has a $5 monthly minimum that includes $5 of usage ([Railway](https://ionbin.com/tools/railway/) pricing page, checked 2026-10-17).

- **[Railway](https://ionbin.com/tools/railway/)’s own [n8n](https://ionbin.com/tools/n8n/) guide (checked 2026-10-18).** [Railway](https://ionbin.com/tools/railway/)’s docs describe a one-click [n8n](https://ionbin.com/tools/n8n/) template, plus a manual path from the `n8nio/n8n` Docker image with a volume and a webhook URL. For agent-designed workflows, the community [n8n](https://ionbin.com/tools/n8n/)-MCP server gives an AI client node documentation; review each workflow before you activate it.

### Set it up

- Inspect the template, image version, services and costs before deployment. Create the owner account, configure TLS and webhook URLs, and keep database connections private.

- Turn on authentication for every MCP Server Trigger.

- Back up the database and required encryption-key configuration securely; test a restore before relying on it. A deployed volume alone is not a tested backup.

- Test one narrow tool with a permitted client, then review execution logs and failure behavior. Configure updates, spending alerts and an owner for ongoing maintenance.

### Sources

- [Railway MCP server](https://docs.railway.com/ai/mcp-server) · [Railway](https://ionbin.com/tools/railway/) · official · accessed 2026-10-18

- [MCP Server Trigger node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger) · [n8n](https://ionbin.com/tools/n8n/) · official · accessed 2026-10-18

- [Deploy and host n8n](https://railway.com/deploy/n8n) · [Railway](https://ionbin.com/tools/railway/) · official · accessed 2026-10-17

- [Pricing](https://railway.com/pricing) · [Railway](https://ionbin.com/tools/railway/) · official · accessed 2026-10-17

- [Self-host n8n on Railway](https://docs.railway.com/guides/n8n) · [Railway](https://ionbin.com/tools/railway/) · official · accessed 2026-10-18

- [n8n-MCP](https://github.com/czlonkowski/n8n-mcp) · czlonkowski · reference · accessed 2026-10-18

### Related workflows

[Give your AI a small database of your own context on Railway](https://ionbin.com/workflows/personal-context-database-on-railway/)

No affiliate links on this page. No paid placements in workflows. [How IonBin makes money](https://ionbin.com/disclosure/).
