1. Introduction
Many companies have regarded language models as essential tools for improving work efficiency [
1,
2,
3]. However, mainstream high-performance large language models (LLMs), which contain billions to tens of billions of parameters, require substantial computational resources and hardware costs for training and inference due to their enormous scale [
1,
4]. Moreover, their reliance on external services can also raise cybersecurity concerns, such as the potential leakage of corporate confidential information [
3].
In contrast, small language models (SLMs), with their smaller parameter sizes, are easier for small and medium-sized enterprises to deploy and can significantly reduce costs [
5]. However, their response accuracy and flexibility are often limited [
1]. To address this issue, this study introduces the model context protocol (MCP) to enhance the response capability of SLMs through targeted customization [
3,
5]. This approach not only reduces dependency on networks and expensive hardware but also enhances cost-effectiveness while maintaining information security [
3].
2. Materials and Methods
This study aims to explore how MCP is used to enhance the application performance of SLMs, with Qwen-7B serving as the core model. The research process includes model selection, MCP integration, data processing, as well as experimental design and evaluation.
2.1. Research Framework
The research was conducted in four main stages: (1) model selection, (2) mcp integration, (3) data processing, and (4) experimental design and evaluation. This process ensures that the study validates the enhancement effects of MCP on Traditional Chinese SLMs while balancing both cost efficiency and information security.
2.2. SLM: Qwen-7B
We used Qwen-7B as an SLM for the following reasons.
Native traditional Chinese support: It directly processes texts and instructions within Taiwanese and Mandarin Chinese contexts.
Moderate scale (7 billion parameters): It requires lower computational resources, making it suitable for small and medium-sized enterprise environments.
Local deployment: It runs on graphic processing unit (GPU) servers without relying on cloud services, thereby reducing cybersecurity risks.
2.3. MCP Integration
Through the use of MCP, we integrate Qwen-7B with external tools and resources. The main functions include a prompt template design to establish context prompts tailored for Traditional Chinese, tool functions (tools) to support SQL 2019 queries, data transformation, and document retrieval, and resource access (resources) to encapsulate SQL Server and industrial data as MCP resources.
As shown in
Figure 1, user input is first processed by the SLM (Qwen-7B) to determine intent. If external data is required, the MCP tool coordination center is responsible for invoking the corresponding external resources (such as databases, APIs, or processors) and integrating the returned results back into the SLM. The model then generates the final response. If no external data is needed, the SLM directly outputs the response to the user.
The data used in this study include the simulated data, the traditional Chinese NLPtest corpus, and the resource of SQL server and industrial data encapsulated as MCP resources. The experimental environment of this study is configured as follows:
Development environment: Python 3.10.9 + FastMCP (v0.1, 2024);
Hardware: A single server equipped with a 12GB GPU;
Database: SQL Server.
To evaluate the enhancement effects of MCP on Qwen-7B, we adopt the following metrics: response accuracy, efficiency (latency), and stability.
3. Results
We use Qwen-7B as the core SLM and integrate it through MCP to evaluate its feasibility and performance differences in data querying and external tool invocation. To illustrate the impact of MCP on the model’s capabilities, this section presents actual interaction results and system response changes before and after its implementation.
Before the introduction of MCP, the model was limited to natural language semantic understanding. When a user input “Query all columns of CD1” (
Figure 2), Qwen-7B provided a semantic explanation, indicating that additional data sources or structural descriptions (such as SQL tables or Excel files) were required to provide the column information. At this stage, the model lacked actual access to external databases and could only perform reasoning and guidance at the textual level.
After integrating MCP, the model interacts with external tools. When the user entered the same query command (
Figure 3), the system triggered the MCP tool coordination mechanism, and the model automatically generated the following SQL query: SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ‘CD1’.
This action was executed using MCP’s query_db tool, successfully returning the query results from the database, including the column names and corresponding data types in the CD1 table (e.g., FEE_YM: date, HOSP_ID: nvarchar, TREAT_AMT: int, etc.). This demonstrates that the model not only understands the query intent but can also autonomously invoke external resources through MCP to complete the task.
The introduction of MCP enables the following features and changes.
Automated tool invocation: The model automatically determines, based on user input, whether external data queries using MCP are needed, creating a dynamic collaboration between semantic reasoning and tool execution.
Data return integration: After query results are returned through MCP, the model can convert structured data (e.g., database columns) into natural language descriptions, providing more comprehensible explanations.
Response traceability: All tool invocations are recorded in JSON format (e.g., TOOL_CALL and args blocks), ensuring transparency and reproducibility of the query process.
Enhanced extensibility: The system can expand with new tools (e.g., APIs, file processing modules) according to task requirements without retraining the model.
Overall, after integrating MCP, Qwen-7B performs higher-level task processing in the same language interaction scenarios, transforming from simple language understanding to a complete closed-loop workflow of “semantic judgment→tool invocation→result integration.”
4. Discussion
MCP enables the capabilities of the SLM to expand. The results show that, after integrating MCP, Qwen-7B autonomously interprets query intent and executes database commands, demonstrating a significant behavioral transformation. This change indicates that MCP not only provides a bridge for external resource invocation but also enables the model to perform dynamic tool selection and contextual understanding.
4.1. Enhancement of Model Capability
Traditional SLMs are limited by their model parameters and training data, making them unable to directly connect to external data sources or tools. After integrating MCP, the model can autonomously perform tasks such as database queries, document retrieval, or data transformation through a “intent judgment → tool invocation → result integration” workflow. This architecture effectively compensates for the shortcomings of small models in knowledge updating and data access, enabling them to maintain high information timeliness and task orientation even in local environments.
In this study, Qwen-7B executes SQL queries via MCP without retraining. This expansion approach demonstrates that SLMs can achieve application flexibility comparable to large models through a structured invocation mechanism at the protocol layer.
4.2. Security and Deployment Considerations
The integration of MCP improves data security and deployment flexibility. Since all query processes are executed on local servers, data does not need to be uploaded to the cloud or external model providers, effectively reducing the risk of sensitive information leakage. In addition, the tool invocation workflow is recorded in a JSON structure, ensuring traceability and auditability, which aligns with internal corporate compliance and cybersecurity requirements. Compared with large cloud-based language models (LLMs), this SLM + MCP architecture is better suited for deployment in small and medium-sized enterprises, balancing both performance and privacy.
4.3. Practical Implications
The results of this study indicate that SLMs do not necessarily require massive parameters to accomplish complex tasks. Through the functional extension provided by MCP, small models can focus on semantic reasoning and decision-making while delegating data access and computation to external modules, forming a modular intelligent agent. This architecture demonstrates practical application potential in areas such as data querying, industrial process monitoring, educational assistance, and document retrieval.
4.4. Limitations and Future Work
Although the integration of MCP significantly enhances the practical capabilities of the model, several limitations remain. First, the tool selection and invocation logic in MCP currently rely on predefined rules and lack self-learning capabilities. Second, the system’s performance scheduling and resource management during parallel tool execution still require optimization. Future research could explore automated tool selection strategies, such as reinforcement learning-based decision mechanisms and test the integration performance with databases from different domains. Furthermore, combining MCP with semantic memory could enable SLMs to acquire continuous learning and contextual memory capabilities during task execution.
5. Conclusions
We integrated SLM and Qwen-7B and investigated the feasibility of enhancing the model’s external interaction capabilities through MCP. The results show that, after integrating MCP, Qwen-7B automatically generates and executes database query commands in response to user natural language queries, performing data retrieval and result integration. This demonstrates a behavioral shift from simple semantic understanding to task execution capability. The introduction of MCP expands the application scope of the SLM but also addresses the limitations of traditional language models in knowledge timeliness and external data access. This architecture enhances system security and controllability, allowing the model to operate on local servers to prevent sensitive corporate data leakage while enabling modular integration of various data sources and tools.
The SLM + MCP integration offers the following advantages.
Functional extensibility: It enables SLMs to autonomously invoke external tools and data resources through the protocol layer.
Security and local deployment: It reduces reliance on the cloud while enhancing data protection.
Reusable and scalable architecture: It allows rapid integration of different modules, such as databases, APIs, or computing nodes, based on application needs.
Practical application potential: It applies to smart factories, educational systems, knowledge retrieval, and automated report generation.
Future research is necessary to explore MCP’s capabilities in multi-tool collaboration, task decomposition, and semantic memory integration to realize intelligent agent systems with autonomous learning and dynamic scheduling features.
Author Contributions
Conceptualization, N.-Z.H. and Y.-X.L.; methodology, Y.-X.L.; software, H.-L.H., P.-H.L. and C.-C.L.; validation, Y.-X.L.; formal analysis, Y.-X.L.; investigation, H.-L.H., P.-H.L. and C.-C.L.; resources, Y.-T.H., S.-C.J. and P.-Y.C.; writing—original draft preparation, Y.-X.L.; writing—review and editing, N.-Z.H.; supervision, N.-Z.H. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not Applicable.
Informed Consent Statement
Not Applicable.
Data Availability Statement
The data used in this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Zhao, W.X.; Zhou, K.; Li, J.; Tang, T.; Wang, X.; Hou, Y.; Min, Y.; Zhang, B.; Zhang, J.; Dong, Z.; et al. A Survey of Large Language Models. arXiv 2023, arXiv:2303.18223. [Google Scholar] [CrossRef] [PubMed]
- Touvron, H.; Martin, L.; Stone, K.; Albert, P.; Almahairi, A.; Babaei, Y.; Bashlykov, N.; Batra, S.; Bhargava, P.; Bhosale, S.; et al. LLaMA 2: Open Foundation and Fine-Tuned Chat Models. arXiv 2023, arXiv:2307.09288. [Google Scholar] [CrossRef]
- Hou, X.; Zhao, Y.; Wang, H. LLM Applications: Current Paradigms and the Next Frontier. arXiv 2025, arXiv:2503.04596. [Google Scholar] [CrossRef]
- Yang, A.; Yang, B.; Hui, B.; Zheng, B.; Yu, B.; Zhou, C.; Li, C.; Li, C.; Liu, D.; Huang, F.; et al. Qwen2 Technical Report. arXiv 2024, arXiv:2407.10671. [Google Scholar] [CrossRef]
- OpenAI. Model Context Protocol (MCP) Specification. Available online: https://platform.openai.com/docs (accessed on 12 September 2025).
| Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |