Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2507.16044

帮助 | 高级搜索

计算机科学 > 软件工程

arXiv:2507.16044 (cs)
[提交于 2025年7月21日 (v1) ,最后修订 2025年7月23日 (此版本, v2)]

标题: 使REST API适应代理:从OpenAPI到模型上下文协议服务器,用于工具增强的LLM

标题: Making REST APIs Agent-Ready: From OpenAPI to Model Context Protocol Servers for Tool-Augmented LLMs

Authors:Meriem Mastouri, Emna Ksontini, Wael Kessentini
摘要: 大型语言模型(LLMs)正从被动的文本生成器演变为能够调用外部工具的主动代理。 为了支持这一转变,可扩展的工具集成协议至关重要。 Anthropic 于 2024 年推出的模型上下文协议(MCP),提供了一种基于模式的动态工具发现和调用标准。 然而,构建 MCP 服务器仍然是手动且重复的过程,开发人员需要编写粘合代码、处理身份验证,并手动复制大量 MCP 所旨在消除的集成工作。 本文研究了是否可以有意义地自动化 MCP 服务器的构建。 我们首先分析采用趋势:在发布后六个月内创建的 22,000 多个 MCP 标记的 GitHub 仓库中,不到 5% 包含服务器,通常是小型的、由单一维护者主导的项目,主要依赖重复的脚手架。 为解决这一差距,我们提出了 AutoMCP,一个从 OpenAPI 2.0/3.0 规范生成 MCP 服务器的编译器。 AutoMCP 解析 REST API 定义并生成完整的服务器实现,包括模式注册和身份验证处理。 我们在 50 个现实世界的 API 上评估 AutoMCP,这些 API 涉及超过 10 个领域的 5,066 个端点。 从 1,023 个工具调用的分层样本中,76.5% 的调用无需任何修改即可成功。 手动失败分析揭示了五个反复出现的问题,所有问题均可归因于 OpenAPI 合同中的不一致或遗漏。 经过少量修复,每个 API 平均修改 19 行规范,AutoMCP 实现了 99.9% 的成功率。 我们的研究发现(i)分析 MCP 的采用情况并量化手动服务器开发的成本,(ii)证明尽管存在质量问题,OpenAPI 规范仍能实现近乎完整的 MCP 服务器自动化,(iii)提供了包含 5,066 个可调用工具的语料库以及修复常见规范缺陷的见解。
摘要: Large Language Models (LLMs) are evolving from passive text generators into active agents that invoke external tools. To support this shift, scalable protocols for tool integration are essential. The Model Context Protocol (MCP), introduced by Anthropic in 2024, offers a schema-driven standard for dynamic tool discovery and invocation. Yet, building MCP servers remains manual and repetitive, requiring developers to write glue code, handle authentication, and configure schemas by hand-replicating much of the integration effort MCP aims to eliminate. This paper investigates whether MCP server construction can be meaningfully automated. We begin by analyzing adoption trends: among 22,000+ MCP-tagged GitHub repositories created within six months of release, fewer than 5% include servers, typically small, single-maintainer projects dominated by repetitive scaffolding. To address this gap, we present AutoMCP, a compiler that generates MCP servers from OpenAPI 2.0/3.0 specifications. AutoMCP parses REST API definitions and produces complete server implementations, including schema registration and authentication handling. We evaluate AutoMCP on 50 real-world APIs spanning 5,066 endpoints across over 10 domains. From a stratified sample of 1,023 tool calls, 76.5% succeeded out of the box. Manual failure analysis revealed five recurring issues, all attributable to inconsistencies or omissions in the OpenAPI contracts. After minor fixes, averaging 19 lines of spec changes per API, AutoMCP achieved 99.9% success. Our findings (i) analyze MCP adoption and quantify the cost of manual server development, (ii) demonstrate that OpenAPI specifications, despite quality issues, enable near-complete MCP server automation, and (iii) contribute a corpus of 5,066 callable tools along with insights on repairing common specification flaws.
主题: 软件工程 (cs.SE)
引用方式: arXiv:2507.16044 [cs.SE]
  (或者 arXiv:2507.16044v2 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2507.16044
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Meriem Mastouri [查看电子邮件]
[v1] 星期一, 2025 年 7 月 21 日 20:20:31 UTC (805 KB)
[v2] 星期三, 2025 年 7 月 23 日 16:37:47 UTC (811 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
许可图标 查看许可
当前浏览上下文:
cs.SE
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-07
切换浏览方式为:
cs

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号