惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
D
Docker
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
月光博客
月光博客
S
SegmentFault 最新的问题
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI

Railway Blog

Where Railway is, and where it's going (Summer 2026) PaaS vs IaaS vs SaaS: What Each Means and Who Should Pick What in 2026 The Best Continuous Deployment Tools in 2026 The Best PaaS for Multi-Region Deployments in 2026 The Best Platforms for Monorepo Deployments in 2026 Compliance Isn't a Feature, It's a Posture What is BYOC (Bring Your Own Cloud)? A Developer's Guide for 2026 The Best Managed Kubernetes Hosting in 2026 The Best Container Registries in 2026 The Vanilla Cloud Tax: What Rolling Your Own on AWS Actually Costs What is a PaaS? A Developer's Guide for 2026 The Best Cloud Observability and Logging Tools in 2026 The Best PostgreSQL Hosting for Developers in 2026 The Best Multi-Region Hosting Platforms in 2026 The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them) Incident Report: May 19, 2026- GCP Account Suspension Counting to 3 with a new builder processing 50M+ monthly builds Railway iOS preview now available via TestFlight Kill your onboarding: selling to 10,000+ new users a day Your AI wants to nuke your database. Guardrails fix that. Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI Moving Railway's Frontend Off Next.js One command deploys, there's a Stripe APP for that From registrar to deployed: buying a domain inside Railway A letter to open source builders who deserve more Networking is a black box, we used eBPF to open it Heroku Walked So Railway Can Run Security Features Your Security Team Will Love Railway Runs Open Source, Now We're Funding It Railway raises $100M Series B to unburden the builders
Railway MCP - Stateful, Serverful, Pay-per-use Infrastruc...
Mahmoud Abdelwahab · 2025-08-20 · via Railway Blog

Yes, yes we know it can feel like “Just one more MCP server, bro. I swear this one’s different…” But in all honesty, we think you’ll like what the Railway MCP server can do. 

Here’s a quick demo where we one-shot a Next.js app, deploy it, give it a domain, and then spin-up a Postgres database and a ClickHouse database.

Beyond the 0 → 1 experience, the MCP server offers a bunch of tools that coding agents can use to iterate on existing projects:

  • deploy - Deploy a service. This tool can be called more than once so coding agents can continuously apply changes.
  • deploy-template - Deploy a template from the Railway Template Library. This makes it possible to deploy arbitrarily complex collections of services and databases.
  • create-environment and link-environment for working with environments. Great for ensuring that coding agents are working in an isolated environment
  • list-variables and set-variables for configuring and pulling variables
  • get-logs - Retrieve build or deployment logs for a service. Useful for having coding agents debug deployed services.

You can find the complete list of tools as well as detailed setup instructions in the project’s README on GitHub.

In most cases, using MCP to manage infrastructure doesn’t really make sense. Infrastructure is typically complex, hard to automate, and with most providers you end up paying for resources regardless of your usage.

With Railway you can one-shot your infra and only pay for what you use.

Railway as the ideal deployment target for agents

Agents need deployment targets that are reliable, scalable, and cost-efficient. Railway checks all of these boxes.

Pricing and autoscaling

If an agent spins up resources that go idle shortly after, you don’t get stuck with a big bill. On Railway you only pay for active compute time and resources you actually use. This makes the platform ideal for for experimentation and fast iteration.

Railway’s usage-based pricing
Railway’s usage-based pricing

Additionally, all deployed services on Railway support vertical autoscaling out-of-the-box. So you don’t need to pick an instance size and pay a fixed monthly fee that doesn’t take your usage into account.

Environments

Railway enables you to spin up isolated environments. This means that coding agents can make changes to deployed resources without affecting resources in other environments. You can run multiple agents in parallel and give each one their own environment.

Environments on Railway
Environments on Railway

Bonus: Design decisions we made

We made a few design decisions along the way when building the Railway MCP Server. None of them are set in stone, but we thought it would be useful to share our reasoning and the trade-offs that led us here.

No destructive actions

This one is the most obvious one. If there are no delete-x MCP tools, the odds of the coding agent running a destructive action goes down significantly. This way, you avoid running into this situation.

Coding agent deciding to nuke a database
Coding agent deciding to nuke a database

However, coding agents can still run arbitrary CLI commands, so you should be careful.

Local MCP

MCP has a transport layer responsible for how clients and servers talk to each other and how authentication is handled. It takes care of setting up connections, framing messages, and making sure communication between MCP participants is secure.

MCP currently supports two types of transport:

  • Stdio transport: This uses standard input and output streams for communication between local processes on the same machine. It’s the fastest option since there’s no network overhead, which makes it ideal when everything is running locally.
  • Streamable HTTP transport: This uses HTTP POST for sending messages from client to server, with optional Server-Sent Events for streaming responses. It’s what enables remote servers to work and supports common HTTP authentication methods like bearer tokens, API keys, and custom headers. MCP recommends OAuth as the way to obtain these tokens.

Remote MCP servers make a lot of sense in the broader vision of MCP. In that world, any AI tool could act as a host, connect to multiple remote MCP servers, and pick the right tool for the job.

For Railway, though, most of our users are developers working inside editors like VS Code, Cursor, or Claude Code. In that context, a remote MCP server doesn’t bring much benefit.

Another limitation is authentication. Since Railway doesn’t yet support OAuth, the only way to connect to a remote MCP server would be to hardcode API tokens. That means going to the Railway dashboard, generating an API key in your account settings, and then manually adding it to your MCP config file. Not exactly a great experience.

We also haven’t come across a real use case where an MCP host only works with remote servers, nor have users asked us to integrate Railway that way. So instead, we went with a local MCP server. The Railway CLI already offers a seamless authentication flow, so setup is as simple as:

  1. Install the CLI
  2. Run railway login
  3. Install the MCP server

There’s also a nice side effect of using the CLI as a dependency. If something breaks or the agent hits an edge case, it can fall back to the same workflows a developer would use manually. Rather than getting stuck, it just calls the CLI, which makes the system more resilient and avoids frustrating dead ends.

Using the Railway CLI under the hood

Under the hood, the MCP server runs CLI commands. This approach helped us spot gaps in the experience of integrating with the CLI programmatically, which gives us valuable feedback for improving it.

import { exec } from "node:child_process";
import { promisify } from "node:util";
import { analyzeRailwayError } from "./error-handling";

const execAsync = promisify(exec);

export const runRailwayCommand = async (command: string, cwd?: string) => {
	const { stdout, stderr } = await execAsync(command, { cwd });
	return { stdout, stderr, output: stdout + stderr };
};

export const checkRailwayCliStatus = async (): Promise<void> => {
	try {
		await runRailwayCommand("railway --version");
		await runRailwayCommand("railway whoami");
	} catch (error: unknown) {
		return analyzeRailwayError(error, "railway whoami");
	}
};

Conclusion

We’d love to hear how you’re using the Railway MCP server and what improvements you’d like to see. Share your feedback with us on Central Station and help us shape future versions. And if you’re building an agent platform and want to use Railway to power the underlying infrastructure, we’d love to chat.