gitmyhub

mcp-context-forge

Python ★ 3.9k updated 1d ago

An AI Gateway, registry, and proxy that sits in front of any MCP, A2A, or REST/gRPC APIs, exposing a unified endpoint with centralized discovery, guardrails and management. Optimizes Agent & Tool calling, and supports plugins.

ContextForge is an open-source tool built by IBM that acts as a central gateway, registry, and proxy for AI-related APIs and agent protocols. When you build an AI-powered application, you often need to connect many different services together: external tools, agent frameworks, REST APIs, and various AI providers. ContextForge sits in front of all of them and presents a single, unified endpoint to your AI clients, so you do not have to wire each connection individually.

At its core, the project supports three protocol types. MCP (Model Context Protocol) is a standard for exposing tools and resources to AI agents. A2A (Agent-to-Agent) is a protocol for routing requests between different AI agents, including those from OpenAI and Anthropic. REST and gRPC are older, widely-used API standards that ContextForge translates into the MCP format so your AI agents can talk to them without modification. The translation from gRPC is automatic, using the service own reflection protocol to discover what methods are available.

Beyond translation, ContextForge adds cross-cutting concerns like rate limiting, authentication, retries, and caching, which are things you would otherwise need to build or configure separately for each service. It also bundles an admin UI for managing servers, viewing logs, and monitoring activity in real time. Observability is handled through OpenTelemetry, which lets you send tracing data to backends like Jaeger or Zipkin for debugging and performance analysis.

The project runs as a Python package installed via PyPI, or as a Docker container. It supports horizontal scaling with Redis for caching and federation across multiple instances. The repository includes over 7,000 tests and supports deployment to Kubernetes for larger environments.

This is a developer-facing infrastructure tool, not an end-user application. If you are building an AI agent or application that needs to call many different APIs or external tools, ContextForge can act as the middle layer that normalizes and manages those connections. The full README is longer than what was shown.