能力标签
mcp-context-forge MCP工具
🔌
MCP工具

mcp-context-forge MCP工具

基于 Python · 让 AI 助手直接操作你的系统与工具
英文名:mcp-context-forge
⭐ 3.7k Stars 🍴 656 Forks 💻 Python 📄 Apache-2.0 🏷 AI 8.2分
8.2AI 综合评分
MCP网关API代理AI基础设施异步处理认证中间件
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,mcp-context-forge MCP工具 获评「强烈推荐」。已获得 3.7k 颗 GitHub Star,这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。

📚 深度解析

mcp-context-forge MCP工具 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 mcp-context-forge MCP工具,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。mcp-context-forge MCP工具 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 mcp-context-forge MCP工具 评为 AI 评分 8.2 分,属于同类工具中的优质选择。

📋 工具概览

mcp-context-forge MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 3.7k
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
持续维护,定期更新
开源协议
Apache-2.0
AI 综合评分
8.2 分
工具类型
MCP工具
Forks
656

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

mcp-context-forge MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/IBM/mcp-context-forge

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "mcp-context-forge-mcp--": {
      "command": "npx",
      "args": ["-y", "mcp-context-forge"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 mcp-context-forge MCP工具 执行以下任务...
Claude: [自动调用 mcp-context-forge MCP工具 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "mcp-context-forge_mcp__": {
      "command": "npx",
      "args": ["-y", "mcp-context-forge"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 75/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

ContextForge

An open source registry and proxy that federates MCP, A2A, and REST/gRPC APIs with centralized governance, discovery, and observability. Optimizes Agent & Tool calling, and supports plugins.

ContextForge Banner

Build Python Package  Dependency Review  Tests & Coverage  Lint & Static Analysis

Async License  PyPI  Docker Image 

ContextForge is an open source registry and proxy that federates tools, agents, and APIs into one clean endpoint for your AI clients. It provides centralized governance, discovery, and observability across your AI infrastructure:

  • Tools Gateway — MCP, REST, gRPC-to-MCP translation, and TOON compression
  • Agent Gateway — A2A protocol, OpenAI-compatible and Anthropic agent routing
  • API Gateway — Rate limiting, auth, retries, and reverse proxy for REST services
  • Plugin Extensibility — 40+ plugins for additional transports, protocols, and integrations
  • Observability — OpenTelemetry tracing with Phoenix, Jaeger, Zipkin, and other OTLP backends

It runs as a fully compliant MCP server, deployable via PyPI or Docker, and scales to multi-cluster environments on Kubernetes with Redis-backed federation and caching.

Overview & Goals

ContextForge is an open source registry and proxy that federates any Model Context Protocol (MCP) server, A2A server, or REST/gRPC API, providing centralized governance, discovery, and observability. It optimizes agent and tool calling, and supports plugins. See the project roadmap for more details.

It currently supports:

  • Federation across multiple MCP and REST services
  • A2A (Agent-to-Agent) integration for external AI agents (OpenAI, Anthropic, custom)
  • gRPC-to-MCP translation via automatic reflection-based service discovery
  • Virtualization of legacy APIs as MCP-compliant tools and servers
  • Transport over HTTP, JSON-RPC, WebSocket, SSE (with configurable keepalive), stdio and streamable-HTTP
  • An Admin UI for real-time management, configuration, and log monitoring (with airgapped deployment support)
  • Built-in auth, retries, and rate-limiting with user-scoped OAuth tokens and unconditional X-Upstream-Authorization header support
  • OpenTelemetry observability with Phoenix, Jaeger, Zipkin, and other OTLP backends
  • Scalable deployments via Docker or PyPI, Redis-backed caching, and multi-cluster federation

ContextForge Architecture

For a list of upcoming features, check out the ContextForge Roadmap

---

<details> <summary><strong>🔌 Gateway Layer with Protocol Flexibility</strong></summary>

  • Federates any MCP server or REST API
  • Lets you choose your MCP protocol version (e.g., 2025-11-25)
  • Exposes a single, unified interface for diverse backends

</details>

<details> <summary><strong>🧩 Virtualization of REST/gRPC Services</strong></summary>

  • Wraps non-MCP services as virtual MCP servers
  • Registers tools, prompts, and resources with minimal configuration
  • gRPC-to-MCP translation via server reflection protocol
  • Automatic service discovery and method introspection

</details>

<details> <summary><strong>🔁 REST-to-MCP Tool Adapter</strong></summary>

  • Adapts REST APIs into tools with:
  • Automatic JSON Schema extraction
  • Support for headers, tokens, and custom auth
  • Retry, timeout, and rate-limit policies

</details>

<details> <summary><strong>🧠 Unified Registries</strong></summary>

  • Prompts: Jinja2 templates, multimodal support, rollback/versioning
  • Resources: URI-based access, MIME detection, caching, SSE updates
  • Tools: Native or adapted, with input validation and concurrency controls

</details>

<details> <summary><strong>📈 Admin UI, Observability & Dev Experience</strong></summary>

  • Admin UI built with HTMX 2.0.3 (bundled) + Alpine.js
  • Real-time log viewer with filtering, search, and export capabilities
  • Auth: Basic, JWT, or custom schemes
  • Structured logs, health endpoints, metrics
  • 7,000+ tests, Makefile targets, live reload, pre-commit hooks

</details>

<details> <summary><strong>🔍 OpenTelemetry Observability</strong></summary>

  • Vendor-agnostic tracing with OpenTelemetry (OTLP) protocol support
  • Multiple backend support: Phoenix (LLM-focused), Jaeger, Zipkin, Tempo, DataDog, New Relic
  • Distributed tracing across federated gateways and services
  • Automatic instrumentation of tools, prompts, resources, and gateway operations
  • LLM-specific metrics: Token usage, costs, model performance
  • Zero-overhead when disabled with graceful degradation

See Observability Documentation for setup guides with Phoenix, Jaeger, and other backends.

</details>

---

Install system dependencies first

or: uv pip install 'psycopg[c]' # production (requires compiler)


Connection URL format:
bash DATABASE_URL=postgresql+psycopg://user:password@localhost:5432/mcp

Quick Postgres container:
bash docker run --name mcp-postgres \ -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=mysecretpassword \ -e POSTGRES_DB=mcp -p 5432:5432 -d postgres ```

</details>

---

1 - Install & run (copy-paste friendly)

```bash

1️⃣ Isolated env + install from pypi

mkdir mcpgateway && cd mcpgateway python3 -m venv .venv && source .venv/bin/activate pip install --upgrade pip pip install mcp-contextforge-gateway

1️⃣ Isolated env + install from PyPI

mkdir mcpgateway ; cd mcpgateway python3 -m venv .venv ; .\.venv\Scripts\Activate.ps1 pip install --upgrade pip pip install mcp-contextforge-gateway

1️⃣ Isolated env + install from PyPI using uv

mkdir mcpgateway ; cd mcpgateway uv venv .\.venv\Scripts\activate uv pip install mcp-contextforge-gateway

1️⃣ Spin up the sample GO MCP time server using mcpgateway.translate & docker (replace docker with podman if needed)

python3 -m mcpgateway.translate \ --stdio "docker run --rm -i ghcr.io/ibm/fast-time-server:latest -transport=stdio" \ --expose-sse \ --port 8003

cd mcp-servers/go/fast-time-server; make build

🚀 Quick Start - Docker Compose

Get a full stack running with PostgreSQL and Redis in under 30 seconds:

```bash

Install with PostgreSQL (default)

helm install mcp-gateway . \ --set mcpContextForge.secret.PLATFORM_ADMIN_EMAIL=admin@yourcompany.com \ --set mcpContextForge.secret.PLATFORM_ADMIN_PASSWORD=changeme \ --set mcpContextForge.secret.JWT_SECRET_KEY=your-secret-key

Check deployment status

kubectl get pods -l app.kubernetes.io/name=mcp-context-forge

🐳 Docker (Single Container)

```bash docker run -d --name mcpgateway \ -p 4444:4444 \ -e MCPGATEWAY_UI_ENABLED=true \ -e MCPGATEWAY_ADMIN_API_ENABLED=true \ -e HOST=0.0.0.0 \ -e JWT_SECRET_KEY=my-test-key-but-now-longer-than-32-bytes \ -e AUTH_REQUIRED=true \ -e PLATFORM_ADMIN_EMAIL=admin@example.com \ -e PLATFORM_ADMIN_PASSWORD=changeme \ -e PLATFORM_ADMIN_FULL_NAME="Platform Administrator" \ -e DATABASE_URL=sqlite:///./mcp.db \ -e SECURE_COOKIES=false \ ghcr.io/ibm/mcp-context-forge:1.0.0-RC-3

Installation

make venv install-dev      # create .venv + install deps + build Admin UI
make serve                 # gunicorn on :4444

Rust workspace note: - Workspace-owned Rust crates live under crates/ and are picked up by the root Cargo.toml via crates/*. - Run cargo build, cargo test, and cargo check from the repo root to cover the shared workspace. - Rust sample servers under mcp-servers/rust/ are usually managed separately; workspace-owned ones are listed explicitly in the root Cargo.toml. - make venv install-dev creates the root .venv, which is also reused by the workspace's PyO3/maturin builds.

<details> <summary><strong>Alternative: UV or pip</strong></summary>

```bash

Debian/Ubuntu: sudo apt-get install libpq-dev

macOS: brew install libpq

uv pip install 'psycopg[binary]' # dev (pre-built wheels)

⚙️ Project Defaults (Dev Setup)

These values differ from code defaults to provide a working local/dev setup:

VariableDescriptionDefault
HOSTBind address0.0.0.0
MCPGATEWAY_UI_ENABLEDEnable Admin UI dashboardtrue
MCPGATEWAY_ADMIN_API_ENABLEDEnable Admin API endpointstrue
DATABASE_URLSQLAlchemy connection URLsqlite:///./mcp.db
SECURE_COOKIESSet false for HTTP (non-HTTPS) devfalse

Docker Compose (Full Stack)

make compose-up          # Start full stack: PostgreSQL, Redis, 3 gateway replicas, Nginx on :8080
make compose-sso         # Start SSO stack with Keycloak on :8180
make sso-test-login      # Run SSO smoke checks (providers + login URL + test users)
make compose-logs        # Tail logs from all services
make compose-down        # Stop the stack

Cloud Deployment

ContextForge can be deployed to any major cloud platform:

PlatformGuide
**AWS**[ECS/EKS Deployment](https://ibm.github.io/mcp-context-forge/deployment/aws/)
**Azure**[AKS Deployment](https://ibm.github.io/mcp-context-forge/deployment/azure/)
**Google Cloud**[Cloud Run](https://ibm.github.io/mcp-context-forge/deployment/google-cloud-run/)
**IBM Cloud**[Code Engine](https://ibm.github.io/mcp-context-forge/deployment/ibm-code-engine/)
**Kubernetes**[Helm Charts](https://ibm.github.io/mcp-context-forge/deployment/minikube/)
**OpenShift**[OpenShift Deployment](https://ibm.github.io/mcp-context-forge/deployment/openshift/)

For comprehensive deployment guides, see Deployment Documentation.

---

Quick Start - PyPI

ContextForge is published on PyPI as mcp-contextforge-gateway.

---

TLDR;: (single command using uv)

```bash

Quick start with environment variables

BASIC_AUTH_PASSWORD=pass \ MCPGATEWAY_UI_ENABLED=true \ MCPGATEWAY_ADMIN_API_ENABLED=true \ PLATFORM_ADMIN_EMAIL=admin@example.com \ PLATFORM_ADMIN_PASSWORD=changeme \ PLATFORM_ADMIN_FULL_NAME="Platform Administrator" \ uvx --from mcp-contextforge-gateway mcpgateway --host 0.0.0.0 --port 4444

Or better: use the provided .env.example

cp .env.example .env

Download the example environment file

curl -O https://raw.githubusercontent.com/IBM/mcp-context-forge/main/.env.example cp .env.example .env

Download the example environment file

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/IBM/mcp-context-forge/main/.env.example" -OutFile ".env.example" Copy-Item .env.example .env

Example curl

curl -s -X POST -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"server":{"name":"time_server","description":"Fast time tools","associated_tools":["6018ca46d32a4ac6b4c054c13a1726a2"]}}' \ http://localhost:4444/servers | jq

Quick Start - Containers

Use the official OCI image from GHCR with Docker or Podman. Please note: Currently, arm64 is not supported on production. If you are e.g. running on MacOS with Apple Silicon chips (M1, M2, etc), you can run the containers using Rosetta or install via PyPi instead.

☸️ Quick Start - Helm (Kubernetes)

Deploy to Kubernetes with enterprise-grade features:

```bash

Edit .env to customize your settings

uvx --from mcp-contextforge-gateway mcpgateway --host 0.0.0.0 --port 4444 ```

<details> <summary><strong>📋 Prerequisites</strong></summary>

  • Python ≥ 3.11
  • curl + jq - only for the last smoke-test step

</details>

2️⃣ Copy and customize the configuration

Edit .env to customize your settings (especially passwords!)

Or set environment variables directly:

export MCPGATEWAY_UI_ENABLED=true export MCPGATEWAY_ADMIN_API_ENABLED=true export PLATFORM_ADMIN_EMAIL=admin@example.com export PLATFORM_ADMIN_PASSWORD=changeme export PLATFORM_ADMIN_FULL_NAME="Platform Administrator"

BASIC_AUTH_PASSWORD=pass JWT_SECRET_KEY=my-test-key-but-now-longer-than-32-bytes \ mcpgateway --host 0.0.0.0 --port 4444 & # admin/pass

2️⃣ Copy and customize the configuration

Edit .env to customize your settings

Or set environment variables (session-only)

$Env:MCPGATEWAY_UI_ENABLED = "true" $Env:MCPGATEWAY_ADMIN_API_ENABLED = "true"

Optional: background it

Set environment variables

export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --exp 10080 --secret my-test-key-but-now-longer-than-32-bytes) export MCP_AUTH="Bearer ${MCPGATEWAY_BEARER_TOKEN}" export MCP_SERVER_URL='http://localhost:4444/servers/UUID_OF_SERVER_1/mcp' export MCP_TOOL_CALL_TIMEOUT=120 export MCP_WRAPPER_LOG_LEVEL=DEBUG # or OFF to disable logging

docker run --rm -i \ -e MCP_AUTH=$MCP_AUTH \ -e MCP_SERVER_URL=http://host.docker.internal:4444/servers/UUID_OF_SERVER_1/mcp \ -e MCP_TOOL_CALL_TIMEOUT=120 \ -e MCP_WRAPPER_LOG_LEVEL=DEBUG \ ghcr.io/ibm/mcp-context-forge:1.0.0-RC-3 \ python3 -m mcpgateway.wrapper ```

</details>

---

Configuration

⚠️ If any required .env variable is missing or invalid, the gateway will fail fast at startup with a validation error via Pydantic.

Copy the provided .env.example to .env and update the security-sensitive values below.

📚 Full Configuration Reference

For the complete list of 300+ environment variables organized by category (authentication, caching, SSO, observability, etc.), see the Configuration Reference.

---

3️⃣ Generate a bearer token & smoke-test the API

export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token \ --username admin@example.com --exp 10080 --secret my-test-key-but-now-longer-than-32-bytes)

curl -s -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \ http://127.0.0.1:4444/version | jq


<details>
<summary><strong>Windows (PowerShell) quick-start</strong></summary>
powershell

Note: Basic auth for API is disabled by default (API_ALLOW_BASIC_AUTH=false)

$Env:JWT_SECRET_KEY = "my-test-key-but-now-longer-than-32-bytes" $Env:PLATFORM_ADMIN_EMAIL = "admin@example.com" $Env:PLATFORM_ADMIN_PASSWORD = "changeme" $Env:PLATFORM_ADMIN_FULL_NAME = "Platform Administrator"

Now accessible via both /sse (SSE) and /mcp (streamable HTTP) endpoints

6️⃣ Client HTTP endpoint. Inspect it interactively with the MCP Inspector CLI (or use any MCP client)

npx -y @modelcontextprotocol/inspector

Generate API token

docker compose exec gateway python3 -m mcpgateway.utils.create_jwt_token \ --username admin@example.com --exp 10080 --secret my-test-key-but-now-longer-than-32-bytes


**What you get:**
- 🗄️ **PostgreSQL** - Production-ready database with 55+ tables
- 🚀 **ContextForge** - Full-featured gateway with Admin UI
- 📊 **Redis** - High-performance caching and session storage
- 🔧 **Admin Tools** - pgAdmin, Redis Insight for database management
- 🌐 **Nginx Proxy** - Caching reverse proxy on port 8080

**Enable HTTPS (optional):**
bash

Generate API token

kubectl exec deployment/mcp-gateway-mcp-context-forge -- \ python3 -m mcpgateway.utils.create_jwt_token \ --username admin@yourcompany.com --exp 10080 --secret your-secret-key ```

SSRF note: Helm defaults to strict SSRF settings (SSRF_ALLOW_PRIVATE_NETWORKS=false). If you register in-cluster tool URLs (for example fast-time or fast-test services), allow only your cluster CIDRs via mcpContextForge.config.SSRF_ALLOWED_NETWORKS or, for local-only benchmark setups, temporarily set SSRF_ALLOW_PRIVATE_NETWORKS=true. See docs/docs/manage/configuration.md#ssrf-protection and docs/docs/deployment/helm.md.

Enterprise Features: - 🔄 Auto-scaling - HPA with CPU/memory targets - 🗄️ Database Choice - PostgreSQL (prod), SQLite (dev) - 📊 Observability - Prometheus metrics, OpenTelemetry tracing - 🔒 Security - RBAC, network policies, secret management - 🚀 High Availability - Multi-replica deployments with Redis clustering - 📈 Monitoring - Built-in Grafana dashboards and alerting

---

Tail logs and generate API key

docker logs -f mcpgateway docker run --rm -it ghcr.io/ibm/mcp-context-forge:1.0.0-RC-3 \ python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --exp 10080 --secret my-test-key-but-now-longer-than-32-bytes


Browse to **[http://localhost:4444/admin](http://localhost:4444/admin)** and login with `PLATFORM_ADMIN_EMAIL` / `PLATFORM_ADMIN_PASSWORD`.

<details>
<summary><strong>Advanced: Persistent storage, host networking, airgapped</strong></summary>

**Persist SQLite database:**
bash mkdir -p $(pwd)/data && touch $(pwd)/data/mcp.db && chmod 777 $(pwd)/data docker run -d --name mcpgateway --restart unless-stopped \ -p 4444:4444 -v $(pwd)/data:/data \ -e DATABASE_URL=sqlite:////data/mcp.db \ -e MCPGATEWAY_UI_ENABLED=true -e MCPGATEWAY_ADMIN_API_ENABLED=true \ -e HOST=0.0.0.0 -e JWT_SECRET_KEY=my-test-key-but-now-longer-than-32-bytes \ -e PLATFORM_ADMIN_EMAIL=admin@example.com -e PLATFORM_ADMIN_PASSWORD=changeme \ ghcr.io/ibm/mcp-context-forge:1.0.0-RC-3

**Host networking** (access local MCP servers):
bash docker run -d --name mcpgateway --network=host \ -v $(pwd)/data:/data -e DATABASE_URL=sqlite:////data/mcp.db \ -e MCPGATEWAY_UI_ENABLED=true -e HOST=0.0.0.0 -e PORT=4444 \ ghcr.io/ibm/mcp-context-forge:1.0.0-RC-3

**Airgapped deployment** (no internet):
bash docker build -f Containerfile.lite -t mcpgateway:airgapped . docker run -d --name mcpgateway -p 4444:4444 \ -e MCPGATEWAY_UI_AIRGAPPED=true -e MCPGATEWAY_UI_ENABLED=true \ -e HOST=0.0.0.0 -e JWT_SECRET_KEY=my-test-key-but-now-longer-than-32-bytes \ mcpgateway:airgapped ```

</details>

---

Quick Reference

CommandServerPortDatabaseUse Case
make devUvicorn**8000**SQLiteDevelopment (single instance, auto-reload)
make serveGunicorn**4444**SQLiteProduction single-node (multi-worker)
make serve-sslGunicorn**4444**SQLiteProduction single-node with HTTPS
make compose-upDocker Compose + Nginx**8080**PostgreSQL + RedisFull stack (3 replicas, load-balanced)
make compose-ssoDocker Compose + Keycloak**8080 / 8180**PostgreSQL + RedisLocal SSO testing (Keycloak profile)
make testing-upDocker Compose + Nginx**8080**PostgreSQL + RedisTesting environment

API Reference

Interactive API documentation is available when the server is running:

  • Swagger UI — Try API calls directly in your browser
  • ReDoc — Browse the complete endpoint reference

Quick Authentication: ```bash

Test API access

curl -H "Authorization: Bearer $TOKEN" http://localhost:4444/health ```

For comprehensive curl examples covering all endpoints, see the API Usage Guide.

---

Alternative: running the local binary

Quick Start: VS Code Dev Container

Clone the repo and open in VS Code—it will detect .devcontainer and prompt to "Reopen in Container". The container includes Python 3.11, Docker CLI, and all project dependencies.

For detailed setup, workflows, and GitHub Codespaces instructions, see Developer Onboarding.

---

Troubleshooting

Common issues and solutions:

IssueQuick Fix
SQLite "disk I/O error" on macOSAvoid iCloud-synced directories; use ~/mcp-context-forge/data
Port 4444 not accessible on WSL2Configure WSL integration in Docker Desktop
Gateway exits immediatelyCopy .env.example to .env and configure required vars
ModuleNotFoundErrorRun make install-dev

For detailed troubleshooting guides, see Troubleshooting Documentation.

---

🇨🇳 中文文档镜像 AI 翻译 2026-06-09
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

ContextForge 是一个开源的注册表和代理,通过中央治理、发现和可观察性来联合 MCP 服务器、A2A 服务器或 REST/gRPC API。它优化了代理和工具的调用,并支持插件。

📋 环境依赖

首先安装系统依赖项

🛠 安装步骤(Docker/pip/源码)

安装和运行(copy-paste 友好的)

🚀 使用教程

快速入门 - PyPI

⚙️ 配置说明(含 MCP / env)

编辑 .env 来自定义您的设置

🔌 API 说明

3️⃣ 生成一个令牌并测试 API

🎯 aiskill88 AI 点评 A 级 2026-05-21

功能完整的MCP生态工具,解决多协议聚合和网关问题,社区活跃(3.7k星),Python生态友好,是构建AI基础设施的重要选择。

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 跨境业务、多语言内容运营团队
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • Docker:mcp-context-forge 提供官方镜像,docker compose up 一键启动
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
mcp-context-forge 中文教程mcp-context-forge 安装报错怎么办mcp-context-forge MCP 配置mcp-context-forge Docker 部署mcp-context-forge Agent 工作流mcp-context-forge 与同类工具对比mcp-context-forge 最佳实践mcp-context-forge 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 跨境业务、多语言内容运营团队
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • Python 依赖冲突:建议用 venv / uv 隔离环境

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

支持MCP、A2A和REST/GraphQL等多种协议,可灵活组合。
💡 AI Skill Hub 点评

AI Skill Hub 点评:mcp-context-forge MCP工具 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ Apache-2.0 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 mcp-context-forge MCP工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 mcp-context-forge
原始描述 开源MCP工具:An AI Gateway, registry, and proxy that sits in front of any MCP, A2A, or REST/g。⭐3.7k · Python
Topics MCP网关API代理AI基础设施异步处理认证中间件
GitHub https://github.com/IBM/mcp-context-forge
License Apache-2.0
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/IBM/mcp-context-forge 🌐 官方网站  https://ibm.github.io/mcp-context-forge/

收录时间:2026-05-14 · 更新时间:2026-05-16 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →