Method and system for building MCP architecture based on double-class dynamic parameters

By introducing a dynamic parameter mechanism into the MCP architecture, and using a large language model to parse unstructured parameters input by users and generate a structured list of double values, the problem that the existing MCP architecture cannot adapt to the uncertain number of input parameters is solved, and flexible adaptation to complex and ever-changing tool calling scenarios is achieved.

CN121008941APending Publication Date: 2025-11-25CHINA RAILWAY CHONGQING SURVEYING DESIGN RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511114207.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing MCP architecture construction methods cannot effectively and flexibly define tool function input parameters, especially in scenarios where the number of input parameters is uncertain and repetitive.

Method used

The method adopts the MCP architecture based on double-class dynamic parameters. By creating dynamic array variables on the MCP server, the unstructured parameters input by the user are parsed using a large language model to generate a structured list of double values, which is then passed to the tool on the MCP server. The tool accesses the URL address resolution server via the URL address to parse the target dynamic link library name and input parameters, and finally performs the calculation in the open API interface.

Benefits of technology

It achieves adaptability to scenarios with uncertain and repetitive input parameters, overcomes the rigidity of parameter definition in existing methods, supports dynamic generation and parsing of parameter lists at runtime, and enhances MCP's adaptability to complex and ever-changing tool call scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121008941A_ABST
    Figure CN121008941A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of artificial intelligence model interaction and integration, and particularly discloses an MCP architecture building method and system based on double-class dynamic parameters, and the method comprises the following steps: creating a double-type dynamic array variable in an MCP server, the method comprises the following steps of: analyzing an input parameter of a user by utilizing a large language model at an MCP client, outputting the input parameter as a structured double value list, and transmitting and assigning the generated double value list to a dynamic array variable of an MCP server by taking the generated double value list as a calling parameter; each element in the dynamic array variable is transmitted to a tool of an MCP server, a url address resolution server is accessed through a url address, input parameters are converted to obtain a plurality of structural bodies, the structural bodies are added to the same container, then the container is transmitted to a target dynamic link library, and subsequent data operation is carried out. By adopting the technical scheme, the MCP architecture is constructed based on the dynamic parameters, dynamic generation and analysis of the parameter list during operation are supported, and the adaptive capacity of the MCP to a complex and changeable tool calling scene is remarkably enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of artificial intelligence model interaction and integration, and relates to a MCP architecture building method and system based on double type dynamic parameters. BACKGROUND

[0002] The existing MCP (Model Context Protocol) architecture building method has significant limitations in dealing with specific complex scenarios. One prominent problem is handling tool invocation requirements with uncertain but repetitive input parameter quantities.

[0003] The existing method usually requires developers to explicitly specify all input parameters and their fixed quantities when defining MCP server tool functions and dynamic link library functions. This static definition method cannot provide a suitable solution in some typical scenarios, such as when a user needs to create a tool to calculate the sum of the volumes of multiple cylinders, which requires receiving multiple attributes of multiple cylinders. The existing MCP architecture building method cannot predict or accommodate such dynamic parameter quantities during the definition phase. SUMMARY

[0004] The purpose of the present application is to provide a MCP architecture building method and system based on double type dynamic parameters to solve the problem that the existing MCP server building method cannot effectively and flexibly define tool function input parameters.

[0005] To achieve the above purpose, the basic scheme of the present application is a MCP architecture building method based on double type dynamic parameters, comprising the following steps:

[0006] S1. In the MCP server, create a dynamic array variable of double type as a core parameter array;

[0007] S2. In the MCP client, design prompt words to parse and output the user's unstructured parameters as a structured double value list using a large language model. The generated double value list is passed and assigned to the dynamic array variable of the MCP server as a call parameter;

[0008] Each element in the dynamic array variable is sequentially passed to the tool in the MCP server, which is a function tool found in the MCP server by the large language model based on the user's semantic and needs to be called;

[0009] S3. Based on the tool in the MCP server, each element in the dynamic array variable is converted to a string and added to the url address, and the url address resolution server is accessed through the url address.

[0010] S4, the url address resolution server receives the url address containing the target dynamic link library name and the input parameter, resolves the url address to obtain the target dynamic link library name and the original double value list, i.e. the input parameter;

[0011] Convert the original double value list into multiple structure variables and add them to the same container variable to implement the function operation required by the user;

[0012] S5, the url address resolution server calls the target dynamic link library of the open API interface, transmits the obtained container variable to the target dynamic link library, and performs subsequent user demand operation, wherein the target dynamic link library is a running program that specifically implements the user demand.

[0013] The working principle and beneficial effects of the basic scheme are that the technical scheme introduces a dynamic parameter mechanism (a dynamic array of double type), effectively solves the key problem of uncertain and repetitive input parameter quantity, and overcomes the rigid defect of requiring pre-fixed parameter definition in the existing MCP architecture building method. Support for runtime dynamic generation and parameter list parsing significantly enhances the adaptability of MCP to complex and variable tool calling scenarios, without the need for pre-exhaustive enumeration of all possible parameters.

[0014] Further, in step S1, the method for creating a dynamic array variable of double type as a core parameter array in the MCP server is:

[0015] A global variable List is created in the MCP server building platform, and the List is a dynamic array variable of double type;

[0016] After executing the MCP tool each time, clean up all elements in the List.

[0017] In the MCP server, a dynamic array of double type is created as a core parameter array to implement server-side parameter container initialization.

[0018] Further, in step S2, in the MCP client, the user's unstructured parameters are parsed and output as a structured double value list by using a large language model through the design of a prompt word, specifically:

[0019] In the MCP client, the input parameters are processed by flattening, i.e. all input parameters are arranged in a list format, and a prompt word is added:

[0020] "Enter the input parameters into the "XXX parameter list" tool according to the parameter list format, and the parameter list format is:

[0021] input parameter 1-1, input parameter 2-1, input parameter 3-1, …, input parameter m-1,

[0022] input parameter 1-2, input parameter 2-2, input parameter 3-2, …, input parameter m-2,

[0023] …,

[0024] input parameter 1-n, input parameter 2-n, input parameter 3-n, …, input parameter m-n.

[0025] Wherein, m is the number of parameters in the smallest repeating unit in the input parameter list, and n is the number of groups of the smallest repeating unit.

[0026] In the MCP client, by designing a specific prompt (i.e. a specific prompting text added after the user's demand text, guiding the large language model to extract the unstructured input parameters in the user's demand text in the form of a list), the large language model is guided to parse and output the unstructured parameters input by the user into a structured double value list, completing the client parameter structured input.

[0027] Further, in step S2, the generated double value list is passed and assigned to the dynamic array variable of the MCP server as a calling parameter, i.e. the method of global variable List is as follows:

[0028] Create an "XXX parameter list" tool in the MCP server platform, and the formal parameter variable is a double type dynamic array variable Parameters, where "XXX" is an object described by the user, which has multiple parameter attributes;

[0029] The formal parameter variable Parameters of the tool receives the input parameters (i.e. the double value list) described by the user in the MCP client, and the tool sequentially passes each element of Parameters to List, specifically:

[0030] S21, get the length Len1 of variable Parameters;

[0031] S22, let the count variable i = 0;

[0032] S23, when i is less than Len1, add the i-th element Parameters[i] of Parameters to variable List, specifically:

[0033] List.add(Parameters[i]);

[0034] The `add` function adds a specific element to the array.

[0035] S24, the counter variable i is increased by 1;

[0036] S25. Repeat steps S23 and S24 until i is not less than Len1.

[0037] The large model extracts the input parameters from the user's dialogue text in a list format. In the MCP client, the large model is guided to flatten the input parameters, that is, to arrange all the input parameters in a list format and add prompts to facilitate use.

[0038] Furthermore, in step S2, each element in the dynamic array variable List is passed sequentially to the tool Tool_A in the MCP server. Tool_A is the function tool that the large model finds and calls in the MCP server according to the user's semantics.

[0039] Furthermore, in step S3, the specific steps for converting each element in the dynamic array variable List into a string and adding it to the URL address using Tool_A in the MCP server are as follows:

[0040] S31. Create a new string variable str in Tool_A, and initialize its value as follows:

[0041] "http: / / XX.XX.XXX.X:8080 / api?DLL_Name";

[0042] Where “XX.XX.XXX.X” is the IP address of the computer where the URL address resolution server is located, and “DLL_Name” is the name of the target dynamic link library exposed to the outside world;

[0043] S32, get the length of the variable List, Len2;

[0044] S33, let the counter variable ii = 0;

[0045] S34, when ii is less than Len2, add an "&" symbol to the end of the variable str, then convert the ii-th element of the List to a string and append it after the "&" symbol. The specific implementation is as follows:

[0046] str.append("&").append(Double.toString(List.get(ii)));

[0047] The Double.toString() function converts a double type variable to a string type variable; the append() function appends another string to the end of the string.

[0048] S35, the counter variable ii increases by 1;

[0049] S36, repeat steps S34 and S35 until ii is not less than Len2;

[0050] S37, pass the variable str to the URL address:

[0051] URL url = new URL(str).

[0052] This invention addresses the challenge of effectively embedding and transmitting dynamic parameters within URLs, enabling flexible and standardized parameter routing.

[0053] Furthermore, in step S4, the method for parsing the URL address to obtain the target dynamic link library name and the original list of double values ​​(i.e., input parameters), and converting the list of double values ​​into multiple structure variables, is as follows:

[0054] Extract the string after "api?" from the URL address;

[0055] In the extracted string, the strings separated by the "&" symbol are extracted sequentially. The first string is the name of the target dynamic link library, i.e., "DLL_Name"; the second and subsequent strings are string type input parameters.

[0056] The extracted string input parameters are sequentially converted to double type input parameters and stored in a double type container variable Parameters_Double, which is used to temporarily store these double type input parameters.

[0057] Calculate the minimum number of repeating unit groups n for the input parameters, and divide the input parameters into n groups, with m input parameters in each group:

[0058]

[0059] Where Size_Param is the number of elements in Parameters_Double; [] indicates that the calculation result is rounded down; m is the number of parameters in the smallest repeating unit in the input parameter list;

[0060] Define n structure variables, each structure variable having m member variables;

[0061] The elements in Parameters_Double are grouped into m groups and passed to these n structure variables;

[0062] Add these n structure variables to a container variable, which will be used for subsequent data operations.

[0063] This paper addresses the problems of dynamically identifying the target dynamic link library name and input parameters from the URL address, and how to convert the input parameters into a strongly typed structure required for efficient computation, thus achieving accurate distribution and efficient computation preparation.

[0064] Furthermore, in step S5, the URL address resolution server calls the target dynamic link library of the open API interface, passes the obtained container variable to the target dynamic link library for subsequent calculations, and the target dynamic link library is a running program that specifically implements the user's requirements.

[0065] The present invention also provides an MCP system based on double-class dynamic parameters, including an MCP server, an MCP client, and a control unit. The MCP server is connected to the MCP client, and the control unit is connected to both the MCP server and the MCP client. The control unit executes the method described in the present invention to accommodate dynamically changing parameter numbers during the definition phase.

[0066] This system is based on an MCP server, an MCP client, and a control unit. According to the Model Context Protocol, it overcomes the rigidity of existing protocols that require pre-defined parameters and enhances the adaptability of MCP to complex and ever-changing tool calling scenarios. Attached Figure Description

[0067] Figure 1 This is a flowchart illustrating the method for building an MCP architecture based on dynamic parameters of the double class according to the present invention. Detailed Implementation

[0068] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0069] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0070] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0071] This invention discloses a method for building an MCP architecture based on double-class dynamic parameters. Based on the Model Context Protocol (MCP), it addresses the key problem that existing MCP building methods cannot effectively and flexibly define the input parameters of tool functions when the number of input parameters is uncertain and has repetitive characteristics in tool invocation scenarios.

[0072] The MCP architecture includes components such as a host, client, server, URL resolution server, and resources (e.g., dynamic link libraries called via API). This invention relates to the operation of clients, servers, URL resolution servers, dynamic link libraries, etc.

[0073] like Figure 1 As shown, the method for building an MCP architecture based on dynamic parameters of the double class includes the following steps:

[0074] S1, Server-side parameter container initialization: On the MCP server, a dynamic array variable of type double is created as the core parameter array;

[0075] S2, in the MCP client, by designing prompt words, the large language model is used to parse the unstructured parameters input by the user and output them as a structured list of double values. The generated list of double values ​​is then passed as a call parameter and assigned to the dynamic array variable of the MCP server.

[0076] The tool that passes each element in the dynamic array variable to the MCP server in sequence is a function tool that the large language model finds in the MCP server and needs to call based on the user's semantics.

[0077] S3, based on the tool in the MCP server, each element in the dynamic array variable is converted into a string and added to the URL (URL is a Uniform Resource Locator, an address string used to identify Internet resources, such as web pages, files or API endpoints, which is the specific path to access resources) address, and the URL address resolution server is accessed through the URL address;

[0078] S4, The URL address resolution server receives the URL address, which contains the target dynamic link library name and input parameters. It parses the URL address to obtain the target dynamic link library name and the original list of double values, i.e., the input parameters.

[0079] The original list of double values ​​is converted into multiple structure variables and added to the same container variable to implement the function operations required by the user.

[0080] Data structuring and computation preparation: The original list of double values ​​is converted into multiple structure variables (the grouped values ​​are filled into the corresponding structure variable instances, each structure variable represents a parameter group with specific semantics), and added to the same container variable (such as an array, list, or vector) to form a complete, structured input dataset required for computation, which is used to implement the function operations required by the user.

[0081] A container variable is a data structure that encapsulates multiple elements for storing and managing those elements. For example, in C++, the standard library provides various container types, including but not limited to vector, list, deque, array, forward list, map, and set.

[0082] S5. The URL address resolution server calls the target dynamic link library of the open API interface, passes the obtained container variable to the target dynamic link library, and performs subsequent data calculations based on user requirements. The target dynamic link library is the running program that specifically implements the user requirements.

[0083] Subsequent data operations refer to the specific function operations within the target dynamic link library that implement the user's requirements. These functions have an uncertain number of input parameters, but the input parameters are repetitive. For example, if the user's requirement is to calculate the sum of the volumes of multiple cylinders with known radii and heights, and the target dynamic link library contains a function that "calculates the sum of the volumes of multiple cylinders," then the subsequent data operations refer to the volume summation operation.

[0084] In a preferred embodiment of the present invention, in step S1, the method for creating a dynamic array variable of type double as the core parameter array on the MCP server is as follows:

[0085] Create a global variable List in the MCP server building platform (such as SpringAI). List is a dynamic array variable of type double.

[0086] After each execution of the MCP tool, clean up all elements in the List.

[0087] In a preferred embodiment of the present invention, step S2, in the MCP client, involves designing prompt words and using a large language model to parse the unstructured parameters input by the user and output them as a structured list of double values, as follows:

[0088] In the MCP client, the input parameters are flattened, that is, all input parameters are arranged in a list format, and prompt words are added:

[0089] Enter the input parameters into the "XXX Parameter List" tool according to the parameter list format. The parameter list format is as follows:

[0090] Input parameter 1-1, Input parameter 2-1, Input parameter 3-1, ..., Input parameter m-1

[0091] Input parameter 1-2, Input parameter 2-2, Input parameter 3-2, ..., Input parameter m-2

[0092] ……

[0093] Input parameters 1-n, input parameters 2-n, input parameters 3-n, ..., input parameters mn

[0094] Where m is the number of parameters in the smallest repeating unit in the input parameter list, and n is the number of groups of the smallest repeating unit.

[0095] The content within the quotation marks is the cue word. The purpose of this cue word is to instruct the large model to flatten the input parameters, that is, to arrange all the input parameters in a list format.

[0096] In a preferred embodiment of the present invention,

[0097] In step S2, the method of passing and assigning the generated list of double values ​​as a call parameter to the dynamic array variable of the MCP server, i.e., the global variable List, is as follows:

[0098] Create an "XXX parameter list" tool in the MCP server platform. Its formal parameter variable is a dynamic array variable Parameters of type double, where "XXX" is a user-described object with multiple parameter attributes.

[0099] The tool's parameter variable Parameters receives input parameters, i.e., a list of double values, described by the user in the MCP client. The tool then passes each element of Parameters sequentially to the List, specifically:

[0100] S21, get the length of variable Parameters, Len1;

[0101] S22, let the counting variable i = 0;

[0102] S23, when i is less than Len1, add the i-th element Parameters[i] of Parameters to the variable List, specifically:

[0103] List.add(Parameters[i]);

[0104] The `add` function adds a specific element to the array.

[0105] S24, the counter variable i is increased by 1;

[0106] S25. Repeat steps S23 and S24 until i is not less than Len1.

[0107] In a preferred embodiment of the present invention, step S2 sequentially passes each element in the dynamic array variable List to the tool Tool_A in the MCP server. Tool_A is the function tool that the large model finds and calls in the MCP server according to the user's semantics.

[0108] For example, the MCP server has a tool described as "Calculate the sum of the volumes of cylinders". A user's description is: "There are three cylinders: Cylinder 1 has a radius of 1cm and a height of 2cm; Cylinder 2 has a radius of 1cm and a height of 2cm; Cylinder 3 has a radius of 1cm and a height of 2cm; what is the sum of the volumes of all the cylinders?" In this case, the large model recognizes the need to call the "Calculate the sum of the volumes of cylinders" tool, which would then be Tool_A.

[0109] In a preferred embodiment of the present invention,

[0110] In step S3, the specific steps for converting each element in the dynamic array variable List into a string and adding it to the URL address using Tool_A in the MCP server are as follows:

[0111] S31. Create a new string variable str in Tool_A, and initialize its value as follows:

[0112] "http: / / XX.XX.XXX.X:8080 / api?DLL_Name";

[0113] Where “XX.XX.XXX.X” is the IP address of the computer where the URL address resolution server is located, and “DLL_Name” is the name of the target dynamic link library exposed to the outside world;

[0114] S32, get the length of the variable List, Len2;

[0115] S33, let the counter variable ii = 0;

[0116] S34, when ii is less than Len2, add an "&" symbol to the end of the variable str, then convert the ii-th element of the List to a string and append it after the "&" symbol. The specific implementation is as follows:

[0117] str.append("&").append(Double.toString(List.get(ii)));

[0118] The Double.toString() function converts a double type variable to a string type variable; the append() function appends another string to the end of the string.

[0119] S35, the counter variable ii increases by 1;

[0120] S36, repeat steps S34 and S35 until ii is not less than Len2;

[0121] S37, pass the variable str to the URL address:

[0122] URL url = new URL(str).

[0123] In a preferred embodiment of the present invention,

[0124] In step S4, the URL address is parsed to obtain the target dynamic link library name and the original list of double values ​​(i.e., input parameters), and the method for converting the list of double values ​​into multiple structure variables is as follows:

[0125] Extract the string after "api?" from the URL address;

[0126] In the extracted string, the strings separated by the "&" symbol are extracted sequentially. The first string is the name of the target dynamic link library, i.e., "DLL_Name"; the second and subsequent strings are string type input parameters.

[0127] The extracted string input parameters are sequentially converted to double type input parameters and stored in a double type container variable Parameters_Double, which is used to temporarily store these double type input parameters.

[0128] Calculate the minimum number of repeating unit groups n for the input parameters, and divide the input parameters into n groups, with m input parameters in each group:

[0129]

[0130] Where Size_Param is the number of elements in Parameters_Double; [] indicates that the calculation result is rounded down; m is the number of parameters in the smallest repeating unit in the input parameter list;

[0131] Define n structure variables, each structure variable having m member variables;

[0132] The elements in Parameters_Double are grouped into m groups and passed to these n structure variables;

[0133] Add these n structure variables to a container variable, which will be used for subsequent data operations.

[0134] The URL resolution server calls the target dynamic link library of the open API interface, passes the obtained container variables to the target dynamic link library for subsequent data operations, and the target dynamic link library is the running program that specifically implements the user's requirements.

[0135] Subsequent data operations refer to operations where the number of input parameters is uncertain but the input parameters have repetitive characteristics. For example, if a user sets up an MCP server to "calculate the sum of the volumes of multiple cylinders", then the subsequent data operations refer to the volume summation operation.

[0136] The present invention also provides an MCP system based on double-type dynamic parameters, including an MCP server, an MCP client, and a control unit. The MCP server is connected to the MCP client, and the control unit is connected to both the MCP server and the MCP client. The control unit executes the method described in the present invention to accommodate dynamically changing parameter numbers during the definition phase.

[0137] This invention innovatively introduces a dynamic parameter mechanism, effectively solving the key problem of uncertain and repetitive input parameters, and overcoming the rigidity of existing protocols that require pre-defined parameters. It supports runtime dynamic generation and parsing of parameter lists, significantly enhancing MCP's adaptability to complex and ever-changing tool invocation scenarios, without requiring the protocol layer to exhaustively enumerate all possible parameters beforehand.

[0138] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0139] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for constructing an MCP architecture based on dynamic parameters of the double class, characterized in that, Includes the following steps: S1. On the MCP server, create a dynamic array variable of type double as the core parameter array; S2, in the MCP client, by designing prompt words, the large language model is used to parse the unstructured parameters input by the user and output them as a structured list of double values. The generated list of double values ​​is then passed as a call parameter and assigned to the dynamic array variable of the MCP server. The tool that sequentially passes each element of the dynamic array variable to the MCP server is a function tool that the large language model finds in the MCP server and needs to call based on the user's semantics. S3, based on the tool in the MCP server, each element in the dynamic array variable is converted into a string and added to the URL address, and the URL address resolution server is accessed through the URL address; S4, The URL address resolution server receives the URL address, which contains the target dynamic link library name and input parameters. It parses the URL address to obtain the target dynamic link library name and the original list of double values, i.e., the input parameters. The original list of double values ​​is converted into multiple structure variables and added to the same container variable to implement the function operations required by the user. S5, the URL address resolution server calls the target dynamic link library of the open API interface, passes the obtained container variable to the target dynamic link library, and performs user requirement calculations. The target dynamic link library is the running program that specifically implements the user requirements.

2. The method for building an MCP architecture based on dynamic parameters of the double class as described in claim 1, characterized in that, In step S1, the method for creating a dynamic array variable of type double as the core parameter array on the MCP server is as follows: Create a global variable List in the MCP server building platform. List is a dynamic array variable of type double. After each execution of the MCP tool, clean up all elements in the List.

3. The method for building an MCP architecture based on dynamic parameters of the double class as described in claim 1, characterized in that, In step S2, on the MCP client, by designing prompt words, the unstructured parameters input by the user are parsed using a large language model and output as a structured list of double values. Specifically: In the MCP client, the input parameters are flattened, that is, all input parameters are arranged in a list format, and prompt words are added: Enter the input parameters into the "XXX Parameter List" tool according to the parameter list format. The parameter list format is as follows: Input parameter 1-1, Input parameter 2-1, Input parameter 3-1, ..., Input parameter m-1 Input parameter 1-2, Input parameter 2-2, Input parameter 3-2, ..., Input parameter m-2 ……、 Input parameters 1-n, input parameters 2-n, input parameters 3-n, ..., input parameters mn Where m is the number of parameters in the smallest repeating unit in the input parameter list, and n is the number of groups of the smallest repeating unit.

4. The method for building an MCP architecture based on dynamic parameters of the double class as described in claim 2, characterized in that, In step S2, the method of passing and assigning the generated list of double values ​​as a call parameter to the dynamic array variable of the MCP server, i.e., the global variable List, is as follows: Create a "XXX parameter list" tool in the MCP server platform. Its formal parameter variable is a dynamic array variable Parameters of type double, where "XXX" is a user-described object with multiple parameter attributes. The tool's parameter variable Parameters receives input parameters, i.e., a list of double values, described by the user in the MCP client. The tool then passes each element of Parameters sequentially to the List, specifically: S21, get the length of variable Parameters, Len1; S22, let the counting variable i = 0; S23, when i is less than Len1, add the i-th element Parameters[i] of Parameters to the variable List, specifically: List.add(Parameters[i]); The `add` function adds a specific element to the array. S24, the counter variable i is increased by 1; S25. Repeat steps S23 and S24 until i is not less than Len1.

5. The method for building an MCP architecture based on dynamic parameters of the double class as described in claim 3, characterized in that, Step S2 passes each element in the dynamic array variable List to the tool Tool_A in the MCP server in sequence. Tool_A is the function tool that the large model finds and calls in the MCP server according to the user's semantics.

6. The method for building an MCP architecture based on dynamic parameters of the double class as described in claim 5, characterized in that, In step S3, the specific steps for converting each element in the dynamic array variable List into a string and adding it to the URL address using Tool_A in the MCP server are as follows: S31. Create a new string variable str in Tool_A, and initialize its value as follows: "http: / / XX.XX.XXX.X:8080 / api?DLL_Name"; Where "XX.XX.XXX.X" is the IP address of the computer where the URL address resolution server is located, and "DLL_Name" is the name of the target dynamic link library exposed to the outside world; S32, get the length of the variable List, Len2; S33, let the counter variable ii = 0; S34, when ii is less than Len2, add an "&" symbol to the end of the variable str, then convert the ii-th element of the List to a string and append it after the "&" symbol. The specific implementation is as follows: str.append("&").append(Double.toString(List.get(ii))); The Double.toString() function converts a double type variable to a string type variable; the append() function appends another string to the end of the string. S35, the counter variable ii increases by 1; S36, repeat steps S34 and S35 until ii is not less than Len2; S37, pass the variable str to the URL address: URL url = new URL(str).

7. The method for building an MCP architecture based on dynamic parameters of the double class as described in claim 1, characterized in that, In step S4, the method for parsing the URL address to obtain the target dynamic link library name and the original list of double values, and converting the list of double values ​​into multiple structure variables, is as follows: Extract the string after "api?" from the URL address; In the extracted string, the strings separated by "&" are extracted sequentially. The first string is the name of the target dynamic link library, i.e., "DLL_Name"; the second and subsequent strings are string type input parameters. The extracted string input parameters are converted into double type input parameters one by one and stored in a double type container variable Parameters_Double. This container variable is used to temporarily store these double type input parameters. Calculate the minimum number of repeating unit groups n for the input parameters, and divide the input parameters into n groups, with m input parameters in each group: Where Size_Param is the number of elements in Parameters_Double; [] indicates that the calculation result is rounded down; m is the number of parameters in the smallest repeating unit in the input parameter list; Define n structure variables, each structure variable having m member variables; The elements in Parameters_Double are grouped into m groups and passed to these n structure variables; Add these n structure variables to a container variable, which will be used for subsequent data operations.

8. An MCP system based on double-class dynamic parameters, characterized in that, It includes an MCP server, an MCP client, and a control unit. The MCP server is connected to the MCP client, and the control unit is connected to both the MCP server and the MCP client. The control unit executes the method described in any one of claims 1-7 to accommodate dynamically changing parameters during the definition phase.