From 9bbf6f9329f271c19bcf498af7e1010f0ef99ab6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Jul 2026 05:52:09 +0000 Subject: [PATCH 1/3] Add project-scoped Railway MCP server config Registers the Railway MCP server (railway mcp via npx @railway/cli) in .mcp.json so Claude Code sessions pick it up automatically. Requires RAILWAY_API_TOKEN (or railway login) at runtime for the server to start. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_016UrrzgrBtQRXvshDhvz3Hs --- .mcp.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .mcp.json diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 000000000..9c08f6927 --- /dev/null +++ b/.mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "railway": { + "command": "npx", + "args": ["-y", "@railway/cli", "mcp"] + } + } +} From 2d02b5f6cd816668fb5dc4a6fe7eab8c41426193 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Jul 2026 05:58:54 +0000 Subject: [PATCH 2/3] Pin @railway/cli to 5.27.0 in MCP config Addresses review: unpinned npx would fetch the latest CLI from npm at runtime. Pin to the version verified against the MCP handshake. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_016UrrzgrBtQRXvshDhvz3Hs --- .mcp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mcp.json b/.mcp.json index 9c08f6927..07b03c528 100644 --- a/.mcp.json +++ b/.mcp.json @@ -2,7 +2,7 @@ "mcpServers": { "railway": { "command": "npx", - "args": ["-y", "@railway/cli", "mcp"] + "args": ["-y", "@railway/cli@5.27.0", "mcp"] } } } From 89dd483fe534d97964331057107b0b7e41ea5e82 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Jul 2026 07:02:28 +0000 Subject: [PATCH 3/3] Add Railway project safety section to AGENTS.md Documents the canonical repo-to-Railway link (project Database, 5deaad0b-675a-4c13-978e-5ca2b5b877f9, psychiatry.tools) in the agent-loaded instructions, mirroring the Supabase project safety section: stale clinical-kb project warning, token conventions, and the provider confirmation boundary for deploys. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_016UrrzgrBtQRXvshDhvz3Hs --- AGENTS.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 7f86db724..d415e45b4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -185,6 +185,19 @@ When a branch or PR review completes, record the reviewed branch/ref, HEAD SHA, + + +# Railway project safety + +- This repo deploys to the live Railway project `Database` (`5deaad0b-675a-4c13-978e-5ca2b5b877f9`) in workspace `bigsimmo's Projects`. Full topology: `docs/deployment-architecture.md` §1. +- Production services `Database` (Next.js app tier, serves `https://psychiatry.tools`) and `worker` (ingestion) auto-deploy from `BigSimmo/Database` pushes to `main`; the `staging` environment runs the `app` service. +- The older Railway project `clinical-kb` (`4361c04f-dd3c-4ee9-9e97-49e4e5707b70`) is superseded with zero active deployments; treat it as stale — never `railway link` to it or deploy there. +- The similarly named Supabase project `Clinical KB Database` is the database/auth tier, not a Railway project; see "Supabase project safety" above. +- Railway CLI/MCP auth uses `RAILWAY_API_TOKEN` (personal account token; see `.env.example`). The project-scoped `RAILWAY_TOKEN` is for CI deploys only and cannot list or link projects. The project-scoped Railway MCP server is registered in `.mcp.json`. +- Railway deploys and mutations fall under the "API and provider confirmation boundary" below; verify target project/environment IDs before any mutation. + + + # API and provider confirmation boundary