A method and system for local resource interaction and status feedback based on the mcp protocol

HK40137585APending Publication Date: 2026-09-18WIND INFORMATION(HK) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
HK42026125164
Authority / Receiving Office
HK · HK
Patent Type
Applications
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-09-18
Estimated Expiration
2045-11-30

Smart Images

  • Figure 00000009_0000
    Figure 00000009_0000
  • Figure 00000009_0001
    Figure 00000009_0001
Patent Text Reader

Abstract

The invention relates to a local resource interaction and state feedback method and system based on an MCP protocol, and the method comprises the steps: 1, enabling a browser plug-in to actively initiate a connection request to a local service program after the browser plug-in is started, and building MCP protocol long connection based on a TCP (Transmission Control Protocol) through HTTP (Hyper Text Transport Protocol) negotiation; step 2, the plug-in packages the user request into an MCP protocol message, and sends an MCP resource request to a local service program through the established long connection; step 3, the service program receives and analyzes the MCP request message, checks user permission, generates a protocol message, and sends an operation result and final state feedback; and step 4, the plug-in receives and analyzes the MCP protocol message returned by the server, and the plug-in updates the user interface according to the feedback information to realize visualization of the operation state, progress and result. The problems that how to enable the browser plug-in to efficiently interact with the local system resources to provide the extended function and feed back the calling state and result of the system resources in real time are solved, and effective interaction between the browser and the local system resources is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

(19) State Intellectual Property Office (21) Application No. 202511789839.2 (12) Invention Patent Application (10) Application Publication No. CN 121603485 A (43) Application Publication Date 2026. 03.03 H04L 47 / 22 (2022.01) (22) Application Date 2025.12.01 (71) Applicant Wind Information Software (Shanghai) Co., Ltd. Address Building C, No. 888, Huanhu West Second Road, Lingang New Area, Pudong New Area, Shanghai 200120, China (Shanghai) Pilot Free Trade Zone (72) Inventors Wu Yingjun, Wang Yongbo, Cai Changkun (74) Patent Agency Shanghai Shenhui Patent Agency Co., Ltd. 31001 Patent Attorney Weng Ruoying (51) Int.CI . H04L 67 / 02 (2022.01) H04L 9 / 40 (2022.01) H04L 67 / 55(2022.01) H04L 67 / 07(2022.01) Claims 2 pages Description 6 pages Drawings 1 page (54) Invention Title A method and system for local resource interaction and status feedback based on MCP protocol (57) Abstract This invention relates to a method and system for local resource interaction and status feedback based on MCP protocol, comprising: Step 1: After the browser plugin is started, it actively initiates a connection request to the local service program and establishes a long connection based on TCP MCP protocol through HTTP negotiation; Step 2: The plugin encapsulates the user request into an MCP protocol message and sends the MCP resource request to the local service program through the established long connection; Step 3: The service program receives and parses the MCP request message, verifies the user's permissions, generates a protocol message, and sends the operation result and final status feedback; Step 4: The plugin receives and parses the MCP protocol message returned by the server, and the plugin updates the user interface according to the feedback information to realize the visualization of operation status, progress and result. This paper solves the problem of how to enable browser plugins to efficiently interact with local system resources to provide extended functions and provide real-time feedback on the calling status and results of system resources, thus realizing effective interaction between the browser and local system resources. 1-H g CN 121603485 A Claims 1 / 2 pages 1. A method for local resource interaction and status feedback based on the MCP protocol, characterized by comprising: Step 1, Connection Initialization Step 1.1 After the browser plugin starts, it actively initiates a connection request to the local service program, and establishes a long connection based on the TCP-based MCP protocol through HTTP negotiation; Step 1.2 During the connection establishment process,The plugin and service program exchange authentication tokens to complete identity verification and establish a secure encrypted channel. Step 2: Request Generation and Sending. Step 2.1 When a user initiates a resource operation in the browser interface, the plugin abstracts the user operation into a standard MCP resource request. Step 2.2 The plugin encapsulates the request into an MCP protocol message, including resource type, operation type, parameter information, and authentication information. Step 2.3 The plugin sends the MCP resource request to the local service program through the established long connection. Step 3: Server-Side Processing and Feedback. Step 3.1 The service program receives and parses the MCP request message and verifies user permissions. Step 3.2 The service program calls the corresponding local system resource interface and executes the resource operation according to the request content. Step 3.3 During the operation, the service program generates a "status event" protocol message and periodically pushes the operation progress, status, and possible exception information to the plugin in real time. Step 3.4 After the operation is completed, the service program sends the operation result and final status feedback. Step 4, Client Feedback Processing and Interface Update: Step 4.1 The plugin receives and parses the MCP protocol message returned by the server, including the progress push of the status event and the final operation result; Step 4.2 The plugin updates the user interface according to the feedback information to visualize the operation status, progress, and result; Step 4.3 For abnormal situations, the plugin displays corresponding error messages or handling suggestions. 2. The local resource interaction and status feedback method based on the MCP protocol according to claim 1, characterized in that the MCP protocol message includes: adding a "status" event type to the MCP protocol message structure for asynchronous and real-time reporting of operation progress and intermediate status; adding an event type field event_type to the MCP protocol data packet structure, with its value newly added as "status" type; the status event includes operation ID, progress percentage, and status description fields; when the local service program performs resource operations, it periodically pushes status event messages to the client through the MCP protocol; the client parses the status event message and updates the operation progress or status display in real time. 3. A local resource interaction and status feedback system based on the MCP protocol, characterized in that, for implementing the local resource interaction and status feedback method based on the MCP protocol as described in any one of claims 1-2, it includes: a browser plugin: acting as an MCP client,Running on the browser side, it is used to establish a connection with the local service program via the MCP protocol, send resource operation requests, and receive status feedback: Communication module: Implements the connection with the local service program via the MCP protocol and exchanges data via TCP communication; Request assembly module: Responsible for encapsulating the resource access operation initiated by the user on the browser side into MCP protocol data packets; Status listening and feedback module: Listens for messages fed back by the local service program, parses them according to the protocol, and displays them to the user; Local service program: As an MCP server, it runs on the user's computer, providing a resource service interface supporting the MCP protocol, as well as a message event mechanism, used to process requests initiated by plugins and provide feedback on results and status; Protocol parser: Parses, verifies, and processes the received request content from the MCP client; Resource manager: Calls the local operating system's interface to perform specific operations based on the parsed request; Event mechanism module: Listens for various events during the resource operation process and pushes event messages to the client; Status feedback module: Generates status feedback messages based on the operation results and pushes them to the client in MCP protocol format to achieve feedback. 3 CN 121603485 A Specification 1 / 6 pages A method and system for local resource interaction and status feedback based on MCP protocol Technical Field

[0001] This invention relates to the field of computer network technology, and in particular to a method and system for browser plugins to interact with local system resources and provide status feedback based on MCP protocol (Model Context Protocol), aiming to expand the browser's localization processing capabilities and interactive functions. Background Technology

[0002] With the continuous expansion of the functions of modern browsers, browser plugins, as a lightweight function extension tool, have been widely used to improve user experience and enhance browser functions. However, the current capabilities of browser plugins are mainly focused on accessing web page resources and interface optimization, lacking the ability to directly and efficiently interact with local systems, such as accessing user files, email systems, MIS and other internal systems.

[0003] In the existing related technologies,The main solutions for browser plugins to interact with the local system include: 1. Chrome Native Messaging API solution: This solution uses the Native Messaging API provided by the Chrome browser to enable communication between the plugin and the local application. It requires developing a separate local application for each function and communicating via the JSON-RPC protocol. Disadvantages include low communication efficiency, frequent inter-process communication, and a lack of a unified state management mechanism. 2. Electron framework solution: This solution uses the Electron framework to package the web application into a desktop application and accesses local resources via Node.js. It uses IPC (Inter-Process Communication) to enable communication between the rendering process and the main process. Disadvantages include large application size, long startup time, and unsuitability for lightweight plugin scenarios. 3. WebSocket long connection solution: This solution runs a WebSocket server locally, and the browser plugin communicates via WebSocket connections. It supports bidirectional communication and can achieve real-time data push. Disadvantages include a lack of standardized protocol specifications, requiring different applications to customize communication formats, and poor scalability. 4. File Upload / Download API Solution: This solution indirectly interacts with local resources via the browser's file upload / download API; however, it requires users to manually select files, making automated resource access impossible. Disadvantages include poor user experience, lack of real-time interaction, and limited functionality. Existing related technologies share the following shortcomings: Efficiency issues: Due to the lack of a flexible and unified protocol, different functional modules require separate development and interface definition, leading to repetitive work; Scalability issues: Existing technologies cannot be flexibly extended to other local resources, requiring redevelopment for each type of resource; Status feedback issues: Existing technologies typically use fixed polling methods to check operation status and cannot provide real-time feedback, resulting in delayed responses; Protocol standardization issues: The lack of a unified communication protocol standard leads to poor interoperability between different applications.

[0004] The present invention aims to solve the following technical problems: 1. How to enable browser plugins to interact efficiently with local system resources to provide extended functions; 2. How to achieve transparent access to various local resources (such as file systems, email systems, MIS systems, etc.) through a unified protocol; 3. How to provide real-time feedback on the calling status and results of system resources to improve user experience and avoid the real-time problems caused by the traditional polling method.

[0005] In order to solve the above technical problems, the present invention proposes a local resource interaction and status feedback method and system based on the MCP protocol, by designing a unified communication mechanism between the local service program (MCP Server) and the browser plugin (MCP Client),To achieve effective interaction between the browser and local system resources.

[0006] The technical solution of the present invention is as follows: A method for local resource interaction and status feedback based on the MCP protocol, comprising: Step 1, Connection Initialization Step 1.1 After the browser plugin is started, it actively initiates a connection request to the local service program and establishes a long connection based on the TCP MCP protocol through HTTP negotiation; Step 1.2 During the connection establishment process, the plugin and the service program exchange authentication tokens to complete identity verification and realize the establishment of a secure encrypted channel; Step 2, Request Generation and Sending Step 2.1 When the user initiates a resource operation in the browser interface, the plugin abstracts the user operation into a standard MCP resource request; Step 2.2 The plugin encapsulates the request into an MCP protocol message, including resource type, operation type, parameter information and authentication information; Step 2.3 The plugin sends the MCP resource request to the local service program through the established long connection; Step 3, Server Processing and Feedback Step 3.1 The service program receives and parses the MCP request message and verifies the user's permissions; Step 3.2 The service program calls the corresponding local system resource interface and performs resource operations according to the request content; Step 3.3 During the operation, the service program generates a "status event" protocol message and periodically pushes the operation progress, status, and possible abnormal information to the plugin in real time; Step 3.4 After the operation is completed, the service program sends the operation result and final status feedback; Step 4, Client Feedback Processing and Interface Update Step 4.1 The plugin receives and parses the MCP protocol message returned by the server, including the progress push of the status event and the final operation result; Step 4.2 The plugin updates the user interface according to the feedback information to realize the visualization of operation status, progress, and results; Step 4.3 For abnormal situations, the plugin displays corresponding error prompts or handling suggestions.

[0007] Further, it is characterized in that,The MCP protocol messages include: A new "status" event type has been added to the MCP protocol message structure for asynchronous, real-time reporting of operation progress and intermediate status; an event type field, `event_type`, has been added to the MCP protocol data message structure, with its value now including the "status" type. The status event includes fields for operation ID, progress percentage, and status description; when the local service program performs resource operations, it periodically pushes status event messages to the client via the MCP protocol; the client parses the status event messages and updates the operation progress or status display in real time. [W008] A local resource interaction and status feedback system based on the MCP protocol, used to implement the local resource interaction and status feedback method based on the MCP protocol as described above, including: A browser plugin: as an MCP Client, running on the browser side, used to establish a connection with the local service program through the MCP protocol, send resource operation requests, and receive status feedback; A communication module: implements the connection with the local service program through the MCP protocol, and exchanges data through TCP communication; A request assembly module: responsible for encapsulating the resource access operation initiated by the user on the browser side into MCP protocol data packets; A status listening and feedback module: listens for messages fed back by the local service program, parses them according to the protocol, and displays them to the user; A local service program: as an MCP Server,Running on the user's computer, it provides a resource service interface supporting the MCP protocol and a message event mechanism to handle requests initiated by the plugin and provide feedback on the result status; Protocol parser: parses the received request content from the MCP Client, verifies and processes parameters; Resource manager: calls the interface of the local operating system to perform specific operations based on the parsed request; Event mechanism module: listens for various events during the resource operation process and pushes event messages to the client; Status feedback module: generates status feedback messages based on the operation results and pushes them to the client in MCP protocol format to achieve feedback.

[0009] The beneficial effects of the present invention are as follows: Unified resource management: abstracts different types of resource operations through the MCP protocol, avoids designing separate interfaces for each resource type, and improves development efficiency; Real-time feedback mechanism: adopts event-driven to actively push results, avoids resource waste caused by polling, and improves the real-time performance of interaction; High scalability: new resource types can be added at any time (such as adding video playback and audio processing functions), only requiring the definition of new command types and parameters; Improved user experience: the plugin can quickly respond to changes in operation status and update interface information, providing users with a smooth interactive experience.

[0010] Figure 1 is a system architecture diagram of the present invention; Figure 2 is a flowchart of the browser plugin of the present invention. Detailed Description of the Embodiments

[0011] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides detailed implementation methods and specific operation processes, but the scope of protection of the present invention is not limited to the following embodiments.

[0012] A method for local resource interaction and status feedback based on the MCP protocol, specifically as follows: 1. Architecture Design This resource interaction system involves the following main components and modules: Browser Plugin: As an MCP Client, it runs on the browser side and is used to establish a connection with the local service program through the MCP protocol, send resource operation requests, and receive status feedback: 1. Communication Module: Implements the connection with the local service program through the MCP protocol and realizes data exchange through TCP communication.

[0013] 2. Request Assembly Module: Responsible for encapsulating the resource access operation initiated by the user on the browser side into MCP protocol data packets. 6 CN 121603485 A Manual 4 / 6 pages

[0014] 3. Status monitoring and feedback module: Implements the monitoring of messages fed back by the local service program, and parses them according to the protocol to display them to the user.

[0015] Local service program: As an MCP Server, it runs on the user's computer, providing resource service interfaces that support the MCP protocol, as well as message event mechanisms.Used to process requests initiated by plugins and provide feedback on results and status.

[0016] 1. Protocol Parser: Parses, verifies, and processes the received request content from the MCP Client.

[0017] 2. Resource Manager: Calls the local operating system's interface according to the parsed request, such as performing specific operations on resources like the file system and email system.

[0018] 3. Event Mechanism Module: Listens for various events (such as progress updates) during resource operations and pushes event messages to the client.

[0019] 4. Status Feedback Module: Generates status feedback messages based on the operation results and pushes them to the client in MCP protocol format to provide feedback on operation results, event notifications, etc.

[0020] 2. Introduction to MCP Protocol MCP (Model Context Protocol) is an open-source protocol launched by Anthropic, designed to achieve seamless integration of large language models (LLMs) with external data sources and tools, and to establish secure bidirectional links between large models and data sources. The core purpose of this protocol is to enhance the functionality and usability of LLMs, enabling them to call external tools or obtain real-time data based on context, rather than being limited to static knowledge.

[0021] This invention makes the following key improvements to the MCP protocol: A new status event type is added: used for real-time push of operation status and progress information, effectively solving the problem that existing protocols only support final result feedback and cannot monitor operation progress in real time, thus improving user experience and system process controllability.

[0022] Traditional MCP protocols mainly support synchronous feedback of requests and results, which cannot meet the real-time status and progress push requirements of complex resource operations. This invention adds a "status" event type to the MCP protocol message structure for asynchronous, real-time reporting of operation progress and intermediate status.

[0023] 1. In the data message structure of the MCP protocol, an event type field (event.type) is added, with a new value type "status".

[0024] 2. The status event includes fields such as operation ID, progress percentage, and status description.

[0025] 3. When the local service program performs resource operations (such as file transfer, batch processing, etc.), it periodically pushes status event messages to the client through the MCP protocol.

[0026] 4. The client parses the status event message and updates the operation progress or status display in real time.

[0027] 2.1 MCP Protocol Message Format The MCP protocol message format adopted in this invention is as follows: Request message format: { "jsonrpc": "2.0", "id": , / unique_request_id, z, "method": "tools / call", / / tparams : t "name": ^resource^peration^ame77, "arguments": { 7 CN 121603485 A Manual page 5 / 6〃operation_type〃: / zread| write | execute", "resource_path": " / path / to / resource"7, "parameters": {...}}}} Status feedback message format: { jsonrpc : 2.0 , "method": "notifications / status", params : { "event": "status", "data〃: { "id": "unique_request_id", "message":"operation status description〃, "progress": 75, "timestamp": "2024-01-01T12:00:00Z" event: status indicates status change data : contains id, message and progress, where id is the unique identifier of the plugin request operation; message indicates the transmitted status information; progress ss indicates execution progress.

[0028] Result feedback message format: { jsonrpc : 2.0 , "method": "notifications / message" , " " fparams : \ "event": "message'', "data": { id : umque_request_id , "content": "operation result content" , "'status" : "'success | error" , "timestamp" : "2024-01-01T12:00:00Z" event : message represents the execution result data: contains id, content, where id is the unique identifier of the plugin request operation; content represents the result information returned on page 6 / 6 of the manual 8 CN 121603485 A.

[0029] 3. Implementation Case This method includes the following steps: 1. Connection Initialization 1.1 After the browser plugin starts, it actively initiates a connection request to the local service program,A long connection based on the TCP MCP protocol is established through HTTP negotiation.

[0030] 1.2 During the connection establishment process, the plugin and the service program exchange authentication tokens to complete identity verification and build a secure encrypted channel.

[0031] 2. Request generation and sending 2.1 When a user initiates a resource operation (such as file reading and writing, function call, etc.) in the browser interface, the plugin abstracts the user operation into a standard MCP resource request.

[0032] 2.2 The plugin encapsulates the request into an MCP protocol message, including resource type, operation type, parameter information and authentication information.

[0033] 2.3 The plugin sends the MCP resource request to the local service program through the established long connection.

[0034] 3. Server-side processing and feedback 3.1 The service program receives and parses the MCP request message and verifies the user's permissions.

[0035] 3.2 The service program calls the corresponding local system resource interface and performs resource operations according to the request content.

[0036] 3.3 During the operation, the service program generates a "status event" protocol message and periodically pushes the operation progress, status, and possible abnormal information to the plugin in real time.

[0037] 3.4 After the operation is completed, the service program sends the operation result and final status feedback. 4. Client Feedback Processing and Interface Update 4.1 The plugin receives and parses the MCP protocol message returned by the server, including the progress push of the status event and the final operation result.

[0038] 4.2 The plugin updates the user interface according to the feedback information to realize the visualization of the operation status, progress, and result.

[0039] 4.3 For operation failures, permission abnormalities, etc., the plugin displays corresponding error prompts or processing suggestions.

[0040] The above embodiments only express one implementation of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention.These all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims. 9 CN 121603485 A Specification Figure 1 / 1 Page Browser Plugin (MCP Client) Other Local Resources Figure 1 Browser Plugin Local Service Program Local Resources MCP Client MCP Server (Image of local resource processing) Figure 2 10 Invention Title: A Method and System for Local Resource Interaction and Status Feedback Based on the MCP Protocol Chinese Abstract This invention relates to a method and system for local resource interaction and status feedback based on the MCP protocol, comprising: Step 1, after the browser plugin is launched, it actively initiates a connection request to the local service program, and establishes a long connection based on the TCP MCP protocol through HTTP negotiation; Step 2, the plugin encapsulates the user request into an MCP protocol message, and sends the MCP resource request to the local service program through the established long connection; Step 3, the service program receives and parses the MCP request message, verifies user permissions, generates a protocol message, and sends the operation result and final status feedback; Step 4, the plugin receives and parses the MCP protocol message returned by the server, and updates the user interface according to the feedback information, realizing the visualization of operation status, progress and results. This solves the problem of how to enable browser plugins to efficiently interact with local system resources to provide extended functions and provide real-time feedback on the call status and results of system resources, achieving effective interaction between the browser and local system resources. English Abstract The present invention relates to a method and system for local resource interaction and status feedback based on the MCP protocol, consisting of: Step 1, after a browser plug-in is started, it actively initiates a connection request to a local service program,and establishes a TCP-based MCP protocol persistent connection through HTTP negotiation; Step 2, the plug-in encapsulates a user request into an MCP protocol message, and sends an MCP resource request to the local service program through the established persistent connection; Step 3, the service program receives and parses the MCP request message, checks user permissions, generates a protocol message, and sends operation results and final status feedback; Step 4, the plug-in receives and parses the MCP protocol message returned by the server, and updates the user interface according to the feedback information, thereby realizing visualization of operation status, progress, and results. The invention solves the problem of how to enable a browser plug-in to efficiently interact with local system resources so as to provide extended functions and feed back the invocation status and results of system resources in real time,thereby realizing effective interaction between the browser and local system resources. Abstract,

Claims

1. A method for local resource interaction and status feedback based on the MCP protocol, characterized in that, include: Step 1: Connection Initialization Step 1.1 After the browser plugin is launched, it actively initiates a connection request to the local service program and establishes a long connection based on the TCP MCP protocol through HTTP negotiation; Step 1.2 During the connection establishment process, the plugin and the service program exchange authentication tokens to complete identity verification and establish a secure encrypted channel; Step 2: Request Generation and Sending Step 2.1 When a user initiates a resource operation in the browser interface, the plugin abstracts the user operation into a standard MCP resource request; Step 2.2 The plugin encapsulates the request into an MCP protocol message, including resource type, operation type, parameter information, and authentication information; Step 2.3 The plugin sends the MCP resource request to the local service program through the established long connection; Step 3: Server-side processing and feedback Step 3.1 The service program receives and parses the MCP request message and verifies the user's permissions; Step 3.2 The service program calls the corresponding local system resource interface and performs resource operations according to the request content; Step 3.3 During the operation, the service program generates a "status event" protocol message and periodically pushes the operation progress, status and possible abnormal information to the plugin in real time. Step 3.4 After the operation is completed, the service program sends the operation result and final status feedback; Step 4: Client feedback processing and interface update Step 4.1 The plugin receives and parses the MCP protocol messages returned by the server, including the progress push of the status event and the final operation result; Step 4.2 The plugin updates the user interface based on the feedback information to visualize the operation status, progress, and results; Step 4.3 For abnormal situations, the plugin displays corresponding error messages or handling suggestions.

2. The local resource interaction and status feedback method based on the MCP protocol according to claim 1, characterized in that, MCP protocol messages include: A new "status" event type has been added to the MCP protocol message structure for asynchronous, real-time reporting of operation progress and intermediate status. An event type field, `event_type`, has been added to the MCP protocol data message structure, with a new value type "status". The status event includes fields for operation ID, progress percentage, and status description. When the local service program performs resource operations, it periodically pushes status event messages to the client via the MCP protocol. The client parses the status event messages and updates the operation progress or status display in real time.

3. A local resource interaction and status feedback system based on the MCP protocol, characterized in that, A method for implementing local resource interaction and status feedback based on the MCP protocol as described in any one of claims 1-2 includes: Browser Plugin: As an MCP Client, it runs on the browser side and is used to establish connections with local service programs via the MCP protocol, send resource operation requests, and receive status feedback. Communication module: Implements the MCP protocol to connect with the local service program and exchanges data via TCP communication. Request assembly module: responsible for encapsulating the resource access operations initiated by the user on the browser into MCP protocol data packets; Status monitoring and feedback module: This module listens for messages from local service programs, parses them according to the protocol, and displays them to the user. Local service program: As an MCP server, it runs on the user's computer, providing resource service interfaces that support the MCP protocol, as well as a message event mechanism to handle requests initiated by plugins and return results and status. Protocol parser: Parses and verifies parameters of the received request content from the MCP Client; Resource Manager: Based on the parsed request, it calls the local operating system's interface to perform specific operations; Event mechanism module: Listens for various events during the data operation process and pushes event messages to the client; Status feedback module: Generates status feedback messages based on the operation results and pushes them to the client in MCP protocol format to achieve feedback.