|
7 | 7 |
|
8 | 8 | ```bash |
9 | 9 | # Using pipx - pip install pipx |
10 | | - pipx run mcp-contextforge-gateway |
| 10 | + pipx run --spec mcp-contextforge-gateway mcpgateway --host 0.0.0.0 --port 4444 |
11 | 11 |
|
12 | | - # Or uvx - pip install uv (default: admin/changeme) |
| 12 | + # Or uvx - pip install uv (default login: admin@example.com/changeme) |
13 | 13 | uvx --from mcp-contextforge-gateway mcpgateway --host 0.0.0.0 --port 4444 |
14 | 14 | ``` |
15 | 15 |
|
|
198 | 198 | - `SSE_RETRY_TIMEOUT` |
199 | 199 |
|
200 | 200 | ???+ example "🧵 How do I scale the number of worker processes?" |
201 | | - - `GUNICORN_WORKERS` (for Gunicorn) |
202 | | - - `UVICORN_WORKERS` (for Uvicorn) |
| 201 | + - Run `mcpgateway --workers 4` (Uvicorn CLI flag) |
| 202 | + - Set `GUNICORN_WORKERS` when using the bundled Gunicorn scripts |
203 | 203 |
|
204 | 204 | ???+ example "📊 How can I benchmark performance?" |
205 | 205 | Use `hey` against `/rpc` with sample payloads from `tests/hey`. |
|
245 | 245 |
|
246 | 246 | ???+ example "🦜 How do I use MCP Gateway with LangChain?" |
247 | 247 | ```python |
248 | | - from langchain.tools import MCPTool |
249 | | - tool = MCPTool(endpoint="http://localhost:4444/rpc", |
250 | | - token=os.environ["MCPGATEWAY_BEARER_TOKEN"]) |
| 248 | + import os |
| 249 | + from langchain_mcp_adapters.client import MultiServerMCPClient |
| 250 | + from langgraph.prebuilt import create_react_agent |
| 251 | + |
| 252 | + client = MultiServerMCPClient( |
| 253 | + { |
| 254 | + "gateway": { |
| 255 | + "url": "http://localhost:4444/mcp", |
| 256 | + "transport": "streamable_http", |
| 257 | + "headers": {"Authorization": f"Bearer {os.environ['MCPGATEWAY_BEARER_TOKEN']}"} |
| 258 | + } |
| 259 | + } |
| 260 | + ) |
| 261 | + agent = create_react_agent(tools=client.get_tools(), llm=your_language_model) |
251 | 262 | ``` |
252 | 263 |
|
253 | 264 | ???+ example "🦾 How do I connect GitHub's mcp-server-git via Translate Bridge?" |
|
257 | 268 |
|
258 | 269 | --- |
259 | 270 |
|
260 | | -## 👥 Multi‑Tenancy & Migration (v0.8.0) |
| 271 | +## 👥 Multi‑Tenancy & Migration (v0.7.0) |
261 | 272 |
|
262 | 273 | ???+ example "🔐 How do I enable email/password login and teams?" |
263 | 274 | Add the following to your `.env`: |
|
269 | 280 | AUTO_CREATE_PERSONAL_TEAMS=true |
270 | 281 | ``` |
271 | 282 |
|
272 | | - Upgrading from v0.8.0? Follow [MIGRATION-0.8.0.md](https://github.com/IBM/mcp-context-forge/blob/main/MIGRATION-0.8.0.md). |
| 283 | + Upgrading from earlier releases? Follow [MIGRATION-0.7.0.md](https://github.com/IBM/mcp-context-forge/blob/main/MIGRATION-0.7.0.md). |
273 | 284 |
|
274 | 285 | ???+ info "🔁 Does basic auth still work?" |
275 | 286 | Yes. Email auth is recommended for multi‑tenancy; basic auth remains available. Use `AUTH_REQUIRED` to enforce authentication. |
|
282 | 293 | ## 🔐 SSO & Team Mapping |
283 | 294 |
|
284 | 295 | ???+ example "👥 Can I auto‑assign users to teams via SSO?" |
285 | | - Yes. Use provider‑specific mappings to assign users on first login: |
286 | | - |
287 | | - ```bash |
288 | | - # GitHub |
289 | | - GITHUB_ORG_TEAM_MAPPING={"your-org": "team-id"} |
| 296 | + Yes. Add **Team Mapping** rules to each SSO provider (Admin UI → Manage → SSO → Provider → Team Mapping). Example JSON: |
290 | 297 |
|
291 | | - # Google Groups |
292 | | - GOOGLE_GROUPS_MAPPING={"[email protected]": "team-id"} |
293 | | - |
294 | | - # Okta |
295 | | - OKTA_GROUP_MAPPING={"MCP Gateway Users": "team-id"} |
| 298 | + ```json |
| 299 | + { |
| 300 | + "team_mapping": { |
| 301 | + "your-org": { |
| 302 | + "team_id": "team-uuid", |
| 303 | + "role": "member" |
| 304 | + } |
| 305 | + } |
| 306 | + } |
296 | 307 | ``` |
297 | 308 |
|
298 | | - See the SSO guides under Manage › SSO for details. |
| 309 | + You can manage the same payload via the Admin API (`/auth/sso/admin/providers/{id}`) — see the SSO guides under Manage › SSO. |
299 | 310 |
|
300 | 311 | --- |
301 | 312 |
|
|
0 commit comments