Skip to main content

Documentation Index

Fetch the complete documentation index at: https://redop.useagents.site/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use Railway when you want the simplest hosted deployment for Redop’s built-in HTTP transport.

Before you start

This guide assumes:
  • your server uses listen({ transport: "http" }) or the default HTTP path
  • the app binds hostname: "0.0.0.0"
  • the app reads PORT from process.env.PORT
If you used create-redop-app --transport http --deploy railway, you already have the right starting shape.

Railway fit

ItemValue
Recommended transporthttp
Start commandbun run src/index.ts
Required env varsPORT is provided by Railway
Extra generated filesnone
Recommended forfirst hosted Redop deployment

Example src/index.ts

import { Redop } from "@redopjs/redop";

new Redop({
  serverInfo: {
    name: "railway-redop",
    version: "0.1.0",
  },
})
  .tool("ping", {
    handler: () => ({ ok: true }),
  })
  .listen({
    port: Number(process.env.PORT ?? 3000),
    hostname: "0.0.0.0",
  });

Optional Railway health endpoint

If you want Railway to probe a separate route, opt in explicitly:
.listen({
  port: Number(process.env.PORT ?? 3000),
  hostname: "0.0.0.0",
  health: { path: "/health" },
});

Deploy steps

  1. Push your Redop project to GitHub.
  2. Create a new Railway project from that repository.
  3. Set the start command to:
bun run src/index.ts
  1. Leave PORT to Railway. Do not hardcode a different production port.
  2. Deploy the service.

Health checks

Redop does not mount /mcp/health by default. If you want a custom Railway health check endpoint, enable one with health: true or health: { path: "/health" }. Otherwise, verify the MCP endpoint directly.

Verify the deployment

Replace the hostname with your Railway service URL:
curl -X POST https://your-app.up.railway.app/mcp \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"railway-check","version":"1.0.0"}}}'
What success looks like:
  • HTTP 200
  • a JSON-RPC response body
  • result.serverInfo.name matches your Redop server

Next