Biological information MCP service calling method, system, equipment and medium

Through the MCP service call method, the problem of insufficient scalability and flexibility of tool call in the field of bioinformatics is solved, automated discovery and accurate tool call are realized, the system is scalable and flexible, and large-scale bioinformatics MCP services are supported.

CN120336048AInactive Publication Date: 2025-07-18BEIJING XIANYUN QIYUAN TECH CO LTD

Patent Information

Application Number
CN202510829204.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the field of bioinformatics, the prior art has poor scalability and insufficient flexibility when calling bioinformatics tools, which is difficult to meet the needs of large-scale and dynamically changing tool calls.

Method used

The MCP service call method is adopted to obtain user request information, perform vector processing, query the matching MCP service information in the vector database, and build enhancement prompt information to send to the large language model to generate call parameters, and finally call the target biological information MCP service.

Benefits of technology

It realizes automated discovery of MCP services, improves the scalability and flexibility of the system, accurately understands user intentions, lowers the threshold for use, ensures interoperability and scalability, and supports large-scale bioinformatics MCP service scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336048A_ABST
    Figure CN120336048A_ABST
Patent Text Reader

Abstract

The invention relates to a biological information MCP service calling method, system and device and a medium, and relates to the technical field of bioinformatics and artificial intelligence. The method comprises the steps of obtaining user request information; querying MCP service information matched with the user request information based on the user request information; building enhanced prompt information corresponding to the MCP service information which contains the user request information and is matched with the corresponding user request information, and sending the enhanced prompt information to the large language model to generate calling parameters; and calling the target biological information MCP service based on the calling parameter. The automatic discovery of the MCP service is realized, and the expandability and the flexibility of the system are improved; the user intention can be more accurately understood, and the tool discovery accuracy is improved; an MCP specification is used for assisting LLM to accurately generate calling parameters, and the use threshold of a user is lowered; interoperability and expandability are ensured based on an MCP protocol; and a large-scale biological information MCP service scene is effectively supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of bioinformatics and artificial intelligence, and particularly to a method, system, device, and medium for calling bioinformatics MCP services. Background Art

[0002] MCP (Model Context Protocol) aims to achieve seamless integration between large language model (LLM) applications and external data sources, tools, and services. Similar to the HTTP protocol in the network or the IMAP protocol in emails, it provides a standardized way for AI applications to exchange context, call tools, and access data.

[0003] There are a vast amount of and continuously updated bioinformatics tools in the field of bioinformatics. Traditional methods of using large language models to call these tools have many drawbacks. For example, manually registering tools results in poor scalability and lack of flexibility. The semantic understanding of tool selection based on keywords or simple rules is limited. The standard Function Calling method still requires pre-defining tools, etc., making it difficult to meet the requirements of large-scale and dynamically changing bioinformatics tool calls. Summary of the Invention

[0004] Based on this, in view of the problems of poor scalability and lack of flexibility of the above bioinformatics tools, it is necessary to provide a method, system, device, and medium for calling bioinformatics MCP services.

[0005] A method for calling bioinformatics MCP services includes: Obtaining user request information; Based on the user request information, querying MCP service information that matches the user request information; Constructing enhanced prompt information including the user request information and the MCP service information corresponding to the matching user request information, and sending the enhanced prompt information to a large language model to generate call parameters; Based on the call parameters, calling the target bioinformatics MCP service.

[0006] In one preferred embodiment, the obtaining of the user request information includes: Obtaining the natural language request corresponding to the user request information; Performing vectorization processing on the natural language request to obtain vectorized query vector information.

[0007] In one preferred embodiment, the querying of the MCP service information that matches the user request information in a vector database based on the user request information includes: Convert the MCP service information into MCP vector information; Perform semantic retrieval on the query vector information and the MCP vector information to obtain MCP service information that matches the query vector information.

[0008] In one preferred embodiment, the MCP service information includes metadata of a number of MCP services.

[0009] In one preferred embodiment, the construction of enhanced prompt information corresponding to the user request information and the matching MCP service information for the user request information includes: Integrate the user request information with the matching MCP service information to form structured enhanced prompt information.

[0010] In one preferred embodiment, the sending of the enhanced prompt information to a large language model to generate call parameters includes: Organize the constructed enhanced prompt information into a text format suitable for reception by the large language model; Import the enhanced prompt information into the large language model through an API interface and export the generated call parameters through the API interface.

[0011] In one preferred embodiment, the invocation of the target bioinformatics MCP service based on the call parameters includes: Parse the call parameters and form a corresponding call request based on the parsed call parameters; Based on the call request, call the target bioinformatics MCP service information from the MCP database.

[0012] The method disclosed in the above embodiments of the present invention realizes the automatic discovery of MCP services, improves the scalability and flexibility of the system; can more accurately understand the user's intention and improve the accuracy of tool discovery; uses the MCP specification to assist the LLM to accurately generate call parameters and reduce the user's usage threshold; ensures interoperability and scalability based on the MCP protocol; effectively supports large-scale bioinformatics MCP service scenarios.

[0013] A bioinformatics MCP service invocation system includes: A user request acquisition module for acquiring user request information; A service information query module for querying MCP service information that matches the user request information based on the user request information; A call request generation module for constructing enhanced prompt information corresponding to the user request information and the matching MCP service information for the user request information, and sending the enhanced prompt information to a large language model to generate call parameters; The MCP service call module is used to call the target bioinformatics MCP service based on the call parameters.

[0014] The system disclosed in the above embodiments of the present invention realizes the automatic discovery of MCP services, improves the scalability and flexibility of the system; can more accurately understand the user's intention and improve the accuracy of tool discovery; uses the MCP specification to assist the LLM to accurately generate call parameters and reduce the user's usage threshold; ensures interoperability and scalability based on the MCP protocol; effectively supports large-scale bioinformatics MCP service scenarios.

[0015] An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned bioinformatics MCP service call method is implemented.

[0016] The electronic device disclosed in the above embodiments of the present invention realizes the automatic discovery of MCP services by executing the above method, improves the scalability and flexibility of the system; can more accurately understand the user's intention and improve the accuracy of tool discovery; uses the MCP specification to assist the LLM to accurately generate call parameters and reduce the user's usage threshold; ensures interoperability and scalability based on the MCP protocol; effectively supports large-scale bioinformatics MCP service scenarios.

[0017] A storage medium containing computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, the above-mentioned bioinformatics MCP service call method is implemented.

[0018] The storage medium disclosed in the above embodiments of the present invention realizes the automatic discovery of MCP services by executing the above method, improves the scalability and flexibility of the system; can more accurately understand the user's intention and improve the accuracy of tool discovery; uses the MCP specification to assist the LLM to accurately generate call parameters and reduce the user's usage threshold; ensures interoperability and scalability based on the MCP protocol; effectively supports large-scale bioinformatics MCP service scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic flowchart of the bioinformatics MCP service call method disclosed in the first preferred embodiment of the present invention; Figure 2 It is a schematic flowchart of the sub-steps of step S10 of the bioinformatics MCP service call method disclosed in the first preferred embodiment of the present invention; Figure 3 It is a schematic flowchart of the sub-steps of step S20 of the bioinformatics MCP service call method disclosed in the first preferred embodiment of the present invention; Figure 4Schematic diagram of the detailed steps of step S30 of the bioinformatics MCP service invocation method disclosed in the first preferred embodiment of the present invention; Figure 5 Schematic diagram of the detailed steps of step S40 of the bioinformatics MCP service invocation method disclosed in the first preferred embodiment of the present invention; Figure 6 Schematic diagram of the modules of the bioinformatics MCP service invocation system disclosed in the second preferred embodiment of the present invention; Figure 7 Block diagram of the structure of an electronic device disclosed in another preferred embodiment of the present invention. Detailed implementation manners

[0020] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0021] It should be noted that when an element is referred to as being "disposed on" another element, it can be directly on the other element or there may also be an intermediate element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration and do not represent the only implementation manners.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in the description of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0023] As Figure 1 shown, the first preferred embodiment of the present invention discloses a bioinformatics MCP service invocation method, which includes: S10: Obtain user request information; In the above step S10, the natural language bioinformatics analysis request input by the user is received through an API, a chat interface, etc. In this embodiment, it can be in the form of an API interface. Similarly, the API endpoints are defined by the backend, the user sends an HTTP request, and the backend extracts the request information from the query string, request body or form data of the request. In this embodiment, the user request information is subjected to text cleaning, removal of irrelevant information, preliminary intention recognition or entity extraction, and vectorization processing.

[0024] Specifically, in combination with Figure 1 and Figure 2 as shown, this step includes the following sub-steps: S11: Obtain the natural language request corresponding to the user request information; In this sub-step, through a web front-end, mobile application, command-line tool, API interface, etc., in the corresponding interface or interface, receive the natural language text input by the user. In addition to the currently input text, this sub-step can also record context information related to this request, such as user identity, session ID, input time, etc., for subsequent request tracking and analysis when needed.

[0025] S12: Perform vectorization processing on the natural language request to obtain vectorized query vector information.

[0026] In this embodiment, the above sub-step selects a model that can convert text into a vector according to specific application scenarios and requirements. In the field of bioinformatics, domain-specific embedding models are used, such as BioBERT, PubMedBERT, etc. These models have been pre-trained on biomedical literature and data and can better capture professional terms and semantic relationships in the field of bioinformatics.

[0027] Next, perform preprocessing on the obtained natural language request, including removing irrelevant characters, tokenization (splitting the text into word or sub-word units), lowercasing, stop word removal, etc., to improve the vectorization effect.

[0028] Finally, input the preprocessed text into the selected embedding model, and the model will output a vector with a fixed dimension. This vector is the vectorized representation of the natural language request, that is, the query vector information. This vector contains the semantic features of the text and can be compared with other vectorized MCP service information in the vector space for similarity.

[0029] S20: Based on the user request information, query the MCP service information that matches the user request information.

[0030] In the above step, in this embodiment, according to the query vector of the user request, search for the MCP service with the most similar semantics in the vector database. Similarity search: Submit the query vector V_query to the vector database. The vector database performs an approximate nearest neighbor search and, based on a certain similarity metric (usually cosine similarity or inner product), searches for the K most similar vectors to V_query (K is a natural number greater than 0). Obtain the service IDs and associated metadata of the MCP services corresponding to these K vectors.

[0031] Specifically, in combination with Figure 1 and Figure 3As shown, the above step S20 includes sub-steps: S21: Convert the MCP service information into MCP vector information; In this sub-step, for each MCP service, text information such as its service function description, keywords, usage examples, and parameter descriptions in the MCP specification is extracted. The extracted text is preprocessed, including removing irrelevant characters, tokenization (splitting the text into word or sub-word units), lowercase conversion, stop word removal, etc., to improve the vectorization effect. A suitable text embedding model is selected, such as a domain-specific model like BioBERT, PubMedBERT, or a general model fine-tuned on biomedical literature / data, such as Sentence-BERT. The preprocessed MCP service text information is input into the selected embedding model, and the model outputs a vector of a fixed dimension. This vector is the vector representation of the MCP service, that is, the MCP vector information. This vector contains the semantic features of the MCP service and can be compared with other vectors in the vector space for similarity.

[0032] S22: Perform semantic retrieval on the query vector information and the MCP vector information to obtain MCP service information that matches the query vector information.

[0033] In this embodiment, the above sub-steps store the generated MCP vector information and its corresponding MCP service identifiers and key metadata in a vector database. An efficient index is established in the vector database to enable fast vector similarity search. The query vector information requested by the user is submitted to the vector database. The vector database searches for several vectors most similar to the query vector among the stored MCP vector information according to a preset similarity metric method (such as cosine similarity, inner product, etc.). The identifiers, function descriptions, MCP specifications, and other detailed information of several MCP services most similar to the query vector are obtained, and these services are the MCP service information that matches the user request information.

[0034] S30: Construct enhanced prompt information including the user request information and the MCP service information corresponding to the user request information, and send the enhanced prompt information to the large language model to generate call parameters; In this step, the user request information and the matching MCP service information are integrated to form structured enhanced prompt information.

[0035] Specifically, in combination with Figure 1 and Figure 4 As shown, the above step S30 includes the following sub-steps: S31: Organize the constructed enhanced prompt information into a text format suitable for the large language model to receive; Clarify the text format requirements: Different large language models may have different requirements for the input text format. Generally, it is necessary to ensure that the text is clear, has a reasonable structure, and is semantically clear. Usually, it is a natural language description, including parts such as the problem background, relevant context information, and specific problems.

[0036] Organize enhanced prompt information: Integrate the constructed enhanced prompt information into a coherent and logically clear text. First, introduce the background and task objectives at the beginning, then provide relevant context information (such as the specific content of the user request, relevant MCP service information, etc.), and finally clearly state the task that needs to be completed by the large language model, such as generating corresponding call parameters based on the given information.

[0037] Check and optimize the text: Check whether the text is smooth, whether there are grammar errors or ambiguities, and ensure that the large language model can accurately understand the intention of the prompt information. At the same time, try to control the text length within the input range allowed by the model.

[0038] S32: Import the enhanced prompt information into the large language model through the API interface, and export the generated call parameters through the API interface.

[0039] In this embodiment, the above-mentioned detailed steps carefully read the API interface document provided by the large language model to understand key information such as its request URL, supported HTTP methods, request header requirements, request parameter formats, and response formats. Package the organized enhanced prompt information as part of the request parameters in the format required by the API. Commonly, for example, place the prompt information in a specified field of a JSON object and set other necessary parameters at the same time. Then, use an HTTP client to send a POST request to the API interface of the large language model, send the packaged request parameters to the model, and include necessary authentication information (such as an API key) in the request header. Obtain the response data generated by the model from the API interface, parse it according to the response format, and extract the generated call parameter part. Usually, it is necessary to check the status code and content of the response to ensure that the request is successful and a valid result is returned. If the request fails, handle and retry according to the error information. The constructed enhanced prompt information can be provided to the large language model in a suitable way, and its generated call parameters can be obtained.

[0040] S40: Based on the call parameters, call the target bioinformatics MCP service.

[0041] Specifically, in combination with Figure 1 and Figure 5 as shown, the above step S40 includes the following detailed steps: S41: Parse the call parameters, and based on the parsed call parameters, form a corresponding call request; In this sub-step: Extract the key parameters required to call the target bioinformatics MCP service from the response returned by the large language model, which usually include the service's endpoint (network call address), input parameter list (name, value, and corresponding type of each parameter, etc.). Then, convert the extracted parameter values into corresponding data types according to the parameter types defined in the MCP service specification. For example, if a parameter is defined as an integer type in the specification and the value of this parameter obtained from the large language model is a numeric string, it needs to be converted to an integer.

[0042] According to the MCP service specification, determine the HTTP request method required to call the service. Common methods are POST or GET. Set the request header information, which may include authentication information (such as API keys, tokens, etc.), content type (such as application / json), etc., to ensure that the request can be correctly received and processed by the MCP service. Organize the converted parameters into a request body in the format required by the MCP service. Usually, for a POST request, the request body can be a JSON-formatted string containing the names and values of each parameter.

[0043] S42: Based on the call request, call the target bioinformatics MCP service information from the MCP database.

[0044] In this sub-step, use a suitable HTTP client library (such as using the requests library in Python) to send the constructed request to the endpoint of the target MCP service. Ensure that network connection, timeout, and other exceptions are properly handled during the request process. Receive the response returned by the MCP service. Usually, the response will contain information such as the result of the analysis task or the execution status in a specific format (such as JSON).

[0045] According to the documentation of the MCP service, parse the response content to extract valuable result data. These results may be alignment results, annotation information, variant detection reports, etc. Further analyze, process, or directly present them to the user according to the specific application scenario. If the MCP service returns error information or a failed execution result, these situations need to be handled, analyze the cause of the error, and take corresponding measures as needed, such as re-calling the service (possibly after adjusting the parameters), and feedback the error information to the user.

[0046] This step can call the target bioinformatics MCP service based on the call parameters generated by the large language model and process the results returned by it. This realizes the function of automatically discovering and calling appropriate bioinformatics tools according to user requests, improving the efficiency and automation level of bioinformatics analysis.

[0047] The method disclosed in the above embodiments of the present invention realizes the automatic discovery of MCP services, improves the scalability and flexibility of the system; can more accurately understand the user's intention and improve the accuracy of tool discovery; uses the MCP specification to assist the LLM to accurately generate call parameters, reducing the user's usage threshold; ensures interoperability and scalability based on the MCP protocol; and effectively supports large-scale bioinformatics MCP service scenarios.

[0048] As Figure 6 shown, the second preferred embodiment of the present invention discloses a bioinformatics MCP service call system 100, which includes a user request acquisition module 110, a service information query module 120, a call request generation module 130, and an MCP service call module 140.

[0049] The above-mentioned user request acquisition module 110 is used to acquire user request information.

[0050] Specifically, the above-mentioned user request acquisition module 110 receives a natural language bioinformatics analysis request input by the user through an API, a chat interface, etc. In this embodiment, it can be in the form of an API interface. Similarly, the backend defines API endpoints, the user sends an HTTP request, and the backend extracts the request information from the query string, request body, or form data of the request. In this embodiment, the user request information is subjected to text cleaning, removal of irrelevant information, preliminary intention recognition or entity extraction, and vectorization processing.

[0051] Specifically, the user request acquisition module 110 includes a request acquisition unit 111 and a vector processing unit 112.

[0052] The above-mentioned request acquisition unit 111 is used to acquire the natural language request corresponding to the user request information; The above-mentioned request acquisition unit 111 receives the natural language text input by the user through a web front-end, a mobile application, a command-line tool, or an API interface, etc., in the corresponding interface or interface. In addition to the currently input text, this sub-step can also record context information related to this request, such as user identity, session ID, input time, etc., for subsequent request tracking and analysis when needed.

[0053] The above-mentioned vector processing unit 112 performs vectorization processing on the natural language request to obtain vectorized query vector information.

[0054] In this embodiment, the above vector processing unit 112 selects a model capable of converting text into vectors according to specific application scenarios and requirements. In the field of bioinformatics, domain-specific embedding models such as BioBERT and PubMedBERT are used. These models are pre-trained on biomedical literature and data and can better capture the professional terms and semantic relationships in the field of bioinformatics. Then, preprocessing is performed on the obtained natural language request, including operations such as removing irrelevant characters, tokenization (splitting the text into words or sub-word units), lowercasing, and stop word removal, to improve the vectorization effect. Finally, the preprocessed text is input into the selected embedding model, and the model outputs a vector with a fixed dimension. This vector is the vectorized representation of the natural language request, that is, the query vector information. This vector contains the semantic features of the text and can be compared with other vectorized MCP service information in the vector space for similarity.

[0055] The above service information query module 120 is used to query MCP service information that matches the user request information based on the user request information.

[0056] In this embodiment, the above service information query module 120 searches for the MCP service with the most similar semantics in the vector database according to the query vector of the user request. Similarity search: Submit the query vector V_query to the vector database. The vector database performs an approximate nearest neighbor search and finds the K vectors (K is a natural number greater than 0) that are most similar to V_query based on a certain similarity metric (usually cosine similarity or inner product). Obtain the service IDs and associated metadata of the MCP services corresponding to these K vectors.

[0057] Specifically, the above service information query module 120 includes an MCP vector conversion unit 121 and an MCP retrieval unit 122: The MCP vector conversion unit 121 converts the MCP service information into MCP vector information; For each MCP service, the MCP vector conversion unit 121 extracts text information such as its service function description, keywords, usage examples, and parameter descriptions in the MCP specification. Preprocess the extracted text, including removing irrelevant characters, tokenization (splitting the text into word or sub-word units), converting to lowercase, removing stop words, etc., to improve the vectorization effect. Select a suitable text embedding model, such as domain-specific models like BioBERT, PubMedBERT, or general models fine-tuned on biomedical literature / data, such as Sentence-BERT. Input the preprocessed MCP service text information into the selected embedding model, and the model will output a vector with a fixed dimension. This vector is the vector representation of the MCP service, that is, the MCP vector information. This vector contains the semantic features of the MCP service and can be compared with other vectors in the vector space for similarity.

[0058] The MCP retrieval unit 122 performs semantic retrieval on the query vector information and the MCP vector information to obtain MCP service information that matches the query vector information.

[0059] In this embodiment, the MCP retrieval unit 122 stores the generated MCP vector information and its corresponding MCP service identifier and key metadata in a vector database. Establish an efficient index in the vector database to enable fast vector similarity search. Submit the query vector information requested by the user to the vector database. The vector database, according to a preset similarity metric method (such as cosine similarity, inner product, etc.), searches for several vectors that are most similar to the query vector among the stored MCP vector information. Obtain the identifiers, function descriptions, MCP specifications, and other detailed information of several MCP services that are most similar to the query vector. These services are the MCP service information that matches the user request information.

[0060] The above call request generation module 130 is used to construct enhanced prompt information including the user request information and the MCP service information corresponding to the user request information, and send the enhanced prompt information to the large language model to generate call parameters. Specifically, the above call request generation module 130 includes a prompt information sorting unit 131 and a call parameter derivation unit 132.

[0061] The prompt information sorting unit 131 sorts the constructed enhanced prompt information into a text format suitable for the large language model to receive.

[0062] Different large language models may have different requirements for the input text format. Generally, it is necessary to ensure that the text is clear, has a reasonable structure, and has a clear semantics. Usually, it is a natural language description that includes parts such as the problem background, relevant context information, and specific problems. Integrate the constructed enhanced prompt information into a coherent and logically clear text. First, introduce the background and task objectives at the beginning, then provide relevant context information (such as the specific content of the user request, relevant MCP service information, etc.), and finally clearly state the task that needs to be completed by the large language model, such as generating corresponding call parameters based on the given information. Check whether the text is smooth, whether there are grammar errors or ambiguities, and ensure that the large language model can accurately understand the intention of the prompt information. At the same time, try to control the text length within the input range allowed by the model.

[0063] The call parameter export unit 132 imports the enhanced prompt information into the large language model through the API interface and exports the generated call parameters through the API interface.

[0064] In this embodiment, the above-mentioned detailed steps carefully read the API interface document provided by the large language model to understand key information such as its request URL, supported HTTP methods, request header requirements, request parameter formats, and response formats. Take the sorted enhanced prompt information as part of the request parameters and encapsulate it in the format required by the API. Commonly, for example, place the prompt information in a specified field of a JSON object and set other necessary parameters at the same time. Then, use an HTTP client to send a POST request to the API interface of the large language model, send the encapsulated request parameters to the model, and include necessary authentication information (such as an API key) in the request header. Obtain the response data generated by the model from the API interface, parse it according to the response format, and extract the generated call parameter part. Usually, it is necessary to check the status code and content of the response to ensure that the request is successful and a valid result is returned. If the request fails, perform corresponding processing and retry according to the error information. The constructed enhanced prompt information can be provided to the large language model in a suitable way and the generated call parameters can be obtained.

[0065] The above-mentioned MCP service call module 140 is used to call the target biometric information MCP service based on the call parameters.

[0066] Specifically, the MCP service call module 140 includes a call parameter parsing unit 141 and an MCP call unit 142.

[0067] The call parameter parsing unit 141 parses the call parameters and forms a corresponding call request based on the parsed call parameters.

[0068] Extract the key parameters required to call the target bioinformatics MCP service from the response returned by the large language model. These usually include the service's endpoint (network call address) and the input parameter list (the name, value, and corresponding type of each parameter, etc.). Then, convert the extracted parameter values into the corresponding data types according to the parameter types defined in the MCP service specification. For example, if a parameter is defined as an integer type in the specification and the value of this parameter obtained from the large language model is a numeric string, it needs to be converted to an integer.

[0069] According to the MCP service specification, determine the HTTP request method required to call the service. Common methods are such as the POST or GET methods. Set the request header information, which may include authentication information (such as API keys, tokens, etc.), content type (such as application / json), etc., to ensure that the request can be correctly received and processed by the MCP service. Organize the converted parameters into the request body in the format required by the MCP service. Usually, for a POST request, the request body can be a JSON-formatted string containing the names and values of each parameter.

[0070] The above MCP call unit 142 calls the target bioinformatics MCP service information from the MCP database based on the call request. The above MCP call unit 142 uses a suitable HTTP client library (such as using the requests library in Python) to send the constructed request to the endpoint of the target MCP service. Ensure that network connection, timeout, and other exceptions are properly handled during the request process. Receive the response returned by the MCP service. Usually, the response will contain information such as the result of the analysis task or the execution status in a specific format (such as JSON).

[0071] According to the documentation of the MCP service, parse the response content and extract the valuable result data. These results may be alignment results, annotation information, variant detection reports, etc. Further analyze, process, or directly present them to the user according to the specific application scenario. If the MCP service returns error information or a failed execution result, these situations need to be handled, analyze the cause of the error, and take corresponding measures as needed, such as re-calling the service (possibly after adjusting the parameters), and feedback the error information to the user.

[0072] It is possible to call the target bioinformatics MCP service based on the call parameters generated by the large language model and process the results it returns. This realizes the function of automatically discovering and calling the appropriate bioinformatics tools according to the user's request, improving the efficiency and automation level of bioinformatics analysis.

[0073] The method disclosed in the above embodiments of the present invention realizes the automatic discovery of MCP services, improves the scalability and flexibility of the system; can understand user intentions more accurately, and improves the accuracy of tool discovery; uses the MCP specification to assist the LLM to accurately generate call parameters, reducing the user's usage threshold; ensures interoperability and scalability based on the MCP protocol; effectively supports large-scale bioinformatics MCP service scenarios.

[0074] The system disclosed in the above embodiments of the present invention realizes the automatic discovery of MCP services, improves the scalability and flexibility of the system; can understand user intentions more accurately, and improves the accuracy of tool discovery; uses the MCP specification to assist the LLM to accurately generate call parameters, reducing the user's usage threshold; ensures interoperability and scalability based on the MCP protocol; effectively supports large-scale bioinformatics MCP service scenarios.

[0075] As Figure 7 shown, the electronic device 10 includes at least a processor 11 and a memory communicatively connected to the processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0076] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard or a mouse, etc.; an output unit 17, such as various types of displays or speakers, etc.; a storage unit 18, such as a disk or an optical disc, etc.; and a communication unit 19, such as a network card, a modem, or a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0077] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), any appropriate processor, controller, or microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for implementing an object-based service group.

[0078] In some embodiments, a computer program can be implemented and tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the object-based service group implementation method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the object-based service group implementation method by any other suitable means (e.g., by means of firmware).

[0079] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0080] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, such that when the computer programs are executed by the processors, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0081] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the invention patent should be subject to the appended claims.

Claims

1. A method for calling a bioinformatics MCP service, characterized in that, It includes: Obtain user request information; Based on the user request information, query MCP service information that matches the user request information; Construct enhanced prompt information including the user request information and the MCP service information corresponding to the matching user request information, and send the enhanced prompt information to the large language model to generate call parameters; Based on the call parameters, call the target biometric information MCP service.

2. The method for invoking a bioinformatics MCP service according to claim 1, wherein The obtaining of the user request information includes: Obtain the natural language request corresponding to the user request information; Perform vectorization processing on the natural language request to obtain vectorized query vector information.

3. The method for invoking a bioinformatics MCP service according to claim 2, wherein Based on the user request information, query MCP service information that matches the user request information in the vector database, including: Convert the MCP service information into MCP vector information; Perform semantic retrieval on the query vector information and the MCP vector information to obtain MCP service information that matches the query vector information.

4. The bioinformatics MCP service call method according to claim 1, wherein The MCP service information includes metadata of several MCP services.

5. The method for invoking a bioinformatics MCP service according to claim 1, wherein The construction of the enhanced prompt information including the user request information and the MCP service information corresponding to the matching user request information includes: Integrate the user request information and the matching MCP service information to form structured enhanced prompt information.

6. The bioinformatics MCP service invocation method according to claim 1, wherein Sending the enhanced prompt information to the large language model to generate call parameters includes: Organize the constructed enhanced prompt information into a text format suitable for the large language model to receive; Import the enhanced prompt information into the large language model through the API interface and export the generated call parameters through the API interface.

7. The method for calling a bioinformatics MCP service according to claim 1, wherein Based on the call parameters, calling the target biometric information MCP service includes: Parse the call parameters, and based on the parsed call parameters, form a corresponding call request; Based on the call request, call the target biometric information MCP service information from the MCP database.

8. A biological information MCP service call system, characterized in that, It includes: A user request acquisition module for obtaining user request information; A service information query module for querying MCP service information that matches the user request information based on the user request information; A call request generation module for constructing enhanced prompt information including the user request information and the MCP service information corresponding to the matching user request information, and sending the enhanced prompt information to the large language model to generate call parameters; An MCP service call module for calling the target biometric information MCP service based on the call parameters.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the biometric information MCP service call method according to any one of claims 1-7.

10. A storage medium containing computer-executable instructions, where the computer-executable instructions implement the biometric information MCP service call method according to any one of claims 1-7 when executed by a computer processor.

Citation Information

Patent Citations

  • Method, device, equipment and product for executing task

    CN120013493A

  • Intelligent agent service system based on domestic operating system

    CN120029517A

  • Application calling method, computer equipment and storage medium

    CN120066624A

  • Method for realizing agent development MCP service through computing power of intelligent computing center

    CN120085839A

  • Safety detection method and system based on large language model and retrieval enhancement

    CN120105438A

Cited By

  • Charging station customer service processing method and device based on MCP protocol and tool calling

    CN120525544A

  • Charging station customer service processing method and device based on MCP protocol and tool call

    CN120525544B

  • Visual arrangement method for model tool calling based on MCP

    CN120743252A

  • A method for visualizing orchestration of model tool invocation based on MCPs

    CN120743252B

  • Configuration method and device of storage cluster, electronic equipment and storage medium

    CN120762781A