Table of Contents
Fetching ...

MCP Bridge: A Lightweight, LLM-Agnostic RESTful Proxy for Model Context Protocol Servers

Arash Ahmadi, Sarah Sharif, Yaser M. Banad

TL;DR

MCP Bridge proposes a lightweight, LLMa-gnostic RESTful proxy that connects to multiple MCP servers to expose their capabilities via a unified API, addressing the limitations of STDIO-based MCP deployments in constrained environments. It combines a modular proxy design with a risk-based execution model and Docker isolation for high-risk tools, preserving backward compatibility. To enable open-weight deployment, the authors fine-tune Qwen3-4B and Qwen3-8B using four RL methods on Toucan-1.5M data, achieving competitive MCP-tool-call reliability on MCPToolBench++ and outperforming the GPT-OSS-120B baseline. The work demonstrates both the deployment viability of MCP across diverse platforms and the value of RL-aligned tool-use policies for model clients, supporting broader, safer AI agent capabilities in real-world environments.

Abstract

Large Language Models (LLMs) are increasingly augmented with external tools through standardized interfaces like the Model Context Protocol (MCP). However, current MCP implementations face critical limitations: they typically require local process execution through STDIO transports, making them impractical for resource-constrained environments like mobile devices, web browsers, and edge computing. We present MCP Bridge, a lightweight RESTful proxy that connects to multiple MCP servers and exposes their capabilities through a unified API. Unlike existing solutions, MCP Bridge is fully LLM-agnostic, supporting any backend regardless of vendor. The system implements a risk-based execution model with three security levels-standard execution, confirmation workflow, and Docker isolation - while maintaining backward compatibility with standard MCP clients. However, reliable execution within this framework requires models that can strictly adhere to protocol schemas. To this end, we also fine-tuned the Qwen3 4B and 8B model family on the Agent-Ark/Toucan-1.5M dataset using four Reinforcement Learning techniques: Group Relative Policy Optimization (GRPO), Dr. GRPO, Beta Normalization Policy Optimization (BNPO), and Decoupled Alignment Policy Optimization (DAPO). Evaluated on the MCPToolBench++ benchmark, our optimized model achieves an F1 score of 73.0% that outperforms GPT-OSS-120B (62.17%) and remains competitive with the 70B+ parameter baselines. Evaluation demonstrates that MCP Bridge successfully addresses the constraints of direct MCP connections while providing enhanced security controls and cross-platform compatibility, enabling sophisticated LLM-powered applications in previously inaccessible environments.

MCP Bridge: A Lightweight, LLM-Agnostic RESTful Proxy for Model Context Protocol Servers

TL;DR

MCP Bridge proposes a lightweight, LLMa-gnostic RESTful proxy that connects to multiple MCP servers to expose their capabilities via a unified API, addressing the limitations of STDIO-based MCP deployments in constrained environments. It combines a modular proxy design with a risk-based execution model and Docker isolation for high-risk tools, preserving backward compatibility. To enable open-weight deployment, the authors fine-tune Qwen3-4B and Qwen3-8B using four RL methods on Toucan-1.5M data, achieving competitive MCP-tool-call reliability on MCPToolBench++ and outperforming the GPT-OSS-120B baseline. The work demonstrates both the deployment viability of MCP across diverse platforms and the value of RL-aligned tool-use policies for model clients, supporting broader, safer AI agent capabilities in real-world environments.

Abstract

Large Language Models (LLMs) are increasingly augmented with external tools through standardized interfaces like the Model Context Protocol (MCP). However, current MCP implementations face critical limitations: they typically require local process execution through STDIO transports, making them impractical for resource-constrained environments like mobile devices, web browsers, and edge computing. We present MCP Bridge, a lightweight RESTful proxy that connects to multiple MCP servers and exposes their capabilities through a unified API. Unlike existing solutions, MCP Bridge is fully LLM-agnostic, supporting any backend regardless of vendor. The system implements a risk-based execution model with three security levels-standard execution, confirmation workflow, and Docker isolation - while maintaining backward compatibility with standard MCP clients. However, reliable execution within this framework requires models that can strictly adhere to protocol schemas. To this end, we also fine-tuned the Qwen3 4B and 8B model family on the Agent-Ark/Toucan-1.5M dataset using four Reinforcement Learning techniques: Group Relative Policy Optimization (GRPO), Dr. GRPO, Beta Normalization Policy Optimization (BNPO), and Decoupled Alignment Policy Optimization (DAPO). Evaluated on the MCPToolBench++ benchmark, our optimized model achieves an F1 score of 73.0% that outperforms GPT-OSS-120B (62.17%) and remains competitive with the 70B+ parameter baselines. Evaluation demonstrates that MCP Bridge successfully addresses the constraints of direct MCP connections while providing enhanced security controls and cross-platform compatibility, enabling sophisticated LLM-powered applications in previously inaccessible environments.

Paper Structure

This paper contains 24 sections, 1 equation, 11 figures, 4 tables, 4 algorithms.

Figures (11)

  • Figure 1: Architecture of the MCP Bridge API system showing four layers: client applications (mobile, browser, edge devices, and others) at the top, connecting through a RESTful API to the MCP Bridge proxy, which interfaces with multiple MCP servers (STDIO and SSE) at the bottom. The system enables resource-constrained environments to access MCP functionality through a unified interface with configurable security levels.
  • Figure 2: This figure illustrates the integration between a large language model (Gemini) and the Model Context Protocol (MCP) Bridge. The architecture shows a vertical flow from the user through the MCP-Gemini Agent (Python), to the Gemini LLM, then to the MCP Bridge API (Node.js), and finally to the MCP Servers. The diagram highlights the system's key data flows: natural language inputs from users, structured tool calls from the LLM, and request execution with risk-level handling (low, medium, high). The system supports multi-step reasoning by cycling results back to the LLM to determine subsequent actions.
  • Figure 3: Per-category F1 score heatmaps on MCPToolBench++ for Qwen3-4B (top) and Qwen3-8B (bottom). Rows correspond to RL methods and the base model; columns correspond to tool categories. Each cell reports mean F1 (%) computed from normalized tool-name matching and robust tool-call extraction from model outputs. Darker green indicates better performance.
  • Figure 4: Radar plots of per-category F1 on MCPToolBench++. This view emphasizes cross-category trade-offs: improvements are not uniform across tools, and methods can help one category while degrading another (e.g., Finance sensitivity in smaller models).
  • Figure 5: Aggregate Precision, Recall, F1, and Accuracy (%) on MCPToolBench++ fan2025mcptoolbench++ for Qwen3-4B (top) and Qwen3-8B (bottom). Scores are averaged across the six tool categories. These results show that Dr. GRPO is the strongest overall method for Qwen3-4B, while BNPO is strongest for Qwen3-8B under the same reward design.
  • ...and 6 more figures