GuideNov 2026
Self-hosted MCP gateway, the practical guide
One MCP endpoint on your own computer or server, in front of every account, skill and memory your agents use.
What an MCP gateway does
Without a gateway, every agent connects to every MCP server on its own. Each server sends its full tool list at connect, and you log into Linear once per agent.
A gateway sits in the middle. Agents connect once, it holds the credentials, and instead of 125 tool schemas it exposes a few tools to search and call them on demand.
Context your agent pays for at connect, 11 servers · benchmark
Why self-host it
- Tokens stay with youOAuth tokens and API keys live on your server, encrypted with AES-256-GCM.
- No per-seat priceNo call limits and no plan to outgrow. MIT and free.
- Local firstRuns on 127.0.0.1 as a desktop app, or on any server with Docker.
- Every call auditedOne log for every agent, one key per agent.
- Code you can readBun, Hono and SQLite in one repository.
- Starts with your setupImports what Claude Code, Codex, Cursor and Grok already have.
What to check before picking one
- One-click OAuth for the apps you use, plus remote MCP, local MCP and OpenAPI specs.
- A small context cost at connect, with tool schemas loaded only when needed.
- Encryption at rest, and protection against requests to private addresses.
- A separate key per agent, so a leaked key is one revoke away.
- A way to import what your agents already have instead of starting from zero.
Run runelay in a minute
Install the server
On any machine with Docker. It prints a first-access link to create the owner account.
$curl -fsSL runelay.com/install | shInstall the CLI and log in
On your computer, then approve the login code in the browser.
$curl -fsSL runelay.com/cli | sh && runelay loginBring what you have and connect
Imports MCP servers, memories, skills and instructions, then registers runelay in your agents.
$runelay migrate && runelay connect
No server? Download the desktop app for Mac, Windows or Linux. Same gateway, no Docker.
Questions
Do I need a server to self-host an MCP gateway?
No. The desktop app runs runelay on your computer at 127.0.0.1:4312. A server with Docker makes sense when you want it always on, for every machine you use.
Does runelay run a model?
No. Your agent does the thinking. runelay is where it finds tools, skills and memory.
Which agents can use it?
Any MCP client: Claude Code, Codex, Cursor, Grok, Antigravity and others. They all point at the same /v1/mcp endpoint.
What if I lose RUNELAY_SECRET?
It encrypts connections, OAuth tokens and keys. Without it you reconnect everything, so back up ~/runelay/.env.