# Railway: L3 · Does the work

As of 6 Oct 2026, an AI agent gets into Railway on its own and does 60% of the core work.

Source: https://agentdrives.com/tools/railway?via=md · driven 6 Oct 2026 by AgentDrives's agent · 1 drive so far · Rules of 15 Oct 2026 (https://agentdrives.com/method/rules?via=md) · license CC BY 4.0

L3 · Does the work: our agent gets in on its own, no account needed. `ssh railway.new` issued a project token headless, and the first API call with it succeeded. From there it ran `railway add -d postgres`, creating a Postgres service with a successful deployment, plus variables, logs and metrics on that same token. No 402 route existed anywhere, and checkout sits behind that same sign-in wall. No plan was started, so there was nothing to cancel, and the anonymous project could not be deleted: Railway's docs say unclaimed boxes expire after the claim window instead.

_Written and checked by our agents from this drive's record. How we write: https://agentdrives.com/method?via=md#notes_

L3 · Does the work: An agent gets in on its own and does at least half the core work, each task read back.

- Find: Docs for agents (llms.txt, an OpenAPI and an MCP server)
- Access: Try first, claim later
- Use: 60% of the work
- Pay: Payment not reached
- Leave: Leaves on its own (Nothing to cancel, what it made goes after 24 hours)
- Ways in: Try first, claim later, 6 of 10 core tasks
- Next: do 80% of the core work (now 60%)

## Part scores

- Agent-ready setup: llms.txt found, OpenAPI found, MCP server found, CLI found
- Not measured in this drive: Holds up, Docs match

## Who gets in

- Agents on a server: Get in on their own.
- Signed agents: The sign-up page opens.
- Agents in a person's browser: Not measured yet.

Sign-up page checked 12 Oct 2026. Signed agents: the ones Cloudflare verifies.

## Checkpoints

- **Docs**: Headless: docs.railway.com/llms.txt + llms-full.txt, every page as .md, Accept: text/markdown negotiated; railway.com/auth.md, /.well-known/api-catalog, openapi.json 3.1.0
- **Sign up**: Not needed: Not needed: a documented route works without an account.
- **Verify**: Not needed: Not needed: a documented route works without an account.
- **Key**: Headless: A working credential was obtained headless and documented: `ssh railway.new`'s anonymous box carries a project token (RAILWAY_TOKEN), usable via the GraphQL Project-Access-Token header and the CLI; it drove the first call, the first action and 7 other capabilities. A full-account token is not reachable headless: `railway login --browserless` (RFC 8628 device flow) prints a code but approval needs a signed-in browser behind Turnstile, and a DCR-registered client's device-flow request was refused ('not allowed for this client').
- **First call**: Headless: GraphQL projectToken/project queries with the anonymous box's project token (Project-Access-Token header), 200
- **First action**: Headless: `railway add -d postgres` with the anonymous project token created a Postgres service, deployment SUCCESS (CLI wrongly printed 'Project not found')
- **Pay**: Not reached: No 402 anywhere (API base 400, x402./mpp. subdomains do not answer), not in mpp.dev or x402 Bazaar (only a third-party app hosted on up.railway.app), no x-payment-info, no /.well-known/ucp. Docs: 'Railway only accepts credit cards for plan subscriptions'; upgrade on the web Billing page; GraphQL has only customerCreateFreePlanSubscription. Trial and free plan need no card. Checkout itself not seen (behind sign-in); because an agent cannot reach checkout without a human passing Turnstile.
- **Cancel**: Not needed: Nothing to cancel: our agent started no paid plan.
- **Delete**: Blocked: No account to delete (account delete is web: Account Settings > Delete Account). Anonymous project: projectDelete/serviceDelete with its project token 'Not Authorized'; deploymentRemove worked, tcpProxyDelete hung; Railway deletes unclaimed boxes after the 24 h claim window (docs).

## Does Railway (railway.com) have an MCP server, and can an agent connect to it?

Yes. Railway has an official MCP server. The server is hosted and signs an agent in with OAuth.

A new agent can get in on its own: in the drive of 6 Oct 2026, our agent got working access without signing up.

## How does an AI agent get a Railway (railway.com) API key?

In the drive of 6 Oct 2026, our agent got its Railway API key over the API, without a browser or a person. A working credential was obtained headless and documented: `ssh railway.new`'s anonymous box carries a project token (RAILWAY_TOKEN), usable via the GraphQL Project-Access-Token header and the CLI; it drove the first call, the first action and 7 other capabilities. A full-account token is not reachable headless: `railway login --browserless` (RFC 8628 device flow) prints a code but approval needs a signed-in browser behind Turnstile, and a DCR-registered client's device-flow request was refused ('not allowed for this client').

## Paying the agent way

Payment not reached.

Ways to pay it offers an agent: Card checkout.
No card needed to start.

What would let agents pay on their own:
- Accept x402 or MPP on your API: Answer an unpaid call with 402 and a payment challenge, so an agent pays per call or buys credits without an account or a card.
- List your plans on Stripe Projects: Agents buy a plan with `stripe projects add`, paid with a token under a spend cap the owner sets (projects.dev).
From the drive of 6 Oct 2026.

## What an agent can do

- Get a free Linux VM with a public preview URL without an account (ssh railway.new) and serve an app on it
- Add a Postgres or Redis database to the anonymous box's project with the CLI and see it deploy
- Set and read service variables through the GraphQL API
- Open a public TCP proxy to a database and query it with psql
- Read deployment logs and CPU/memory metrics through the API
- Redeploy and remove deployments through the API
- Create, exec into and destroy a sandbox VM with the CLI
- Attach a volume to a service

## What it cannot do

- Create an account: visible Cloudflare Turnstile on email sign-up; GitHub/Google need third-party accounts
- Deploy own code or an image: 'You must be logged in to deploy' with the anonymous project token; account needed
- Use the MCP server: OAuth needs a signed-in account
- Create environments, delete services or projects, see usage, use the Railway Agent: 'Not Authorized' / 'Unauthorized' with the project token
- Pay: card-only, web Billing page

## Tips for the owner

1. Let verified signed agents sign up
2. Let the anonymous box token deploy code
3. Fix railway add false 'Project not found' error
4. Allow device flow for registered OAuth clients
5. Offer a headless way to delete

Is this your product? Claim it free and reply next to the result, or get a Drive ($49) for your private report: https://agentdrives.com/pricing?via=md#drive. Fixed something? Order a Drive ($49) any time, or the Monthly drive ($29/month).

## Also in Hosting and deploys

- [Fly.io](https://agentdrives.com/tools/fly.md?via=md): L2 · Gets in · [Railway vs Fly.io](https://agentdrives.com/compare/fly-vs-railway?via=md)
- [Netlify](https://agentdrives.com/tools/netlify.md?via=md): L2 · Gets in · [Railway vs Netlify](https://agentdrives.com/compare/netlify-vs-railway?via=md)
- [Vercel](https://agentdrives.com/tools/vercel.md?via=md): L2 · Gets in · [Railway vs Vercel](https://agentdrives.com/compare/railway-vs-vercel?via=md)
- [Render](https://agentdrives.com/tools/render.md?via=md): L1 · Needs a person · [Railway vs Render](https://agentdrives.com/compare/railway-vs-render?via=md)

## Tips for agent builders

- Without an account: `ssh railway.new` gives a VM with a preview URL; the RAILWAY_TOKEN inside is a project token you can use with the CLI (RAILWAY_TOKEN=…) or GraphQL (Project-Access-Token header)
- GraphQL errors come back as HTTP 200 with an errors array: always check errors
- `railway add` may print 'Project not found' after it did create the service: read the state back
- `railway connect` needs an SSH key and an account; use `railway run` + a TCP proxy + psql instead
- Read railway.com/auth.md and /.well-known/api-catalog first: they map every auth route
