# 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.

- [01**Railway**](https://ionbin.com/workflows/host-n8n-or-an-mcp-server/#workflow-step-1)

- [02**n8n**](https://ionbin.com/workflows/host-n8n-or-an-mcp-server/#workflow-step-2)

- [03**You**](https://ionbin.com/workflows/host-n8n-or-an-mcp-server/#workflow-step-3)

Recipe context

Deploy [n8n](https://ionbin.com/tools/n8n/) or a custom MCP server on [Railway](https://ionbin.com/tools/railway/) from a template or repository, protect it with authentication, and connect it to your AI platform.

**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/).

Editorial shortlist

### Compare your 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.

**Used by Ion** · separate from rank.

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

- 1 · Primary / high
  #### [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.
  Choose it when the result should be a small patch with test evidence.
  Evidence for OpenAI Codex
  The linked [IonBin review](https://ionbin.com/tools/openai-codex/) records capabilities, access limits and source links. Review date: 2026-10-18. [Primary product reference ↗](https://developers.openai.com/codex)

- 2 · Secondary / medium
  #### [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.
  Prefer it when a developer wants to steer changes while navigating the editor.
  Evidence for Cursor
  The linked [IonBin review](https://ionbin.com/tools/cursor/) records capabilities, access limits and source links. Review date: 2026-10-21. [Primary product reference ↗](https://cursor.com/)

- 3 · Third / lower
  #### [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.
  Prefer it when the team already uses its environment and can validate the needed tools.
  Evidence for Google Antigravity
  The linked [IonBin review](https://ionbin.com/tools/google-antigravity/) records capabilities, access limits and source links. Review date: 2026-10-18. [Primary product reference ↗](https://antigravity.google/)

How this shortlist was chosen

Editorial judgment, not a personal-use endorsement or performance score. These are alternatives for the named role, not three required stack components. Vendors did not pay for, request or approve these positions.

Inspectable file changes come before editor convenience. A lower-ranked option may fit your constraints better; compare the conditions stated on each card before choosing.

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

Reviewed 2026-10-21. This page applies a shared comparison for “implementing and reviewing code changes” to the stated task and constraints. It is documentation-based editorial guidance, not three new hands-on tests. We weigh value for the job, distinct capabilities, replacement limits, technical effort and interoperability. Check current plan terms before adopting or switching.

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/).

**Connects through:** MCP

### Steps

Follow the handoff

Select a stage or scroll the steps.

- #### [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

Confirmed = vendor-documented, not Ion-tested. Human and AI-platform steps are proposed roles.

Human approval

You own access controls and backups.

Watch out for

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

### 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.
```

Assembled from this page’s goal and steps. Paste it into your AI platform and adjust it to your situation.

### Tools in this workflow

| 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/) |

### Which AI platforms can run it

| 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:** documented access meets the recorded requirements. **Inferred:** a reviewed note describes a plausible, untested pairing. **To verify:** a connection or step is unresolved. MCP and API pairings need route-specific evidence; a plugin, CLI or API alone does not prove compatible access, credentials or permissions. These are documentation assessments, not IonBin runtime tests.

### 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/).
