# ContextForge — MCP Registry + Proxy Gateway > ContextForge runs an MCP gateway that federates tool servers behind one endpoint, adding governance, auth, and observability for agent tool calls. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Install the gateway from PyPI: ```bash python3 -m venv .venv && source .venv/bin/activate pip install --upgrade pip pip install mcp-contextforge-gateway ``` 2. Run the gateway (defaults in `.env.example`): ```bash curl -O https://raw.githubusercontent.com/IBM/mcp-context-forge/main/.env.example cp .env.example .env mcpgateway --host 0.0.0.0 --port 4444 ``` 3. Smoke-test the version endpoint (requires a bearer token in their docs). ## Intro ContextForge runs an MCP gateway that federates tool servers behind one endpoint, adding governance, auth, and observability for agent tool calls. - **Best for:** platform teams standardizing many MCP servers behind one controlled gateway endpoint - **Works with:** Python ≥3.11, MCP servers (stdio or containers), optional OpenTelemetry backends - **Setup time:** 30–60 minutes ## Practical Notes - Data point: the quick start binds the gateway on port 4444. - Quant: start with 2–4 upstream servers, then scale once auth + logging are correct. ## Pattern: “one endpoint” for tool calling If you have multiple MCP servers (internal + third-party), a gateway lets you: - consolidate auth and secrets, - add consistent logging and traces, - and standardize discovery for clients. ## Rollout checklist - Decide transport per upstream (stdio, docker, or remote). - Enable an admin API only for trusted networks. - Add health checks + metrics before allowing production traffic. ### FAQ **Q: Is ContextForge open-source?** A: Yes. It’s Apache-2.0 licensed on GitHub. **Q: Do I need Docker?** A: Not necessarily. The repo supports multiple transports; Docker is an option. **Q: What’s the first thing to harden?** A: Authentication + auditing logs, before adding more upstream servers. ## Source & Thanks > Source: https://github.com/IBM/mcp-context-forge > License: Apache-2.0 > GitHub stars: 3,686 · forks: 655 --- ## 快速使用 1. 从 PyPI 安装网关: ```bash python3 -m venv .venv && source .venv/bin/activate pip install --upgrade pip pip install mcp-contextforge-gateway ``` 2. 启动网关(使用 `.env.example` 的默认配置): ```bash curl -O https://raw.githubusercontent.com/IBM/mcp-context-forge/main/.env.example cp .env.example .env mcpgateway --host 0.0.0.0 --port 4444 ``` 3. 按仓库文档生成 bearer token 后,用 `/version` 做一次冒烟测试。 ## 简介 ContextForge 提供 MCP 网关:把多个工具服务器聚合成一个统一入口,并补齐鉴权、治理与可观测性;同时支持统一发现与路由/代理,让 agent 的工具调用更可控、更可审计、更可运营。 - **适合谁:** 要把多个 MCP server 统一到一个可控入口的平台代理团队 - **可搭配:** Python ≥3.11、MCP servers(stdio 或容器)、可选的 OpenTelemetry 后端 - **准备时间:** 30–60 分钟 ## 实战建议 - 数据点:Quick Start 默认把网关绑定在 4444 端口。 - 量化建议:先接 2–4 个上游 server,确认鉴权与日志正确后再扩展。 ## 常用打法:把工具调用统一成“一个入口” 当你同时运行多个 MCP server(内部 + 第三方)时,网关能帮你: - 统一鉴权与密钥管理, - 统一日志与 trace, - 让客户端发现与接入更标准化。 ## 上线清单 - 先确定各上游的 transport(stdio / docker / remote)。 - 管理 API 只对可信网络开放。 - 放量前先补齐健康检查与指标。 ### FAQ **ContextForge 是开源的吗?** 答:是的,GitHub 上为 Apache-2.0。 **一定要用 Docker 吗?** 答:不一定。仓库支持多种 transport,Docker 只是其中一种。 **第一步该加固什么?** 答:先把鉴权与审计日志做对,再接更多上游 server。 ## 来源与感谢 > Source: https://github.com/IBM/mcp-context-forge > License: Apache-2.0 > GitHub stars: 3,686 · forks: 655 --- Source: https://tokrepo.com/en/workflows/contextforge-mcp-registry-proxy-gateway Author: MCP Hub