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.
翻译:大型语言模型(LLMs)正日益通过如模型上下文协议(MCP)等标准化接口与外部工具增强集成。然而,当前的MCP实现面临关键限制:它们通常需要通过STDIO传输在本地进程执行,这使得其在资源受限环境(如移动设备、网页浏览器和边缘计算)中不切实际。我们提出了MCP Bridge,一种轻量级RESTful代理,可连接多个MCP服务器并通过统一API暴露其功能。与现有解决方案不同,MCP Bridge完全与LLM无关,支持任何后端,无论供应商如何。该系统实现了基于风险的执行模型,包含三个安全级别——标准执行、确认工作流和Docker隔离——同时保持与标准MCP客户端的向后兼容性。然而,在此框架内实现可靠执行需要模型能够严格遵守协议模式。为此,我们还在Agent-Ark/Toucan-1.5M数据集上,使用四种强化学习技术对Qwen3 4B和8B模型系列进行了微调:组相对策略优化(GRPO)、Dr. GRPO、Beta归一化策略优化(BNPO)和解耦对齐策略优化(DAPO)。在MCPToolBench++基准测试中评估,我们的优化模型取得了73.0%的F1分数,优于GPT-OSS-120B(62.17%),并与70B+参数基线模型保持竞争力。评估表明,MCP Bridge成功解决了直接MCP连接的限制,同时提供了增强的安全控制和跨平台兼容性,使得在先前无法访问的环境中部署复杂的LLM驱动应用成为可能。