Code2MCP: Transforming Code Repositories into MCP Services
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
The Model Context Protocol (MCP) aims to create a standard for how Large Language Models use tools. However, most current research focuses on selecting tools from an existing pool. A more fundamental, yet largely overlooked, problem is how to populate this pool by converting the vast number of existing software projects into MCP-compatible services. To bridge this gap, we introduce Code2MCP, an agent-based framework that automatically transforms a GitHub repository into a functional MCP service with minimal human intervention. Code2MCP employs a multi-agent workflow for code analysis, environment setup, tool function design, and service generation, enhanced by a self-correcting loop to ensure reliability. We demonstrate that Code2MCP successfully transforms open-source computing libraries in scientific fields such as bioinformatics, mathematics, and fluid dynamics that are not available in existing MCP servers. By providing a novel automated pathway to unlock GitHub, the world's largest code repository, for the MCP ecosystem, Code2MCP serves as a catalyst to significantly accelerate the protocol's adoption and practical application. The code is public at https://github.com/DEFENSE-SEU/Code2MCP.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 29 of its 62 references that are in the map. First posted on arXiv 7 Sep 2025.
Builds on
29 of 62 references.
Closest ancestors · 4
Same direction, newest first
- 2025CompileAgent: Automated Real-World Repo-Level Compilation with Tool-Integrated LLM-based Agent System7 May
- 2025LLM Agents Making Agent Tools17 Feb
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Future5 Aug
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges14 Jan
Other references · 25
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2023HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Facecited by 1,173
- 2023Reasoning with Language Model is Planning with World Modelcited by 846
- 2023API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMscited by 574
- 2025Multi-Agent Collaboration Mechanisms: A Survey of LLMscited by 424
- 2024Understanding the planning of LLM agents: A surveycited by 414
13 more
- 2023Tool Learning with Foundation Modelscited by 302
- 2024Tool Learning with Large Language Models: A Surveycited by 221
- 2022TALM: Tool Augmented Language Modelscited by 197
- 2023TaskMatrix.AI: Completing Tasks by Connecting Foundation Models with Millions of APIscited by 184
- 2024Large Language Model-Brained GUI Agents: A Surveycited by 160
- 2023OpenAgents: An Open Platform for Language Agents in the Wildcited by 136
- 2025A Survey on Trustworthy LLM Agents: Threats and Countermeasurescited by 93
- 2025Model Context Protocol (MCP) at First Glance: Studying the Security and Maintainability of MCP Serverscited by 62
- 2025SciToolAgent: A Knowledge Graph-Driven Scientific Agent for Multi-Tool Integrationcited by 40
- 2024ClinicalAgent: Clinical Trial Multi-Agent System with Large Language Model-based Reasoningcited by 31
- 2025RAG-MCP: Mitigating Prompt Bloat in LLM Tool Selection via Retrieval-Augmented Generationcited by 26
- 2025RepoMaster: Autonomous Exploration and Understanding of GitHub Repositories for Complex Task Solvingcited by 19
- 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositoriescited by 15
Built on by
Citing papers per year: 2025: 3; 2026: 7.
10 papers.
- 2025Step-GUI Technical Reportcited by 38
- 2026Self-Improvements in Modern Agentic Systems: A Surveycited by 17
- 2026RemoteAgent: Bridging Vague Human Intents and Earth Observation with RL-based Agentic MLLMscited by 7
- 2025CFDLLMBench: A Benchmark Suite for Evaluating Large Language Models in Computational Fluid Dynamicscited by 5
- 2026Towards a Medical AI Scientistcited by 5
- 2025CoS: Towards Optimal Event Scheduling via Chain-of-Schedulingcited by 4
- 2026TravelEval: A Comprehensive Benchmarking Framework for Evaluating LLM-Powered Travel Planning Agentscited by 2
- 2026FlowEvo: Self-Evolving Agents through the Co-Evolution of Workflows and Executable Skillscited by 1
- 2026DiagramBank: A Quality-Audited Dataset of Scientific Schematic Diagrams with Multi-Level Document Contextcited by 0
- 2026UrbanAgent: A Tool-Augmented Agent for Cross-System Urban Taskscited by 0
- 2026UrbanAgent: A Tool-Augmented Agent for Cross-System Urban Tasks4 Aug 2026
- 2026Self-Improvements in Modern Agentic Systems: A Survey14 Jul 2026
- 2026TravelEval: A Comprehensive Benchmarking Framework for Evaluating LLM-Powered Travel Planning Agents31 May 2026
- 2026FlowEvo: Self-Evolving Agents through the Co-Evolution of Workflows and Executable Skills18 Apr 2026
- 2026RemoteAgent: Bridging Vague Human Intents and Earth Observation with RL-based Agentic MLLMs9 Apr 2026
- 2026Towards a Medical AI Scientist30 Mar 2026
- 2026DiagramBank: A Quality-Audited Dataset of Scientific Schematic Diagrams with Multi-Level Document Context28 Feb 2026
- 2025Step-GUI Technical Report17 Dec 2025
- 2025CoS: Towards Optimal Event Scheduling via Chain-of-Scheduling17 Nov 2025
- 2025CFDLLMBench: A Benchmark Suite for Evaluating Large Language Models in Computational Fluid Dynamics19 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2026ToolRosella: Translating Code Repositories into Standardized Tools for Scientific Agents
- 2026A Large-Scale Dataset of MCP Implementations on GitHub
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation
- 2026From Tool Orchestration to Code Execution: A Study of MCP Design Choices
- 2025NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents
- 2026An Empirical Study of Model Context Protocol Applications
- 2026A Two-Dimensional Study of the Model Context Protocol: Publication and Adoption
- 2026Code2LoRA: Hypernetwork-Generated Adapters for Code Language Models under Software Evolution