|
| 1 | +# ContextForge MCP Gateway – Frequently Asked Questions |
| 2 | + |
| 3 | +## ⚡ Quickstart |
| 4 | + |
| 5 | +???+ example "🚀 How can I install and run MCP Gateway in one command?" |
| 6 | + PyPI (pipx / uvenv makes an isolated venv): |
| 7 | + |
| 8 | + ```bash |
| 9 | + # Using pipx - pip install pipx |
| 10 | + pipx run mcp-contextforge-gateway |
| 11 | + |
| 12 | + # Or uvenv - pip install uvenv (default: admin/changeme) |
| 13 | + uvenv run mcp-contextforge-gateway --port 4444 |
| 14 | + ``` |
| 15 | + |
| 16 | + OCI image (Docker/Podman) – shares host network so localhost works: |
| 17 | + |
| 18 | + ```bash |
| 19 | + podman run --network=host -p 4444:4444 ghcr.io/ibm/mcp-context-forge:latest |
| 20 | + ``` |
| 21 | + |
| 22 | +???+ example "🗂️ What URLs are available for the admin interface and API docs?" |
| 23 | + - Admin UI → <https://localhost:4444> |
| 24 | + - Swagger → <https://localhost:4444/docs> |
| 25 | + - ReDoc → <https://localhost:4444/redoc> |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## 🤔 What is MCP (Model Context Protocol)? |
| 30 | + |
| 31 | +???+ info "💡 What is MCP in a nutshell?" |
| 32 | + MCP is an open‑source protocol released by Anthropic in Nov 2024 that lets language models invoke external tools via a typed JSON‑RPC envelope. Community folks call it "USB‑C for AI"—one connector for many models. |
| 33 | + |
| 34 | +???+ info "🌍 Who supports MCP and what's the ecosystem like?" |
| 35 | + - Supported by GitHub & Microsoft Copilot, AWS Bedrock, Google Cloud Vertex AI, IBM watsonx, AgentBee, LangChain, CrewAI and 15,000+ community servers. |
| 36 | + - Contracts enforced via JSON Schema. |
| 37 | + - Multiple transports (STDIO, SSE, HTTP) — still converging. |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## 🧰 Media Kit |
| 42 | + |
| 43 | +???+ tip "🖼️ I want to make a social media post, where can I find samples and logos?" |
| 44 | + See the provided [media kit](../media/index.md) |
| 45 | + |
| 46 | +???+ tip "📄 How do I describe the gateway in boilerplate copy?" |
| 47 | + > "ContextForge MCP Gateway is an open‑source reverse‑proxy that unifies MCP and REST tool servers under a single secure HTTPS endpoint with discovery, auth and observability baked in." |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## 🛠️ Installation & Configuration |
| 52 | + |
| 53 | +???+ example "🔧 What is the minimal .env setup required?" |
| 54 | + ```bash |
| 55 | + cp .env.example .env |
| 56 | + ``` |
| 57 | + |
| 58 | + Then edit: |
| 59 | + |
| 60 | + ```env |
| 61 | + BASIC_AUTH_USER=admin |
| 62 | + BASIC_AUTH_PASSWORD=changeme |
| 63 | + JWT_SECRET_KEY=my-test-key |
| 64 | + ``` |
| 65 | + |
| 66 | +???+ example "🪛 What are some advanced environment variables I can configure?" |
| 67 | + - Basic: `HOST`, `PORT`, `APP_ROOT_PATH` |
| 68 | + - Auth: `AUTH_REQUIRED`, `BASIC_AUTH_*`, `JWT_SECRET_KEY` |
| 69 | + - Logging: `LOG_LEVEL`, `LOG_FORMAT`, `LOG_FILE` |
| 70 | + - Transport: `TRANSPORT_TYPE`, `WEBSOCKET_PING_INTERVAL`, `SSE_RETRY_TIMEOUT` |
| 71 | + - Tools: `TOOL_TIMEOUT`, `MAX_TOOL_RETRIES`, `TOOL_RATE_LIMIT`, `TOOL_CONCURRENT_LIMIT` |
| 72 | + - Federation: `FEDERATION_ENABLED`, `FEDERATION_PEERS`, `FEDERATION_SYNC_INTERVAL` |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## 🚀 Running & Deployment |
| 77 | + |
| 78 | +???+ example "🏠 How do I run MCP Gateway locally using PyPI?" |
| 79 | + ```bash |
| 80 | + python -m venv .venv && source .venv/bin/activate |
| 81 | + pip install mcp-contextforge-gateway |
| 82 | + mcpgateway |
| 83 | + ``` |
| 84 | + |
| 85 | +???+ example "🐳 How do I use the provided Makefile and Docker/Podman setup?" |
| 86 | + ```bash |
| 87 | + make podman # or make docker |
| 88 | + make podman-run-ssl # or make docker-run-ssl |
| 89 | + make podman-run-ssl-host # or make docker-run-ssl-host |
| 90 | + ``` |
| 91 | + |
| 92 | + Docker Compose is also available, ex: `make compose-up`. |
| 93 | + |
| 94 | +???+ example "☁️ How can I deploy MCP Gateway on Google Cloud Run, Code Engine, Kubernetes, AWS, etc?" |
| 95 | + See the [Deployment Documentation](../deployment/index.md) for detailed deployment instructions across local, docker, podman, compose, AWS, Azure, GCP, IBM Cloud, Helm, Minikube, Kubernetes, OpenShift and more. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## 💾 Databases & Persistence |
| 100 | + |
| 101 | +???+ info "🗄️ What databases are supported for persistence?" |
| 102 | + - SQLite (default) - used for development / small deployments. |
| 103 | + - PostgreSQL / MySQL / MariaDB via `DATABASE_URL` |
| 104 | + - Redis (optional) for high performance session management. Sessions can also be stored in the DB or memory. |
| 105 | + - Other databases supported by SQLAlchemy. |
| 106 | + |
| 107 | +???+ info "📦 How do I persist SQLite across container restarts?" |
| 108 | + Include a persistent volume with your container or Kubernetes deployment. Ex: |
| 109 | + |
| 110 | + ```bash |
| 111 | + docker run -v $(pwd)/data:/app ghcr.io/ibm/mcp-context-forge:latest |
| 112 | + ``` |
| 113 | + |
| 114 | + For production use, we recommend PostgreSQL. A Docker Compose target with PostgreSQL and Redis is provided. |
| 115 | + |
| 116 | +--- |
| 117 | + |
| 118 | +## 🔐 Security & Auth |
| 119 | + |
| 120 | +???+ danger "🆓 How do I disable authentication for development?" |
| 121 | + Set `AUTH_REQUIRED=false` — disables login for local testing. |
| 122 | + |
| 123 | +???+ example "🔑 How do I generate and use a JWT token?" |
| 124 | + ```bash |
| 125 | + export MCPGATEWAY_BEARER_TOKEN=$(python -m mcpgateway.utils.create_jwt_token -u admin -exp 0 --secret my-test-key) |
| 126 | + curl -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" https://localhost:4444/tools |
| 127 | + ``` |
| 128 | + |
| 129 | + The token is used for all API interactions and can be configured to expire using `-exp`. |
| 130 | + |
| 131 | +???+ example "🛡️ How do I enable TLS and configure CORS?" |
| 132 | + - Use `make podman-run-ssl` for self-signed certs or drop your own certificate under `certs`. |
| 133 | + - Set `ALLOWED_ORIGINS` or `CORS_ENABLED` for CORS headers. |
| 134 | + |
| 135 | +--- |
| 136 | + |
| 137 | +## 📡 Tools, Servers & Federation |
| 138 | + |
| 139 | +???+ example "➕ How do I register a tool with the gateway?" |
| 140 | + ```bash |
| 141 | + curl -X POST -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \\ |
| 142 | + -H "Content-Type: application/json" \\ |
| 143 | + -d '{"name":"clock_tool","url":"http://localhost:9000/rpc","input_schema":{"type":"object"}}' \\ |
| 144 | + http://localhost:4444/tools |
| 145 | + ``` |
| 146 | + |
| 147 | +???+ example "🌉 How do I add a peer MCP gateway?" |
| 148 | + A "Gateway" is another MCP Server. The MCP Gateway itself is an MCP Server. This means you can add any MCP Server under "Gateways" and it will retrieve Tools/Resources/Prompts. |
| 149 | + |
| 150 | + ```bash |
| 151 | + curl -X POST -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \\ |
| 152 | + -d '{"name":"peer","url":"http://peer:4444"}' \\ |
| 153 | + http://localhost:4444/gateways |
| 154 | + ``` |
| 155 | + |
| 156 | +???+ example "🖇️ What are virtual servers and how do I use them?" |
| 157 | + A Virtual Server is a MCP Server composed from Tools/Resources/Prompts from multiple servers. Add one or more MCP Servers under "Gateways", then select which Tools/Prompts/Resources to use to create your Virtual Server. |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +## 🏎️ Performance Tuning & Scaling |
| 162 | + |
| 163 | +???+ example "⚙️ What environment variables affect performance?" |
| 164 | + - `TOOL_CONCURRENT_LIMIT` |
| 165 | + - `TOOL_RATE_LIMIT` |
| 166 | + - `WEBSOCKET_PING_INTERVAL` |
| 167 | + - `SSE_RETRY_TIMEOUT` |
| 168 | + |
| 169 | +???+ example "🧵 How do I scale the number of worker processes?" |
| 170 | + - `GUNICORN_WORKERS` (for Gunicorn) |
| 171 | + - `UVICORN_WORKERS` (for Uvicorn) |
| 172 | + |
| 173 | +???+ example "📊 How can I benchmark performance?" |
| 174 | + Use `ab` or `wrk` against `/health` to measure raw latency. |
| 175 | + Check out the detail performance testing harness under `tests/hey`. |
| 176 | + |
| 177 | +--- |
| 178 | + |
| 179 | +## 📈 Observability & Logging |
| 180 | + |
| 181 | +???+ example "🔍 What metrics are available?" |
| 182 | + - Prometheus-style `/metrics` endpoint |
| 183 | + - Tool/server/prompt stats via Admin UI |
| 184 | + |
| 185 | +???+ example "📜 What log formats are supported?" |
| 186 | + - `LOG_FORMAT=json` or `text` |
| 187 | + - Adjust with `LOG_LEVEL` |
| 188 | + |
| 189 | +--- |
| 190 | + |
| 191 | +## 🧪 Smoke Tests & Troubleshooting |
| 192 | + |
| 193 | +???+ example "🛫 Is there a full test script I can run?" |
| 194 | + Yes — see `docs/basic.md`. |
| 195 | + |
| 196 | +???+ example "🚨 What common errors should I watch for?" |
| 197 | + | Symptom | Resolution | |
| 198 | + |-----------------------|----------------------------------------| |
| 199 | + | 401 Unauthorized | Refresh token / check Authorization | |
| 200 | + | database is locked | Use Postgres / increase DB_POOL_SIZE | |
| 201 | + | already exists errors | Use *Show inactive* toggle in UI | |
| 202 | + | SSE drops every 30 s | Raise `SSE_RETRY_TIMEOUT` | |
| 203 | + |
| 204 | +--- |
| 205 | + |
| 206 | +## 💻 Integration Recipes |
| 207 | + |
| 208 | +???+ example "🦜 How do I use MCP Gateway with LangChain?" |
| 209 | + ```python |
| 210 | + from langchain.tools import MCPTool |
| 211 | + tool = MCPTool(endpoint="https://localhost:4444/json-rpc", |
| 212 | + token=os.environ["MCPGATEWAY_BEARER_TOKEN"]) |
| 213 | + ``` |
| 214 | + |
| 215 | +???+ example "🦾 How do I connect GitHub's mcp-server-git via SuperGateway?" |
| 216 | + ```bash |
| 217 | + npx -y supergateway --stdio "uvx run mcp-server-git" |
| 218 | + ``` |
| 219 | + |
| 220 | +--- |
| 221 | + |
| 222 | +## 🗺️ Roadmap |
| 223 | + |
| 224 | +???+ info "🧭 What features are planned for future versions?" |
| 225 | + - 🔐 OAuth2 client-credentials upstream auth with full spec compliance |
| 226 | + - [🌙 Dark-mode UI](https://github.com/IBM/mcp-context-forge/issues/26) |
| 227 | + - [🧾 Add "Version and Environment Info" tab to Admin UI](https://github.com/IBM/mcp-context-forge/issues/25) |
| 228 | + - 🔒 Fine-grained role-based access control (RBAC) for Admin UI and API routes and per-virtual-server API keys |
| 229 | + - 📦 Marketplace-style tool catalog with categories, tags, and search |
| 230 | + - 🔁 Support for long-running / async tool executions with polling endpoints |
| 231 | + - 📂 UI-driven prompt and resource file management (upload/edit from browser) |
| 232 | + - 🛠️ Visual "tool builder" UI to design new tools with schema and auth interactively |
| 233 | + - 🧪 Auto-validation tests for registered tools (contract + mock invocation) |
| 234 | + - 🚨 Event subscription framework: trigger hooks or alerts on Gateway changes |
| 235 | + - 🧵 Real-time tool logs and debug traces in Admin UI |
| 236 | + - 🧠 Adaptive routing based on tool health, model, or load |
| 237 | + - 🔍 Filterable tool invocation history with replay support |
| 238 | + - 📡 Plugin-based architecture for custom transports or auth methods |
| 239 | + |
| 240 | + [Check out the Feature issues](https://github.com/IBM/mcp-context-forge/issues?q=is%3Aissue%20state%3Aopen%20label%3Aenhancement) tagged `enhancement` on GitHub for more upcoming features! |
| 241 | + |
| 242 | +--- |
| 243 | + |
| 244 | +## ❓ Rarely Asked Questions (RAQ) |
| 245 | + |
| 246 | +???+ example "🐙 Does MCP Gateway work on a Raspberry Pi?" |
| 247 | + Yes — build as `arm64` and reduce RAM/workers. |
| 248 | + |
| 249 | +--- |
| 250 | + |
| 251 | +## 🤝 Contributing & Community |
| 252 | + |
| 253 | +???+ tip "👩💻 How can I file issues or contribute?" |
| 254 | + Use [GitHub Issues](https://github.com/IBM/mcp-context-forge/issues) and `CONTRIBUTING.md`. |
| 255 | + |
| 256 | +???+ tip "🧑🎓 What code style and CI tools are used?" |
| 257 | + - Pre-commit: `ruff`, `black`, `mypy`, `isort` |
| 258 | + - Run `make lint` before PRs |
| 259 | + |
| 260 | +???+ tip "💬 Where can I chat or ask questions?" |
| 261 | + Join the [GitHub Discussions board](https://github.com/IBM/mcp-context-forge/discussions). |
| 262 | + |
| 263 | +--- |
| 264 | + |
| 265 | +### 🙋 Need more help? |
| 266 | + |
| 267 | +Open an [Issue](https://github.com/IBM/mcp-context-forge/issues) or [discussion](https://github.com/IBM/mcp-context-forge/discussions) on GitHub. |
0 commit comments