Interface access method and device, computer equipment and readable storage medium

By parsing interface metadata and generating target MCP configuration files using MCP configuration templates and large language models, the problem of slow traditional manual conversion is solved, achieving automated interface access and efficient system access.

CN121579575APending Publication Date: 2026-02-27BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511745804.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In traditional methods, the speed of manually converting interface information is slow, resulting in low efficiency of AI agent interface access.

Method used

By acquiring the interface documents of the system to be connected, parsing the interface metadata, extracting the key datasets of the interface, and performing information augmentation based on the model context interface MCP configuration template and the large language model, the target MCP configuration file is generated, realizing the automatic conversion and access of the interface.

Benefits of technology

It achieves automated interface conversion, improves interface access efficiency and system access efficiency, and avoids human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579575A_ABST
    Figure CN121579575A_ABST
Patent Text Reader

Abstract

The invention relates to an interface access method and device, computer equipment and a readable storage medium. The method comprises the following steps: acquiring an application program interface document of a system to be accessed; the application program interface document comprises interface metadata of each to-be-accessed interface; for each to-be-accessed interface, analyzing interface metadata, and extracting an interface key data set from the analyzed interface metadata based on each key element; calling a model context interface MCP configuration template, and updating each key value in the interface key data set into the MCP configuration template based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template to obtain an initial MCP configuration file; and performing information enhancement on the initial MCP configuration file based on a large language model to obtain a target MCP configuration file, and performing interface configuration on the target agent according to the target MCP configuration file. By adopting the method, the efficiency of the interface access method can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large model, and particularly relates to an interface access method and device, computer equipment, a computer readable storage medium and a computer program product. BACKGROUND

[0002] In the application of an AI (Artificial Intelligence) agent, in order to make the application range of the AI agent more extensive or simplify the application of the AI agent, a new API (Application Programming Interface) needs to be accessed through an MCP (Model Context Protocol) service to call the function of the API.

[0003] In the traditional technology, a developer obtains the interface document of a system to be accessed, and manually converts the interface information of each interface in the interface document into an MCP configuration file, and accesses the interface into the AI agent based on the MCP configuration file.

[0004] However, in the traditional technology, a system to be accessed has a large number of interfaces to be accessed, and the speed of manually converting the interface information is slow, which leads to low efficiency of accessing the system to be accessed into the AI agent. Therefore, the efficiency of the current interface access method is low. SUMMARY

[0005] Therefore, it is necessary to provide an interface access method, device, computer equipment, computer readable storage medium and computer program product to solve the above technical problems.

[0006] In a first aspect, the present application provides an interface access method, comprising:

[0007] obtaining an application program interface document of a system to be accessed; the application program interface document contains interface metadata of each interface to be accessed;

[0008] For each interface to be accessed, the interface metadata is parsed, and interface key data sets are extracted from the parsed interface metadata based on each key element;

[0009] calling a model context interface MCP configuration template, and updating each key value in the interface key data set to the MCP configuration template based on the mapping relationship between each key element and each configuration placeholder in the MCP configuration template, to obtain an initial MCP configuration file;

[0010] The initial MCP configuration file is information enhanced based on a large language model to obtain a target MCP configuration file, and a target agent is configured according to the target MCP configuration file.

[0011] In one of the embodiments, the interface metadata is parsed, and interface key data sets are extracted from the parsed interface metadata based on the key elements.

[0012] The interface metadata is parsed to obtain initial elements and initial values corresponding to the initial elements;

[0013] The key elements are determined from the initial elements, and key values corresponding to the key elements are determined;

[0014] The interface key data sets for the interface to be accessed are constructed according to the key elements and the key values corresponding to the key elements.

[0015] In one of the embodiments, the configuration placeholders are tool placeholders, parameter description placeholders, and MCP object placeholders, the key elements are summary elements, description elements, and parameter elements, and the key values in the interface key data sets are updated in the MCP configuration template based on the mapping relationship between the key elements and the configuration placeholders in the MCP configuration template to obtain the initial MCP configuration file, including:

[0016] The key value corresponding to the summary element is updated in the MCP configuration template based on the mapping relationship between the tool placeholder and the summary element;

[0017] The key value corresponding to the description element is updated in the MCP configuration template based on the mapping relationship between the parameter description placeholder and the description element;

[0018] The key value corresponding to the parameter element is updated in the MCP configuration template based on the mapping relationship between the MCP object placeholder and the parameter element to obtain the initial MCP configuration file.

[0019] In one of the embodiments, the key elements further include an application program interface security policy element, and after the key values in the interface key data sets are added to the MCP configuration template based on the mapping relationship between the key elements and the configuration placeholders in the MCP configuration template to obtain the initial MCP configuration file, the method further includes:

[0020] The key value corresponding to the application program interface security policy element is mapped to an MCP security policy according to a security policy mapping rule.

[0021] add the MCP security policy to the initial MCP configuration file.

[0022] In one of the embodiments, the initial MCP configuration file is information enhanced based on the large language model to obtain a target MCP configuration file, including:

[0023] generating a to-be-enhanced MCP configuration file based on the initial MCP configuration file and a preset question template;

[0024] extracting semantic features of the to-be-enhanced MCP configuration file based on the large language model, and performing semantic enhancement on tool data and parameter description data in the to-be-enhanced MCP configuration file according to the semantic features to obtain an initial target MCP configuration file;

[0025] performing format conversion on the initial target MCP configuration file according to a preset file format to obtain a target MCP configuration file.

[0026] In one of the embodiments, the question template contains different question placeholders, and the to-be-enhanced MCP configuration file is generated based on the initial MCP configuration file and the preset question template, including:

[0027] determining a question placeholder corresponding to each configuration keyword in the initial MCP configuration file;

[0028] updating each question placeholder based on a configuration key value corresponding to each configuration keyword to obtain a to-be-enhanced MCP configuration file.

[0029] In one of the embodiments, after the target intelligent agent is configured with an interface according to the target MCP configuration file, the method further includes:

[0030] receiving a user instruction and extracting instruction features in the user instruction based on the target intelligent agent;

[0031] determining a to-be-called MCP configuration file in each target MCP configuration file based on the instruction features, and determining a to-be-called interface corresponding to the to-be-called MCP configuration file;

[0032] determining an instruction result corresponding to the user instruction based on the to-be-called interface and the target intelligent agent.

[0033] In a second aspect, the application further provides an interface access device, including:

[0034] an obtaining module configured to obtain an application program interface document of a system to be accessed; the application program interface document contains interface metadata of each to-be-accessed interface;

[0035] The parsing module is configured to parse the interface metadata for each of the to-be-accessed interfaces, and extract an interface key data set from the parsed interface metadata based on each key element;

[0036] The calling module is configured to call a model context interface (MCP) configuration template, and update each key value in the interface key data set to the MCP configuration template based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template, to obtain an initial MCP configuration file;

[0037] The enhancing module is configured to perform information enhancement on the initial MCP configuration file based on a large language model, to obtain a target MCP configuration file, and perform interface configuration on a target agent according to the target MCP configuration file.

[0038] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program:

[0039] An application program interface document of a to-be-accessed system is obtained, and the application program interface document comprises interface metadata of each to-be-accessed interface;

[0040] The interface metadata is parsed for each of the to-be-accessed interfaces, and an interface key data set is extracted from the parsed interface metadata based on each key element;

[0041] A model context interface (MCP) configuration template is called, and each key value in the interface key data set is updated to the MCP configuration template based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template, to obtain an initial MCP configuration file;

[0042] Information enhancement is performed on the initial MCP configuration file based on a large language model, to obtain a target MCP configuration file, and interface configuration is performed on a target agent according to the target MCP configuration file.

[0043] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program realizes the following steps when executed by a processor:

[0044] An application program interface document of a to-be-accessed system is obtained, and the application program interface document comprises interface metadata of each to-be-accessed interface;

[0045] The interface metadata is parsed for each of the to-be-accessed interfaces, and an interface key data set is extracted from the parsed interface metadata based on each key element;

[0046] The model context interface MCP configuration template is invoked, and based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template, each key value in the interface key data set is updated into the MCP configuration template, to obtain an initial MCP configuration file;

[0047] Based on a large language model, information of the initial MCP configuration file is enhanced to obtain a target MCP configuration file, and a target agent is configured according to the target MCP configuration file.

[0048] In a fifth aspect, the present application further provides a computer program product, comprising a computer program which, when executed by a processor, implements the following steps:

[0049] An application program interface document to be accessed is acquired; the application program interface document comprises interface metadata of each interface to be accessed;

[0050] For each interface to be accessed, the interface metadata is parsed, and based on each key element, an interface key data set is extracted from the parsed interface metadata;

[0051] The model context interface MCP configuration template is invoked, and based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template, each key value in the interface key data set is updated into the MCP configuration template, to obtain an initial MCP configuration file;

[0052] Based on a large language model, information of the initial MCP configuration file is enhanced to obtain a target MCP configuration file, and a target agent is configured according to the target MCP configuration file.

[0053] The interface access method, device, computer equipment, computer readable storage medium and computer program product described above, an application program interface document of a system to be accessed is obtained; the application program interface document contains interface metadata of each interface to be accessed; for each interface to be accessed, the interface metadata is parsed, and based on each key element, interface key data sets are extracted from the parsed interface metadata; a model context interface MCP configuration template is called, and based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template, each key value in the interface key data set is updated to the MCP configuration template to obtain an initial MCP configuration file; information of the initial MCP configuration file is enhanced based on a large language model to obtain a target MCP configuration file, and an interface of a target agent is configured according to the target MCP configuration file. By using the method, the interface key data sets in the interface metadata are converted into the initial MCP configuration file based on the model context interface MCP configuration template, and the initial MCP configuration file is semantically enhanced by the large language model, so that the automatic conversion of the interface to be accessed is realized, the target MCP configuration file is obtained, and human intervention is avoided. Furthermore, each interface to be accessed is accessed into the target agent through each target MCP configuration file, so that the automatic access of the system to be accessed is realized, and the interface access efficiency and the system access efficiency are improved. BRIEF DESCRIPTION OF DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other related drawings can be obtained by those skilled in the art without creative labor.

[0055] Figure 1 A flowchart of an interface access method in an embodiment;

[0056] Figure 2 A structure diagram of interface metadata in an exemplary embodiment;

[0057] Figure 3 A flowchart of extracting interface key data sets in an embodiment;

[0058] Figure 4 A flowchart of determining an initial MCP configuration file in an embodiment;

[0059] Figure 5 A flowchart of adding an initial MCP configuration file in an embodiment;

[0060] Figure 6This is a flowchart illustrating the process of determining the target MCP configuration file in one embodiment;

[0061] Figure 7 This is a schematic diagram of a service verification page in an exemplary embodiment;

[0062] Figure 8 This is a schematic diagram of a details verification page in an exemplary embodiment;

[0063] Figure 9 This is a schematic diagram of the process for generating the MCP configuration file to be enhanced in one embodiment;

[0064] Figure 10 This is a flowchart illustrating the process of determining the result of an instruction in one embodiment;

[0065] Figure 11 This is a flowchart of an interface access method in an exemplary embodiment;

[0066] Figure 12 This is a schematic diagram of the interface access system architecture in an exemplary embodiment;

[0067] Figure 13 This is a structural block diagram of an interface access device in one embodiment;

[0068] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0070] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0071] In one embodiment, such as Figure 1 As shown, an interface access method is provided. This application embodiment uses the application of this method to a computer device as an example for illustration. This application embodiment does not limit the execution device of the interface access method, and includes the following steps 102 to 108:

[0072] At step 102, an application program interface document of a system to be accessed is acquired.

[0073] The application program interface document includes interface metadata of each interface to be accessed. The system to be accessed is a business system to be accessed.

[0074] In implementation, the computer device acquires the application program interface document of the system to be accessed based on an HTTP (Hypertext Transfer Protocol) tool. The application program interface document includes interface metadata of all interfaces in the business system, i.e., interface metadata of each interface to be accessed.

[0075] Specifically, the computer device uses the HTTP tool to call a Swagger / Open (Swagger is a specification and toolset for describing, documenting and testing RESTful API (a standardized interface design style based on HTTP protocol)) application program interface document interface of the system to be accessed, and acquires interface metadata including all API paths, methods, parameters, responses and other interface information based on an Abstract Syntax Code (AST). Figure 2 An example of a structure of the interface metadata is shown in FIG. 1. As shown in FIG. 1, the data structure can acquire API paths, methods, parameters, responses and other metadata. Figure 2

[0076] In an example, in order to comprehensively analyze order data, an operator accesses an order system to a target agent, so that the target agent can comprehensively and quickly analyze the order data. Therefore, the system to be accessed is the order system. The computer device acquires an application program interface document of the order system through the HTTP tool.

[0077] At step 104, for each interface to be accessed, the interface metadata is parsed, and an interface key data set is extracted from the parsed interface metadata based on key elements.

[0078] In implementation, the computer device parses the interface metadata of each interface to be accessed to obtain each initial element and a value corresponding to each initial element. Then, the computer device determines key elements in the initial elements, and constructs an interface key data set according to the key elements and key values corresponding to the key elements.

[0079] ​Specifically, the computer device parses the interface metadata of each to-be-accessed interface to obtain each initial element and a value corresponding to each initial element. Then, the computer device determines a key element in each initial element. The key element at least includes an abstract element, a description element, and a parameter element. That is, the computer device determines the abstract element, the description element, and the parameter element in each initial element. Then, the computer device extracts an interface key data set from the interface metadata according to the abstract element, the description element, and the parameter element.

[0080] In step 106, a model context interface MCP configuration template is called, and each key value in the interface key data set is updated in the MCP configuration template based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template, to obtain an initial MCP configuration file.

[0081] The MCP configuration template includes each configuration placeholder.

[0082] In implementation, the computer device is provided with an MCP mapping rule including a mapping relationship between each configuration placeholder and each key element. The computer device calls a model context interface MCP configuration template from a database. Then, the computer device determines, for each key element, a configuration placeholder corresponding to the key element in the MCP configuration template. Then, the computer device updates the configuration placeholder in the MCP file based on a key value corresponding to the key element, to obtain an initial MCP configuration file.

[0083] Specifically, each key element is an abstract element, a description element, and a parameter element. Each configuration placeholder is a tool placeholder, a parameter description placeholder, and an MCP object placeholder. The MCP mapping rule is shown in Table 1.

[0084] Table 1

[0085]

[0086] The computer device acquires the MCP configuration template from a database. The computer device updates the MCP configuration template based on a mapping relationship between the abstract element and the tool placeholder and a key value corresponding to the abstract element, and updates the MCP configuration template based on a mapping relationship between the parameter description placeholder and the description element and a key value corresponding to the parameter description placeholder. Then, the computer device updates the MCP configuration template based on a mapping relationship between the MCP object placeholder and the parameter element and a key value corresponding to the parameter element, to obtain an initial MCP configuration file.

[0087] In step 108, the initial MCP configuration file is information-enhanced based on a large language model to obtain a target MCP configuration file, and a target agent is interface-configured according to the target MCP configuration file.

[0088] In implementation, the computer device is equipped with a large language model. Based on the initial MCP configuration file and the question template, the computer device generates an MCP configuration file to be enhanced, and then enhances the MCP configuration file according to the large language model to obtain the target MCP configuration file. Then, based on the target MCP configuration file, the computer device connects the interface to be accessed to the target agent, thereby enabling the target agent to simplify its application by using the functional modules corresponding to the interface to be accessed according to the target MCP configuration file.

[0089] Specifically, the computer device updates the configuration data in the initial MCP configuration file to a preset query template, obtaining the MCP configuration file to be enhanced. Then, the computer device inputs the MCP configuration file to be enhanced into the target agent, which enhances the tool data and parameter description data in the MCP to be enhanced, obtaining the initial target MCP configuration file. Finally, the computer device converts the format of the initial MCP configuration file to obtain the target MCP configuration file.

[0090] In the aforementioned interface access method, the key interface dataset in the interface metadata is converted into an initial MCP configuration file based on the Model Context Interface (MCP) configuration template. Semantic enhancement of the initial MCP configuration file is then performed using a large language model, achieving automated conversion of the interfaces to be accessed and obtaining the target MCP configuration file, thus avoiding human intervention. Furthermore, each interface to be accessed is connected to the target agent through its target MCP configuration file, achieving automated access to the system and improving both interface access efficiency and system access efficiency.

[0091] In one exemplary embodiment, such as Figure 3 As shown, the specific processing procedure of step 104 includes steps 302 to 306. Wherein:

[0092] Step 302: Parse the interface metadata to obtain each initial element and its corresponding initial value.

[0093] In implementation, the computer equipment uses an abstract syntax tree tool to parse the interface metadata of the interface to be integrated, obtaining each initial element and its corresponding initial value. The initial elements are Swagger elements. Each initial element contains at least a summary element, a description element, parameters elements, a path element, and a method element. The initial value of the summary element represents the main description (including functional description) of the interface to be integrated. The initial value of the description element is a supplementary description of the initial value of the summary element, representing the functionality, business logic, parameter meanings, and usage specifications of the interface to be integrated. The initial value of the parameter element is the value of each parameter of the interface to be integrated.

[0094] In step 304, each key element in each initial element is determined, and a key value corresponding to each key element is determined.

[0095] The key elements are respectively a summary element, a description element, a parameter element, and an API (application programming interface) security policy element.

[0096] In implementation, the computer device determines the summary element, the description element, and the parameter element as the key elements in each initial element. Then, the computer device determines the value of the summary element as the key value, and determines the value corresponding to the description element as the key value. Meanwhile, the computer device determines the value corresponding to the parameter element as the key value.

[0097] In an optional embodiment, if the initial element contains an API security policy (security) element, the computer device determines the API security policy element as the key element, and determines the value corresponding to the API security policy element as the key value.

[0098] In step 306, an interface key data set of the to-be-accessed interface is constructed according to each key element and the key value corresponding to each key element.

[0099] In implementation, the computer device combines each key element and the key value corresponding to each key element to obtain the interface key data set of the to-be-accessed interface.

[0100] In this embodiment, the interface key data set is automatically extracted by parsing the interface metadata and extracting the interface key data set from the interface metadata based on the key elements, which facilitates subsequent generation of the target MCP configuration file based on the interface key data set.

[0101] In an exemplary embodiment, the MCP configuration template contains a tool placeholder, a parameter description placeholder, and an MCP object placeholder, and each key element is respectively a summary element, a description element, and a parameter element, as shown in FIG. 1, the specific processing process of updating each key value in the interface key data set to the MCP configuration template based on the mapping relationship between each key element and each placeholder in the MCP configuration template in step 106 includes steps 402 to 406. Wherein: Figure 4 In step 402, the key value corresponding to the summary element is updated to the MCP configuration template based on the mapping relationship between the tool placeholder and the summary element.

[0102]

[0103] ​In implementation, the computer device locates the tool placeholder in the MCP configuration file, and replaces the tool placeholder with the key value corresponding to the summary element according to the mapping relationship between the tool placeholder and the summary element, to obtain an updated MCP configuration template.

[0104] In an exemplary embodiment, the MCP configuration template is as follows:

[0105] Tool: interface name;

[0106] path: {path};

[0107] Method: {Post / Get};

[0108] (summary): XXXXXX;

[0109] description: YYYYY;

[0110] parameters: ZZZZZ.

[0111] In the above MCP configuration template, XXXXXX is a tool placeholder, YYYYY is a parameter description placeholder, and ZZZZZ is an MCP object placeholder. {path} is a path placeholder of an interface to be accessed, and {Post / Get} is a method placeholder. The key value corresponding to the description element is a registered user. Then the computer device locates the tool placeholder in the MCP configuration file, and replaces the tool placeholder with the key value corresponding to the summary element according to the mapping relationship between the tool placeholder and the summary element, to obtain an updated MCP configuration template. The updated MCP configuration template is as follows:

[0112] Tool: interface name;

[0113] path: {path};

[0114] Method: {Post / Get};

[0115] (summary): registered user;

[0116] description: YYYYY;

[0117] parameters: ZZZZZ.

[0118] Step 404, updating the key value corresponding to the description element in the MCP configuration template according to the mapping relationship between the parameter description placeholder and the description element.

[0119] In implementation, the computer device locates the parameter description placeholder in the MCP configuration file, and replaces the parameter description placeholder with the key value corresponding to the description element according to the mapping relationship between the parameter description placeholder and the description element, to obtain the MCP configuration template updated again.

[0120] In an exemplary embodiment, the updated MCP configuration template is as follows:

[0121] Tool: interface name

[0122] path: {path};

[0123] Method: {Post / Get};

[0124] (summary): registered user

[0125] description: YYYYY

[0126] parameters: ZZZZZ

[0127] In the above MCP configuration template, YYYYY is a parameter description placeholder, and ZZZZZ is an MCP object placeholder. {path} is a path placeholder of an interface to be accessed, and {Post / Get} is a method placeholder. The key value corresponding to the parameter description element is to query detailed information according to a user ID (identity). Then the computer device locates the parameter description placeholder in the MCP configuration file, and replaces the parameter description placeholder with the key value to query detailed information according to the user ID according to the mapping relationship between the parameter description placeholder and the description element, to obtain the MCP configuration template updated again.

[0128] The updated MCP configuration template is as follows:

[0129] Tool: interface name

[0130] path: {path};

[0131] Method: {Post / Get};

[0132] (summary): registered user

[0133] description: query detailed information according to user ID

[0134] parameters: ZZZZZ

[0135] At step 406, according to the mapping relationship between the MCP object placeholder and the parameter element, the key value corresponding to the parameter element is updated into the MCP configuration template to obtain an initial MCP configuration file.

[0136] In implementation, the computer device locates the MCP object placeholder in the MCP configuration file, and according to the mapping relationship between the MCP object placeholder and the parameter element, the MCP object placeholder is replaced by the key value corresponding to the parameter element to obtain the initial MCP configuration file.

[0137] In an optional embodiment, the computer device updates the name, path and method of the interface to be accessed into the initial MCP configuration file to obtain an updated initial MCP configuration file.

[0138] In this embodiment, the model context interface MCP configuration template can automatically convert the key data set of the interface into the initial MCP configuration file, realizes automatic conversion of the MCP configuration file, and improves the conversion efficiency. Moreover, the model context interface MCP configuration template can be reused, which facilitates subsequent conversion of the initial MCP configuration file based on the model context interface MCP configuration template, and greatly improves the conversion efficiency.

[0139] In an exemplary embodiment, since the API security policy data is included in part of the interface metadata, the API security policy data needs to be converted into MCP security policy. As shown in FIG. 5, the key element further includes an application program interface security policy element. After step 104 is performed, the specific process of the interface access method further includes steps 502 to 504. Wherein: Figure 5

[0140] At step 502, according to a security policy mapping rule, the key value corresponding to the application program interface security policy element is mapped into MCP security policy.

[0141] In implementation, the computer device is provided with a security policy mapping rule. The security policy mapping rule contains the mapping relationship between each API security data and each MCP security policy. The computer device determines the target API security data in each API security data which has the same key value as the application program interface security policy element, and maps the MCP security policy corresponding to the target API security data into the MCP security policy corresponding to the key value of the application program interface security policy element.

[0142] Optionally, the MCP security policy can be but is not limited to API key (application programming interface key), OAuth2 (Open Authorization Protocol 2.0), and the MCP security policy is not limited in the embodiments of the present application.

[0143] ​Step 504, add the MCP security policy to the initial MCP configuration file.

[0144] In implementation, the computer device adds the MCP security policy to the initial MCP configuration to obtain an updated MCP configuration file.

[0145] In this embodiment, in the case that the application interface security policy element is included in the interface key data set, the automatic conversion of the MCP security policy can be realized through the security policy mapping rule, and the MCP security policy conversion efficiency is improved.

[0146] In one exemplary embodiment, as shown in Figure 6 The specific processing process of the information enhancement of the initial MCP configuration file based on the large language model in step 108 to obtain the target MCP configuration file includes steps 602 to 606. Among them:

[0147] Step 602, based on the initial MCP configuration file and the preset question template, a to-be-enhanced MCP configuration file is generated.

[0148] In implementation, the computer device is pre-provided with a question template. The computer device updates the initial MCP configuration file to the question template according to the relationship between each configuration keyword and each question placeholder to obtain the to-be-enhanced MCP configuration file.

[0149] Specifically, the computer device determines the question placeholder corresponding to each configuration keyword in the initial MCP configuration file. Then, based on the configuration key value corresponding to each configuration keyword, each question placeholder is updated to obtain the to-be-enhanced MCP configuration file.

[0150] Step 604, based on the large language model, the semantic features of the to-be-enhanced MCP configuration file are extracted, and the tool data and parameter description data in the to-be-enhanced MCP configuration file are semantically enhanced according to the semantic features to obtain an initial target MCP configuration file.

[0151] Among them, the to-be-enhanced MCP configuration file contains tool data and parameter description data.

[0152] In implementation, the computer device inputs the to-be-enhanced MCP configuration file into the large language model, and extracts the semantic features of the to-be-enhanced MCP configuration file through the large language model. Then, the large language model in the computer device semantically enhances the tool data and the parameter description data according to the semantic features to obtain the semantically enhanced tool data and the parameter description data. Then, the computer device updates the to-be-enhanced MCP configuration file according to the semantically enhanced tool data and the parameter description data to obtain the initial target MCP configuration file.

[0153] In an exemplary embodiment, the MCP configuration file to be enhanced is as follows:

[0154] You are an application program interface document expert, capable of understanding Swagger API interface descriptions, and based on system descriptions and application program interface document descriptions and parameter definitions, you can infer the purpose and usage of the current API interface;

[0155] System summary: <User Registration>;

[0156] Please convert the following API description into natural language to facilitate subsequent conversion into MCP service configuration: path: {path}, Method: {Post}, description: {register user method}, parameters: {key: value}. Where {key: value} will be replaced with specific interface parameters. The computer device inputs the to-be-enhanced MCP configuration file into the large language model, extracts the semantic features of the to-be-enhanced MCP configuration file (semantic features of registering a user and how to use the semantic features of the register user interface). Then, the large language model in the computer device performs semantic enhancement on the tool data and parameter description data based on the semantic features, obtaining the semantic-enhanced tool data and parameter description data. Then, the computer device updates the to-be-enhanced MCP configuration file based on the semantic-enhanced tool data and parameter description data, obtaining an initial target MCP configuration file. The initial target MCP configuration file is as follows:

[0157] Tool: get_user_details (get user details);

[0158] (summary): register a user;

[0159] description: query detailed information based on user ID;

[0160] Arguments:

[0161] - ID: user ID (required).

[0162] Step 606, according to the preset file format, format conversion is performed on the initial target MCP configuration file to obtain the target MCP configuration file.

[0163] In implementation, the computer device is pre-set with a file format. The file format is YAML / JSON (data sequence format). The computer device performs format conversion on the initial target MCP configuration file according to the YAML / JSON format to obtain the target MCP configuration file. The target MCP configuration file is as follows:

[0164] tools:

[0165] - name: {MCP name}; (Name of the interface to be connected)

[0166] summary{API_summary}; (Semantically enhanced tool data)

[0167] description: {API_descripiton}; (Semantically enhanced parameter description data)

[0168] arguments: (MCP object data);

[0169] - {key1}: {value1};

[0170] {key2}: {value2};

[0171] required: true.

[0172] In an optional embodiment, the computer device provides a web interface to verify the target MCP profile. The web interface includes a service verification page and a details verification page. Figure 7 This is a schematic diagram of a service verification page in an exemplary embodiment. Figure 8 This is a schematic diagram of the details verification page in an exemplary embodiment. Through instance verification, this interface access method can convert 100 existing Swagger API interfaces (interface metadata of the interfaces to be accessed) into MCP services (target MCP configuration files) within 3 minutes.

[0173] In this embodiment, the tool data and parameter description data in the MCP configuration file to be enhanced are semantically enhanced using a large language model to obtain the target MCP configuration file. This makes the description of the target MCP configuration file more accurate and easier to understand, which facilitates the target intelligent agent to accurately call the interface to be accessed based on the target MCP configuration file, thereby improving the accuracy of the interface access method.

[0174] In one exemplary embodiment, the question template includes various question placeholders, such as Figure 9 As shown, the specific processing procedure of step 902 includes steps 902 to 904. Wherein:

[0175] Step 902: For each configuration keyword in the initial MCP configuration file, determine the corresponding query placeholder.

[0176] The initial MCP configuration file contains each configuration keyword and its corresponding configuration key value.

[0177] In implementation, the computer device determines the question placeholder corresponding to the configuration keyword in the question template for each configuration keyword in the initial MCP configuration file.

[0178] In an exemplary embodiment, the initial target MCP configuration file is as follows:

[0179] Tool: register user;

[0180] path: {path};

[0181] Method: {Post};

[0182] summary: register user;

[0183] description: query detailed information according to user ID;

[0184] parameters: {key1}: {value1};

[0185] {key2}: {value2}.

[0186] Among them, {key1}: {value1} {key2}: {value2} in the above initial target MCP configuration file is a specific MCP object parameter. summary is a tool configuration keyword, description is a parameter description configuration keyword, and parameters is an MCP object configuration keyword.

[0187] The question template is as follows:

[0188] You are an application program interface document expert, can understand Swagger API interface description, based on system description and application program interface document description and parameter definition, infer the purpose and use of the current API interface;

[0189] System summary: <user pre-made>;

[0190] Please convert the following API description into natural language to facilitate subsequent conversion into MCP service configuration: path: {path}, Method: {Post / Get}, description: {system API description from code}, parameters: {key: value};

[0191] Wherein, <user pre-prepared> is a tool question placeholder, {system API description from code} is a parameter description question placeholder, and {key: value} is an MCP object question placeholder.

[0192] The computer device determines the tool question placeholder corresponding to the tool configuration keyword in the question template. Then, the computer device determines the parameter description question placeholder corresponding to the parameter description configuration keyword in the question template. The computer device determines the MCP object question placeholder corresponding to the MCP object configuration keyword in the question template.

[0193] Step 904: Update each question placeholder based on the configuration key value corresponding to each configuration keyword to obtain the to-be-enhanced MCP configuration file.

[0194] In implementation, the computer device replaces the question placeholder corresponding to each configuration keyword based on the configuration key value corresponding to the configuration keyword to obtain the to-be-enhanced MCP configuration file.

[0195] In an exemplary embodiment, the question template is as follows:

[0196] You are an application program interface document expert, can understand Swagger API interface description, based on system description and application program interface document description and parameter definition, infer the purpose and use of the current API interface;

[0197] System summary description: <user pre-prepared>;

[0198] Please convert the following API description into natural language to facilitate subsequent conversion into MCP service configuration: path: {path}, Method: {Post / Get}, description: {system API description from code}, parameters: {key: value};

[0199] Wherein, <user pre-prepared> is a tool question placeholder, {system API description from code} is a parameter description question placeholder, and {key: value} is an MCP object question placeholder.

[0200] The initial target MCP configuration file is as follows:

[0201] Tool: register user;

[0202] path: {path};

[0203] Method: {Post};

[0204] Summary: Registered users;

[0205] Description: Query detailed information based on user ID;

[0206] parameters: {key1}: {value1};

[0207] {key2}: {value2}.

[0208] In the initial target MCP configuration file mentioned above, {key1}: {value1}{key2}: {value2} represents the specific MCP object parameters. `summary` is the tool configuration keyword, `description` is the parameter description configuration keyword, and `parameters` is the MCP object configuration keyword.

[0209] The computer device replaces the <user-pre-built> based on the registered user and replaces the parameter description question placeholders based on the detailed information retrieval according to the user ID. Simultaneously, the computer device replaces {key:value} with {key1}: {value1}{key2}: {value2} to obtain the MCP configuration file to be enhanced.

[0210] In this embodiment, the MCP configuration file to be enhanced can be quickly generated based on the initial MCP configuration file and the question template, which facilitates the subsequent semantic enhancement of the large language model on the MCP configuration file to be enhanced, thereby improving the accuracy of the MCP configuration file to be enhanced.

[0211] In one exemplary embodiment, after accessing each interface to be accessed, the target agent can use the interface to respond to the user's instructions. For example... Figure 10 As shown, after step 108 is executed, the specific processing steps of this interface access method further include steps 1002 to 1006. Wherein:

[0212] Step 1002: Receive user instructions and extract instruction features from the user instructions based on the target intelligent agent.

[0213] In practice, the computer device receives user commands sent by the user. Then, the computer device inputs the user commands into the target intelligent agent, which extracts features from the user commands to obtain command features. These command features characterize the intention of the target intelligent agent.

[0214] At step 1004, the computer device determines a to-be-called MCP configuration file in each target MCP configuration file based on the instruction feature, and determines a to-be-called interface corresponding to the to-be-called MCP configuration file.

[0215] In implementation, the computer device determines a to-be-called configuration file with the same semantic as the instruction feature in each target MCP configuration file. Then, the computer device determines a to-be-called interface corresponding to the to-be-called MCP configuration file.

[0216] In an example embodiment, the instruction feature is to acquire user information. The computer device determines a to-be-called configuration file with the function of querying user information in each target MCP configuration file. Then, the computer device determines a to-be-called interface corresponding to the to-be-called MCP configuration file.

[0217] At step 1006, the computer device determines an instruction result corresponding to the user instruction based on the to-be-called interface and the target agent.

[0218] In implementation, the computer device calls a required module based on the to-be-called interface, and executes the required module to obtain to-be-analyzed information. Then, the computer device analyzes the to-be-analyzed information based on the target agent to obtain an instruction result corresponding to the user instruction.

[0219] In an example embodiment, the computer device calls a user module based on the to-be-called interface, and acquires user information of all users based on the user module. Then, the computer device analyzes the user information of each user based on the target agent to obtain a user portrait.

[0220] In this embodiment, after the to-be-accessed system is accessed to the target agent, the target agent can call the to-be-accessed system to answer the user instruction according to each target MCP configuration file, thereby improving the generation efficiency of the instruction result.

[0221] In an example embodiment, Figure 11 FIG. 1 is a flowchart of an interface access method according to an example embodiment. As shown in FIG. 1, the specific process of the interface access method includes the following steps. Figure 11

[0222] At step 1101, the Swagger document is parsed to obtain interface metadata of each to-be-accessed interface.

[0223] At step 1102, interface key data sets are extracted from each interface metadata.

[0224] At step 1103, the type of each key element in the interface key data set is determined.

[0225] At step 1104, if the key element is path / Method (an abstract element), the abstract element is converted into MCP Toolname (tool data). ​

[0226] If the key element is Parameter, convert the summary element to MCPArgument Schema in step 1105.

[0227] If the key element is description, convert the summary element to parameter description data based on the large language model in step 1106.

[0228] In step 1107, the MCP Tool object is constructed according to the MCP object data, parameter description data and tool data.

[0229] In step 1108, the target MCP configuration file is generated based on the MCP Tool object.

[0230] In an exemplary embodiment, Figure 12 An exemplary embodiment of the architecture of the interface access system is shown in FIG. 1. As shown in the figure, the interface access system includes a parsing and preprocessing module, a security policy definition module, a Swagger API semantic mapping module, a security policy conversion module, a configuration generation module and an MCP verification module. Among them: Figure 12 The parsing and preprocessing module is used to obtain API interface documents from Swagger file source Swagger URL Git repository (a kind of code repository), and parse them into metadata of each interface to be accessed.

[0231] The security policy definition module is used to edit security policy mapping rules.

[0232] The security policy conversion module is used to map the key values corresponding to the application interface security policy elements according to the security policy mapping rules to the MCP security policy.

[0233] The Swagger API semantic mapping module calls the model context interface MCP configuration template, and updates each key value in the interface key data set to the MCP configuration template based on the mapping relationship between each key element and each configuration placeholder in the MCP configuration template, to obtain an initial MCP configuration file.

[0234] The configuration generation module is used to enhance the information of the initial MCP configuration file based on the large language model, to obtain a target MCP configuration file. At the same time, the MCP security policy is added to the target MCP configuration file.

[0235] The MCP verification module is used to display and verify the target MCP configuration file.

[0236]

[0237] ​It should be understood that, although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.

[0238] Based on the same inventive concept, the embodiments of the present application also provide an interface access device for implementing the above-mentioned interface access method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more interface access device embodiments provided below can refer to the limitations of the interface access method in the above text, which will not be repeated here.

[0239] In one exemplary embodiment, as shown in Figure 13 An interface access device 1300 is provided, comprising: an acquisition module 1301, an analysis module 1302, a calling module 1303, and an enhancement module 1304, wherein:

[0240] The acquisition module 1301 is configured to acquire an application program interface document of a system to be accessed; the application program interface document contains interface metadata of each interface to be accessed.

[0241] The analysis module 1302 is configured to, for each interface to be accessed, analyze the interface metadata, and extract an interface key data set from the analyzed interface metadata based on each key element.

[0242] The calling module 1303 is configured to call a model context interface MCP configuration template, and update each key value in the interface key data set to the MCP configuration template based on a mapping relationship between each key element and each configuration placeholder in the MCP configuration template, to obtain an initial MCP configuration file.

[0243] The enhancement module 1304 is configured to perform information enhancement on the initial MCP configuration file based on a large language model, to obtain a target MCP configuration file, and perform interface configuration on a target agent according to the target MCP configuration file.

[0244] In an example embodiment, the parsing module 1302 includes:

[0245] A first parsing submodule is configured to parse the interface metadata to obtain initial elements and initial values corresponding to the initial elements.

[0246] A first determining submodule is configured to determine key elements from the initial elements and determine key values corresponding to the key elements.

[0247] A first constructing submodule is configured to construct an interface key data set for the interface to be accessed according to the key elements and the key values corresponding to the key elements.

[0248] In an example embodiment, the configuration placeholders are respectively a tool placeholder, a parameter description placeholder, and an MCP object placeholder, the key elements are respectively a summary element, a description element, and a parameter element, and the calling module 1303 includes:

[0249] A first updating submodule is configured to update the key value corresponding to the summary element to the MCP configuration template based on a mapping relationship between the tool placeholder and the summary element.

[0250] A second updating submodule is configured to update the key value corresponding to the description element to the MCP configuration template according to a mapping relationship between the parameter description placeholder and the description element.

[0251] A third updating submodule is configured to update the key value corresponding to the parameter element to the MCP configuration template according to a mapping relationship between the MCP object placeholder and the parameter element, to obtain an initial MCP configuration file.

[0252] In an example embodiment, the key elements further include an application program interface security policy element, and the interface access apparatus 1300 further includes:

[0253] A mapping module is configured to map the key value corresponding to the application program interface security policy element to an MCP security policy according to a security policy mapping rule.

[0254] An adding module is configured to add the MCP security policy to the initial MCP configuration file.

[0255] In an example embodiment, the enhancing module 1304 includes a first enhancing submodule and a first configuration submodule. The first enhancing submodule includes:

[0256] A first generating submodule is configured to generate an MCP configuration file to be enhanced based on the initial MCP configuration file and a preset question template.

[0257] The second enhancement module is configured to extract semantic features of the to-be-enhanced MCP configuration file based on the large language model, and perform semantic enhancement on tool data and parameter description data in the to-be-enhanced MCP configuration file according to the semantic features, to obtain an initial target MCP configuration file.

[0258] The first conversion submodule is configured to perform format conversion on the initial target MCP configuration file according to a preset file format, to obtain a target MCP configuration file.

[0259] In an example embodiment, the question template includes different question placeholders, and the first generation submodule is specifically configured to determine, for each configuration keyword in the initial MCP configuration file, a question placeholder corresponding to the configuration keyword; and update each question placeholder based on a configuration key value corresponding to each configuration keyword, to obtain the to-be-enhanced MCP configuration file.

[0260] In an example embodiment, the interface access apparatus 1300 further includes:

[0261] The receiving module is configured to receive a user instruction, and extract instruction features in the user instruction based on a target agent.

[0262] The first determining module is configured to determine, based on the instruction features, a to-be-called MCP configuration file in each target MCP configuration file, and determine a to-be-called interface corresponding to the to-be-called MCP configuration file.

[0263] The second determining module is configured to determine, based on the to-be-called interface and the target agent, an instruction result corresponding to the user instruction.

[0264] Each module in the interface access apparatus described above can be realized in whole or in part by software, hardware, and a combination thereof. Each module described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.

[0265] In an example embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in Figure 14The computer device shown in the figure includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be realized through WIFI, mobile cellular network, near field communication (NFC) or other technologies. The computer program is executed by the processor to realize an interface access method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0266] Those skilled in the art can understand that, Figure 14 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0267] In one embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to realize the steps in each of the above method embodiments.

[0268] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to realize the steps in each of the above method embodiments.

[0269] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by a processor to realize the steps in each of the above method embodiments.

[0270] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0271] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. In the embodiments provided in the present application, any reference to memory, database or other medium can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0272] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, any combination of these technical features is deemed to be within the scope of the present application.

[0273] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An interface access method, characterized in that, The method includes: Obtain the application programming interface (API) documentation of the system to be connected; the API documentation contains the API metadata of each API to be connected. For each interface to be accessed, the interface metadata is parsed, and based on each key element, the interface key dataset is extracted from the parsed interface metadata. The Model Context Interface (MCP) configuration template is invoked, and based on the mapping relationship between each key element and each configuration placeholder in the MCP configuration template, each key value in the interface key dataset is updated to the MCP configuration template to obtain the initial MCP configuration file. The initial MCP configuration file is augmented using a large language model to obtain a target MCP configuration file, and the target agent is configured with an interface based on the target MCP configuration file.

2. The method according to claim 1, characterized in that, The process involves parsing the interface metadata and extracting the interface key dataset from the parsed interface metadata based on each key element, including: Parse the interface metadata to obtain each initial element and its corresponding initial value; Each key element is determined from each of the initial elements, and the key value corresponding to each key element is determined. The interface key dataset is constructed based on each key element and the key value corresponding to each key element.

3. The method according to claim 1, characterized in that, The configuration placeholders are tool placeholders, parameter description placeholders, and MCP object placeholders. The key elements are summary elements, description elements, and parameter elements. Based on the mapping relationship between the key elements and the configuration placeholders in the MCP configuration template, the key values ​​in the interface key dataset are updated to the MCP configuration template to obtain the initial MCP configuration file, including: Based on the mapping relationship between the tool placeholders and the summary elements, the key values ​​corresponding to the summary elements are updated in the MCP configuration template; Based on the mapping relationship between the parameter description placeholder and the description element, update the key value corresponding to the description element to the MCP configuration template; Based on the mapping relationship between the MCP object placeholders and the parameter elements, the key values ​​corresponding to the parameter elements are updated in the MCP configuration template to obtain the initial MCP configuration file.

4. The method according to claim 1, characterized in that, The key elements also include application interface security policy elements. After adding key values ​​from the interface key dataset to the MCP configuration template based on the mapping relationship between each key element and each configuration placeholder in the MCP configuration template to obtain the initial MCP configuration file, the method further includes: According to the security policy mapping rules, the key values ​​corresponding to the application interface security policy elements are mapped to the MCP security policy; Add the MCP security policy to the initial MCP configuration file.

5. The method according to claim 1, characterized in that, The process of augmenting the initial MCP configuration file based on a large language model to obtain the target MCP configuration file includes: Based on the initial MCP configuration file and the preset question template, generate an MCP configuration file to be enhanced; The semantic features of the MCP configuration file to be enhanced are extracted based on the large language model, and the tool data and parameter description data in the MCP configuration file to be enhanced are semantically enhanced according to the semantic features to obtain the initial target MCP configuration file. The initial target MCP configuration file is converted according to the preset file format to obtain the target MCP configuration file.

6. The method according to claim 5, characterized in that, The question template contains various question placeholders. Based on the initial MCP configuration file and the preset question template, an enhanced MCP configuration file is generated, including: For each configuration keyword in the initial MCP configuration file, determine the corresponding question placeholder; Update the query placeholders based on the configuration key values ​​corresponding to each configuration keyword to obtain the MCP configuration file to be enhanced.

7. The method according to claim 1, characterized in that, After configuring the target agent's interface according to the target MCP configuration file, the method further includes: Receive user instructions and extract instruction features from the user instructions based on the target intelligent agent; Based on the instruction characteristics, determine the MCP configuration file to be called in each of the target MCP configuration files, and determine the interface to be called corresponding to the MCP configuration file to be called; Based on the interface to be invoked and the target intelligent agent, the instruction result corresponding to the user instruction is determined.

8. An interface access device, characterized in that, The device includes: The acquisition module is used to acquire the application programming interface (API) document of the system to be accessed; the API document contains the interface metadata of each API to be accessed. The parsing module is used to parse the interface metadata for each interface to be accessed, and extract the interface key dataset from the parsed interface metadata based on each key element. The calling module is used to call the Model Context Interface (MCP) configuration template, and based on the mapping relationship between each key element and each configuration placeholder in the MCP configuration template, update each key value in the interface key dataset to the MCP configuration template to obtain the initial MCP configuration file. The enhancement module is used to enhance the initial MCP configuration file based on the large language model to obtain the target MCP configuration file, and to configure the interface of the target agent according to the target MCP configuration file.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.