# Give your AI a small database of your own context on Railway

> Run Postgres and n8n on Railway, let a compatible AI client propose one table at a time through a Postgres MCP server, and use n8n to keep it filled from

Canonical page: https://ionbin.com/workflows/personal-context-database-on-railway/
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.

## Give your AI a small database of your own context on Railway

[Ops](https://ionbin.com/use-cases/ops-admin-automation/) · [Context](https://ionbin.com/use-cases/personal-ai-context/)Checked 2026-10-21

Let your assistant answer from your own tasks, decisions and notes instead of guessing.

- [01**You**](https://ionbin.com/workflows/personal-context-database-on-railway/#workflow-step-1)

- [02**Railway**](https://ionbin.com/workflows/personal-context-database-on-railway/#workflow-step-2)

- [03**Railway**](https://ionbin.com/workflows/personal-context-database-on-railway/#workflow-step-3)

- [04**Your AI platform**](https://ionbin.com/workflows/personal-context-database-on-railway/#workflow-step-4)

- [05**You**](https://ionbin.com/workflows/personal-context-database-on-railway/#workflow-step-5)

- [06**n8n**](https://ionbin.com/workflows/personal-context-database-on-railway/#workflow-step-6)

Recipe context

Run Postgres and [n8n](https://ionbin.com/tools/n8n/) on [Railway](https://ionbin.com/tools/railway/), let a compatible AI client propose one table at a time through a Postgres MCP server, and use [n8n](https://ionbin.com/tools/n8n/) to keep it filled from the apps you already use. You approve every schema before it is created.

**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 implementing a scoped context store.**

Coding environments are not databases; hosting and credential controls remain separate. 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/).

Notes and context

### Capture it. Keep it useful.

Companion tools for notes and storage. The blue plus marks confirmed Ion use.

- Top pick
  #### [Notion](https://ionbin.com/tools/notion/)
   Used by Ion
  Ion’s top pick for hosting personal context without running a database: pages and databases that AI clients read through [Notion](https://ionbin.com/tools/notion/)’s hosted MCP server.
  **Tradeoff:** Cloud workspace: a connected AI client reaches whatever the connected user can open. [Notion](https://ionbin.com/tools/notion/) Agent, AI Meeting Notes and full MCP search need Business or Enterprise.
  Selection evidence for Notion
  Ion editorial selection by IonBin’s founder, confirmed 2026-10-21: [Notion](https://ionbin.com/tools/notion/) and [Obsidian](https://ionbin.com/tools/obsidian/) are the top options for organizing notes and hosting context. Not sponsored; no vendor partnership. Capabilities are described on the linked tool pages.

- Top pick
  #### [Obsidian](https://ionbin.com/tools/obsidian/)
  Ion’s top pick for keeping the same context as local Markdown files that an agent reads directly.
  **Tradeoff:** A desktop and mobile app, not a shared browser editor. No official MCP server; the CLI needs the app running, and Sync is a paid add-on.
  Selection evidence for Obsidian
  Ion editorial selection by IonBin’s founder, confirmed 2026-10-21: [Notion](https://ionbin.com/tools/notion/) and [Obsidian](https://ionbin.com/tools/obsidian/) are the top options for organizing notes and hosting context. Not sponsored; no vendor partnership. Capabilities are described on the linked tool pages.

**Connects through:** Built-in integration · MCP · API

### Steps

Follow the handoff

Select a stage or scroll the steps.

- #### You
  List what you wish your assistant could see, then pick one table to start (tasks or decisions)
  Human stepConfirmed

- #### [Railway](https://ionbin.com/tools/railway/)
  Adds a Postgres database from + New or Cmd/Ctrl+K and exposes DATABASE_URL
  Built-in integrationConfirmed[Source ↗](https://docs.railway.com/databases/postgresql)

- #### [Railway](https://ionbin.com/tools/railway/)
  Deploys [n8n](https://ionbin.com/tools/n8n/) from a one-click template
  Built-in integrationConfirmed[Source ↗](https://docs.railway.com/guides/n8n)

- #### [Your AI platform](https://ionbin.com/tools/claude/)
  Uses a compatible local/stdio or SSE client to connect through Postgres MCP Pro and propose the table design
  Unrestricted mode allows reads and writes; restricted mode limits the server to read-only transactions.
  MCPConfirmed[Source ↗](https://github.com/crystaldba/postgres-mcp)

- #### You
  Approve the schema before anything is created
  Human stepConfirmed

- #### [n8n](https://ionbin.com/tools/n8n/)
  Syncs one source into the table on a schedule with the Postgres node
  APIConfirmed[Source ↗](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/)

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

Human approval

You approve every schema change; agents that only read get a read-only connection.

Watch out for

A database with write access is a real system. Enable backups and verify a restore, give read-only agents a restricted connection, and don't store anything you couldn't afford to leak.

### Starter prompt

```
Using the Postgres MCP connection, propose a schema for two tables: decisions (what, why, date, status) and tasks (title, due, status, linked decision). Explain each column and index. Do not create anything until I say go.
```

Written for this workflow. 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/) | Built-in integration | [railway.com ↗](https://railway.com/) |
| [n8n](https://ionbin.com/tools/n8n/) | API | [n8n.io ↗](https://n8n.io/) |
| [Claude](https://ionbin.com/tools/claude/) | MCP | [claude.ai ↗](https://claude.ai/) |

### Which AI platforms can run it

| Platform | Status | Why |
| --- | --- | --- |
| [Claude (incl. Claude Code)](https://ionbin.com/platforms/claude/) | To verify | Your AI platform: MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): verify the API caller, network access and credentials; platform code execution alone does not establish this connection |
| [OpenAI Codex](https://ionbin.com/platforms/codex/) | To verify | Your AI platform: MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): verify the API caller, network access and credentials; platform code execution alone does not establish this connection |
| [Google Antigravity](https://ionbin.com/platforms/antigravity/) | To verify | Your AI platform: MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): verify the API caller, network access and credentials; platform code execution alone does not establish this connection |
| [ChatGPT](https://ionbin.com/tools/chatgpt/) | To verify | Your AI platform: MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): verify the API caller, network access and credentials; platform code execution alone does not establish this connection |
| Gemini | To verify | Your AI platform: MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): verify the API caller, network access and credentials; platform code execution alone does not establish this connection |
| [Perplexity](https://ionbin.com/tools/perplexity/) | To verify | Your AI platform: MCP pairing needs route-specific evidence; a named plugin or CLI does not establish it; [n8n](https://ionbin.com/tools/n8n/): verify the API caller, network access and credentials; platform code execution alone does not establish this connection |

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 (2026-10-18)

- **[Railway](https://ionbin.com/tools/railway/).** You add Postgres from the Cmd/Ctrl+K menu or + New on the project canvas, and other services in the project use `DATABASE_URL`. The database is private by default. Adding public access creates a TCP proxy and a `DATABASE_PUBLIC_URL`, and egress through that proxy is billed.

- **[n8n](https://ionbin.com/tools/n8n/) on [Railway](https://ionbin.com/tools/railway/).** [Railway](https://ionbin.com/tools/railway/)’s guide covers a one-click [n8n](https://ionbin.com/tools/n8n/) template, or a manual setup from the official Docker image with a volume. [n8n](https://ionbin.com/tools/n8n/)’s Postgres node can insert, update and query rows.

- **MCP servers.** Postgres MCP Pro (Crystal DBA) has an unrestricted read/write mode and a restricted, read-only mode. [n8n](https://ionbin.com/tools/n8n/)-MCP helps an agent work with [n8n](https://ionbin.com/tools/n8n/) node documentation and design workflows. These are third-party projects, not official PostgreSQL or [n8n](https://ionbin.com/tools/n8n/) products. A star count is not evidence of reliability.

- **Connecting your assistant.** [Claude](https://ionbin.com/tools/claude/)’s custom connectors use remote MCP servers, available on [Claude](https://ionbin.com/tools/claude/), Cowork and [Claude](https://ionbin.com/tools/claude/) Desktop (Free accounts get one). Postgres MCP Pro’s documented setup uses local stdio or SSE. That does not establish a hosted [Claude](https://ionbin.com/tools/claude/) connector or support in clients that require Streamable HTTP. Keep the database private and use a compatible local client or an authenticated server deployment with private database access.

- **Alternatives.** [Supabase](https://ionbin.com/tools/supabase/) offers an official MCP server with project scoping and read-only SQL mode. Restrict feature groups too; read-only SQL is not a blanket promise that every other exposed tool has no side effects.

### Set it up

- Start with one table, and add more once you use it.

- Approve each schema in writing before the agent creates it.

- Add one sync at a time, and watch it for a week.

Credit: the idea comes from a Substack podcast episode about a personal database by creator Angus Sewell. IonBin reviewed the cited technical documentation. The assembled workflow has not been tested end to end; the inspiration link is credit, not evidence of performance.

### Verification limits and implementation checks

The page is documentation-reviewed; the complete workflow has not been run by IonBin.

- Test the selected client transport and authentication before exposing a remote server.

- Inspiration article could not be retrieved during this audit; it is not used to establish technical claims.

### Where the notes live: Ion’s top picks

A self-hosted database is the right tool when you need SQL queries or strict row-level control. For most personal context, [Notion](https://ionbin.com/tools/notion/) and [Obsidian](https://ionbin.com/tools/obsidian/) are simpler top picks: [Notion](https://ionbin.com/tools/notion/)’s hosted MCP server avoids running infrastructure, and an [Obsidian](https://ionbin.com/tools/obsidian/) vault is just a folder of Markdown files. Start there and move to this database only when you outgrow them.

[Notion](https://ionbin.com/tools/notion/) and [Obsidian](https://ionbin.com/tools/obsidian/) are editorial top picks for organizing notes and hosting context. Neither vendor sponsored or approved this page, and IonBin has no partnership with either.

### Sources

- [PostgreSQL on Railway](https://docs.railway.com/databases/postgresql) · [Railway](https://ionbin.com/tools/railway/) · official · accessed 2026-10-18

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

- [Postgres MCP Pro](https://github.com/crystaldba/postgres-mcp) · Crystal DBA · reference · accessed 2026-10-18

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

- [Postgres node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/) · [n8n](https://ionbin.com/tools/n8n/) · official · accessed 2026-10-18

- [Get started with custom connectors using remote MCP](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) · Anthropic · official · accessed 2026-10-18

- [The Database That Runs My Whole Life (inspiration)](https://angussewell.substack.com/p/your-ai-isnt-dumb-its-starving) · Angus Sewell · practitioner · accessed 2026-10-18

- [Supabase MCP](https://supabase.com/docs/guides/ai-tools/mcp) · [Supabase](https://ionbin.com/tools/supabase/) · official · accessed 2026-10-18

- [Notion MCP supported tools](https://developers.notion.com/guides/mcp/mcp-supported-tools) · [Notion](https://ionbin.com/tools/notion/) · official · accessed 2026-10-21

- [Obsidian CLI](https://obsidian.md/help/cli) · [Obsidian](https://ionbin.com/tools/obsidian/) · official · accessed 2026-10-21

- [Obsidian pricing and data storage](https://obsidian.md/pricing) · [Obsidian](https://ionbin.com/tools/obsidian/) · official · accessed 2026-10-21

### Related workflows

[Self-host n8n or your own MCP server](https://ionbin.com/workflows/host-n8n-or-an-mcp-server/)[Give agents read-only access to your notes](https://ionbin.com/workflows/read-only-brain-for-agents/)

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