MCP Bridge让小设备也能安全调用大模型工具,支持任意后端。
MCP Bridge: A Lightweight, LLM-Agnostic RESTful Proxy for Model Context Protocol Servers
- 构建轻量级REST代理,统一接入多个MCP服务器
- 优化后的Qwen3模型在MCPToolBench++上达73.0% F1分
- 支持三种安全级别,适配移动端和边缘计算场景
大型语言模型(LLMs)正通过标准化接口如模型上下文协议(MCP)集成外部工具。然而现有MCP实现多依赖本地进程与STDIO通信,难以在移动设备、浏览器和边缘计算等资源受限环境使用。本文提出MCP Bridge,一种轻量级的RESTful代理,可连接多个MCP服务器并通过统一API暴露其能力。该系统完全与LLM无关,支持任意后端。采用基于风险的执行模型,包含标准执行、确认流程和Docker隔离三种安全等级,同时保持对标准MCP客户端的向后兼容性。为确保可靠执行,我们使用四种强化学习方法(GRPO、Dr. GRPO、BNPO、DAPO)在Agent-Ark/Toucan-1.5M数据集上微调Qwen3 4B与8B模型。在MCPToolBench++基准测试中,优化模型取得73.0% F1分数,优于GPT-OSS-120B(62.17%),并媲美70B+参数基线。评估表明,MCP Bridge有效解决直接MCP连接的限制,提供更强安全控制与跨平台兼容性,使复杂LLM应用可在此前不可行的环境中运行。
原文摘要 · Abstract (English)
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 Clip and Dynamic sAmpling 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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。