Deploy mcpo

Open WebUI's MCP-to-OpenAPI proxy: run MCP tools as a keyed REST API

Deploy mcpo

/data

Deploy and Host mcpo on Railway

mcpo is Open WebUI's MCP-to-OpenAPI proxy. It starts MCP (Model Context Protocol) tool servers and exposes each one as a plain REST API with an OpenAPI schema and interactive docs, so Open WebUI, OpenAPI-aware agents or a simple HTTP call can use MCP tools without speaking MCP.

About Hosting mcpo

This template runs one service, mcpo, built from a public GitHub repo that pins mcpo v0.0.20 by release commit and its base images by digest. Every route, the docs included, needs a 48-character API key that Railway generates on deploy, so nothing is open to the internet. Three example MCP servers come preinstalled (time, memory, fetch), and the image has uvx and Node.js 24 npx, so most stdio MCP servers can be added by config alone. A volume at /data keeps the config, the memory graph and package caches. /healthz gates the deploy until at least one MCP server is connected. It fits the 0.5 GB Free plan (about 230 MB in use).

Common Use Cases

  • Give Open WebUI tool calling (time, web fetch, a persistent memory graph) through its OpenAPI tool-server setting
  • Turn any stdio or remote MCP server into a REST API with Swagger docs for agents, scripts or no-code tools
  • Run MCP tools for a team behind one HTTPS URL and one key instead of on every laptop

Dependencies for mcpo Hosting

  • No database or LLM key: mcpo only runs tools, and the client (for example Open WebUI) brings the model
  • One Railway volume at /data

Deployment Dependencies

Implementation Details

After deploy, copy MCPO_API_KEY from the service's Variables tab. Open https://YOUR-DOMAIN/docs and sign in with any user name and the key as password, or call a tool:

curl -X POST https://YOUR-DOMAIN/time/get_current_time \
  -H "Authorization: Bearer YOUR-KEY" -H "Content-Type: application/json" \
  -d '{"timezone":"Europe/Berlin"}'

In Open WebUI, add an OpenAPI tool server per MCP server: URL https://YOUR-DOMAIN/time (or /memory, /fetch), auth Bearer with the key.

To use your own MCP servers, add a variable MCPO_CONFIG holding an mcpo config ({"mcpServers":{...}}, Claude Desktop format; base64-encode it if Railway rejects the raw JSON) and redeploy: it replaces /data/config.json on every start. stdio servers use command/args; remote ones use "type":"streamable-http" or "sse" with url and headers. Without it, mcpo reads /data/config.json and reloads it when it changes. Docker-based MCP servers and mcpo's browser-based OAuth flow don't work on Railway; use header tokens.

Updates: the template builds from its GitHub repo, so when we bump mcpo, Railway shows an "update available" notice. Read the repo's CHANGELOG.md, then apply it; the /data volume is kept.

Why Deploy mcpo 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 mcpo 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.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

Tracklayer
1