Deploy ContextForge

IBM ContextForge 1.0 MCP gateway and registry with auth, on Postgres.

Deploy ContextForge

/var/lib/postgresql/data

Just deployed

Deploy and Host ContextForge on Railway

ContextForge is IBM's open-source gateway, registry and proxy for the Model Context Protocol. It federates many MCP servers and REST APIs behind one authenticated endpoint, groups their tools into virtual servers, and adds an admin UI, JWT and OAuth auth, teams, rate limiting, observability and plugins for agent platforms.

About Hosting ContextForge

This template deploys ContextForge v1.0.10 from the official image with a Railway Postgres database. Every endpoint requires authentication: the admin signs in with a generated password, public registration is off and cookies are secure. JWT and encryption secrets are generated at deploy time, and worker count is pinned. Private network access is allowed, so you can register MCP servers running as other Railway services by their internal address. Connect agents and IDEs to the gateway with a token. It fits the Hobby plan. Back up Postgres regularly, since it stores gateways, tools and tokens.

Common Use Cases

  • One authenticated MCP endpoint for many internal and third-party MCP servers
  • Curating tool sets for AI agents per team with virtual servers
  • Exposing REST APIs to agents as MCP tools

Dependencies for ContextForge Hosting

  • ghcr.io/ibm/mcp-context-forge:v1.0.10 (official image)
  • Railway Postgres (ghcr.io/railwayapp-templates/postgres-ssl:18) with a volume

Deployment Dependencies

Implementation Details

ServiceImageNetworkingStorage
contextforgeghcr.io/ibm/mcp-context-forge:v1.0.10public domain on 4444; privatenone (state in Postgres)
PostgresRailway Postgres 18private onlyvolume
TOKEN=$(curl -s -X POST https:///auth/email/login -H 'Content-Type: application/json' \
  -d '{"email":"admin@example.com","password":""}' | jq -r .access_token)
curl -X POST https:///gateways -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"name":"my-mcp","url":"http://my-mcp.railway.internal:3001/mcp","transport":"STREAMABLEHTTP"}'
VariableDefaultPurpose
PLATFORM_ADMIN_EMAIL / PLATFORM_ADMIN_PASSWORDadmin@example.com / generatedAdmin login (UI and API)
JWT_SECRET_KEY / AUTH_ENCRYPTION_SECRETgeneratedToken signing and secret encryption
SSRF_ALLOW_PRIVATE_NETWORKStrueAllow MCP servers on the Railway private network
GUNICORN_WORKERS2Worker processes (default scales with host CPUs)

Notes:

  • HOST=[::] is required; :: breaks the startup script's port parsing.
  • Admin UI: https:///admin.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the ContextForge project or its maintainers.

Why Deploy ContextForge 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 ContextForge 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
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
79