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驱动应用成为可能。

0
下载
关闭预览

相关内容

RESTful是一种软件架构风格,设计风格而不是标准,只是提供了一组设计原则和约束条件。它主要用于客户端和服务器交互类的软件。基于这个风格设计的软件可以更简洁,更有层次,更易于实现缓存等机制。
大型语言模型(LLMs),附Slides与视频
专知会员服务
70+阅读 · 2024年6月30日
基于模型系统的系统设计
科技导报
10+阅读 · 2019年4月25日
R工程化—Rest API 之plumber包
R语言中文社区
11+阅读 · 2018年12月25日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月1日
VIP会员
相关VIP内容
大型语言模型(LLMs),附Slides与视频
专知会员服务
70+阅读 · 2024年6月30日
相关基金
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员