- The paper introduces MCP Bridge, a RESTful proxy that unifies multiple MCP servers to overcome local process constraints in resource-limited environments.
- It leverages a Node.js and Express technology stack with a risk-based execution model, ensuring flexible integration and enhanced security for various LLM backends.
- The implementation supports both STDIO and SSE transports and includes a Python-based MCP-Gemini Agent to demonstrate practical LLM integration and tool management.
This paper introduces MCP Bridge, a lightweight, LLM-agnostic proxy designed to overcome limitations in current implementations of the Model Context Protocol (MCP). MCP aims to standardize how LLMs connect to external tools and data sources. However, existing MCP servers often rely on STDIO transports, requiring local process execution. This makes them unsuitable for resource-constrained environments like mobile devices, web browsers, or edge computing platforms. Direct connections also lead to redundancy and increased resource usage.
MCP Bridge addresses these issues by acting as an intermediary RESTful proxy. It connects to multiple backend MCP servers (supporting both STDIO and Server-Sent Events (SSE) transports) and exposes their combined capabilities through a single, unified REST API. This architecture decouples client applications from the MCP server processes, allowing clients in restricted environments to access MCP tools without needing to run local processes.
Key features and implementation details of MCP Bridge include:
The paper also presents the MCP-Gemini Agent, a Python client application demonstrating how to integrate MCP Bridge with an LLM (specifically Google's Gemini). This agent allows users to interact with MCP tools via natural language. It fetches available tools from MCP Bridge, uses the LLM to determine which tool(s) to call based on the user's query, executes the calls via the MCP Bridge API, handles the confirmation workflow for medium-risk tools, and presents the results back to the user, potentially involving the LLM again for summarizing or follow-up actions.
The primary contribution of MCP Bridge is enabling the use of MCP-compatible tools in environments previously inaccessible due to execution constraints. It enhances security through its risk-based model and promotes interoperability by providing a standardized, LLM-independent interface. The open-source implementation is available on GitHub.
Future work suggestions include performance optimizations (e.g., connection pooling, request batching, caching), enhanced security features (e.g., fine-grained access control, identity provider integration), research into intelligent request scheduling, developing translation layers for non-MCP tools, and exploring federated deployment architectures.