Deploy MCP Starter
Production-wired MCP server starter on FastAPI + SQLite.
mcp-starter-railway
Just deployed
Source code: https://github.com/AdeelAhmedKhan/mcp-starter-railway
Deploy and Host MCP Starter on Railway
A production-wired MCP server starter: Python MCP SDK 2.3.0 (spec 2026-07-28) + FastAPI + a swappable notes store (SQLite by default, Postgres optional), exposed over Streamable HTTP at /mcp. One-click deploy on Railway; nothing in here is a demo stub — the tools read and write a real notes store, the resources serve real data, and anything not configured tells you so instead of crashing. Built to be molded: a ‘Make it yours’ guide shows how to add your own tools, resources, and prompts in minutes, and a fetch_json example tool shows how to wrap any external API.
About Hosting MCP Starter
Hosting MCP Starter on Railway runs a single FastAPI service built directly from the GitHub repository. Railway starts it with uvicorn app.main:app --host 0.0.0.0 --port $PORT and checks GET /api/health before a deploy completes. On startup the app creates its SQLite notes database and seeds three demo notes, so the MCP tools, resources, and prompt work immediately. No extra service is needed by default: the notes store is SQLite, with no pre-deploy command and no separate worker. Postgres is optional — add a Postgres service and set DATABASE_URL to switch the store. For persistent notes across redeploys, attach a volume at /app/data; otherwise the database lives in the container. Set MCP_ALLOWED_HOSTS and MCP_ALLOWED_ORIGINS to your exact public domain, optionally set MCP_AUTH_TOKEN for bearer auth, then generate a public domain to reach the API and the MCP endpoint.
Common Use Cases
- Give AI agents and MCP clients a notes backend over Streamable HTTP (persistent only with a Volume or Postgres)
- Prototype and test MCP tools, resources, and prompts against a live FastAPI service
- Learn MCP server patterns from a production-wired Python starter instead of a demo stub
Dependencies for MCP Starter Hosting
- Python
- FastAPI
- MCP Python SDK 2.3.0
- Uvicorn
- SQLite (built-in, default notes store; no separate database service) / Postgres (optional notes store when DATABASE_URL is set)
Implementation Details
The service starts with uvicorn app.main:app --host 0.0.0.0 --port $PORT and exposes GET /api/health plus the MCP endpoint at /mcp. Tools include add_numbers, echo, create_note, list_notes, search_notes, and fetch_json (fetch JSON from any URL); resources include notes://all and notes://{id}; the prompt is summarize-notes. Tools live in an app/tools/ package, one group per file. The notes store is SQLite by default and switches to Postgres when DATABASE_URL is set.
Why Deploy MCP Starter on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying MCP Starter on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Verified locally
Default store is SQLite and notes are lost on redeploy unless you add a Volume at /app/data or switch to Postgres (DATABASE_URL). Optional bearer-token auth (MCP_AUTH_TOKEN). 12 tests passing.
Template Content
mcp-starter-railway
AdeelAhmedKhan/mcp-starter-railway
