Open Access
ARTICLE
SecuAudit: Integrity-Preserving Metadata Compliance Auditing for Secure Data Circulation in MCP-Enabled AI Agents
1 School of Computer and Artificial Intelligence, Zhengzhou University, 100 Science Avenue, Zhengzhou, China
2 Faculty of Engineering and Information Sciences, University of Wollongong, Wollongong, Australia
3 School of Information Science and Technology, Zhengzhou Normal University, Zhengzhou, China
* Corresponding Authors: Lipeng Wang. Email: ; Rui Ma. Email:
# These authors contributed equally to this work
(This article belongs to the Special Issue: Privacy-Enhancing Technologies for Secure Data Cooperation and Circulation)
Computers, Materials & Continua 2026, 89(1), 100 https://doi.org/10.32604/cmc.2026.085633
Received 21 May 2026; Accepted 22 July 2026; Issue published 13 August 2026
Abstract
AI agents frequently access external files, databases, and application programming interfaces (APIs) through the Model Context Protocol (MCP). However, these external resources typically lie outside the security boundary of the agent. During data circulation, attackers can not only tamper with the external data but also manipulate critical metadata, such as access permissions, validity periods, and authorization scopes. Even when the underlying data remains intact, such attacks can cause proxies to ingest expired or policy-violating resources, leading to severe privacy breaches and risks of unauthorized execution. To address these challenges, we propose SecuAudit, a privacy-enhancing decentralized data auditing scheme tailored for the MCP architecture. Leveraging Shamir’s Secret Sharing mechanism, key management is securely decentralized across multiple servers, effectively mitigating sub-threshold collusion attacks. Furthermore, by introducing a supervised hash mechanism, dynamic access policies and metadata constraints are cryptographically bound to the user’s private keys and file tags. Finally, based on a carefully designed randomized challenge-response protocol, third-party auditor (TPA) can efficiently verify both data integrity and metadata compliance without accessing the sensitive raw data. Security analysis demonstrates that SecuAudit can effectively resist data forgery, metadata tampering, and sub-threshold collusion attacks under the defined threat model. Experimental results obtained from our implementation under the evaluated configurations show that: (i) at (Keywords
In privacy-sensitive secure data circulation scenarios, data often needs to be shared, accessed, and reused among different entities. At the same time, the exposure of sensitive information should be reduced as much as possible, and the use of data should comply with corresponding access policies and regulatory requirements. This issue becomes more prominent in AI agent systems. During task execution, AI agents heavily rely on the Model Context Protocol (MCP) as a unified interface to dynamically invoke external resources, such as files, databases, and cloud services, residing outside their local security boundaries in a standardized manner. However, it also brings new security and privacy risks during cross-domain data circulation [1–3]. Since these external data sources lie outside the agent’s direct security perimeter, the data stored, transmitted, or retrieved through them may suffer from device failures, malicious attacks, and service anomalies, thereby compromising data integrity and metadata compliance. In addition, the security risks in MCP scenarios are not limited to bit-level tampering of the file content itself. Attackers may also tamper with metadata and policy attributes, such as access permissions, file types, validity periods, and authorization scopes. Such attacks cause the agent to misinterpret the data’s meaning and usage boundaries while leaving the original data content unchanged. For example, the attacker can use the external server to tamper with the access semantic rule from “Top Secret” to “Public Reference” without altering the original data. In this scenario, traditional integrity audit schemes may still determine that the data is available, but after parsing the compromised metadata and policy attributes, the AI agent may mistakenly use or export restricted information as public information, thereby leading to privacy breaches.
Recent research indicates that data auditing in the fields of AI still faces threats to data integrity [4–8], and MCP workflows may introduce additional risks such as tool abuse, privilege escalation, and data leaks during cross-domain resource scheduling [9]. However, most existing data auditing schemes [10–12] are designed for traditional static cloud storage environments, primarily focusing on whether outsourced data has suffered physical damage or content tampering, making them inappropriate for the frequent dynamic interactions and changing metadata and access control constraints inherent in MCP scenarios. More importantly, these schemes typically lack the ability to dynamically update and effectively validate access policies, registered compliance semantic rules, and metadata constraints, making it difficult to promptly detect context pollution issues caused by the tampering of metadata and policy attributes. Furthermore, existing schemes generally rely on centralized trusted nodes for key management, which not only introduces a single point of failure but also creates a centralized trust assumption. In MCP environments, AI agents require dynamic authorization based on different users, resource types, and task contexts; traditional centralized key management mechanisms struggle to efficiently support such complex permission changes. Consequently, there remains a significant lack of comprehensive data auditing schemes capable of simultaneously supporting decentralized key management, dynamic permission control, data integrity verification, and metadata compliance checks.
To address the above challenges, we propose SecuAudit, a decentralized security data auditing scheme designed for MCP environments. In contrast to traditional cloud storage auditing schemes designed for static outsourced data, SecuAudit is formulated for MCP scenarios involving dynamic external resource invocation. As illustrated in Fig. 1, SecuAudit seamlessly integrates into the standard MCP resource invocation workflow through a cohesive lifecycle of decentralized key management and challenge-response auditing. During the initial resource registration phase, the data owner utilizes a threshold-based distributed key infrastructure to generate rule-bound authenticators. These authenticators cryptographically bind the raw file blocks to their corresponding access policies and metadata constraints (such as validity periods and authorization scopes), subsequently anchoring the verifiable file tags to an immutable smart contract. Later, when an AI agent (MCP Client) attempts to access these external resources—such as databases or API tools—via the MCP Server, the cross-domain interaction triggers the auditing mechanism. Rather than requiring the full dataset to be downloaded for metadata compliance checking, a Third-Party Auditor (TPA) issues a randomized cryptographic challenge to the MCP Connector, which forwards the challenge to the corresponding External Server. The External Server computes an aggregated proof based on the stored data blocks and authenticators, and the MCP Connector relays the resulting proof to the TPA. By verifying this proof against the on-chain smart contract state, the TPA simultaneously confirms bit-level data integrity and strict metadata compliance. This strictly enforced workflow ensures that the AI agent only ingests policy-compliant and untampered context, thereby significantly reducing the risks of context pollution and unauthorized execution caused by metadata manipulation without exposing the underlying raw data.

Figure 1: Integration of SecuAudit into the standard MCP resource-invocation workflow. The left panel shows the standard MCP execution flow from a user or AI agent to the MCP client, MCP server, and external resources. The right panel shows the SecuAudit-enhanced workflow: (1) distributed system-key generation by
1.1.1 Threshold-Based Key Distribution
Threshold-based key distribution and secret sharing have been extensively studied as fundamental techniques for eliminating single points of trust and improving the robustness of distributed cryptographic systems. Existing approaches can be broadly classified into two representative paradigms: constructions based on the Chinese Remainder Theorem (CRT) and polynomial-based secret sharing schemes. The modular threshold scheme proposed by Asmuth and Bloom is a typical CRT-based construction, which enables efficient secret reconstruction under non-ideal access structures [13]. The main advantage of CRT-based schemes lies in their computational efficiency, making them attractive for resource-constrained and application-driven distributed systems. For example, CRT-based signature mechanisms have been explored in blockchain voting scenarios to improve practical efficiency [14]. Similarly, Sarkar et al. introduced a CRT-based RSA threshold cryptosystem for mobile ad hoc networks (MANETs), leveraging CRT to support decentralized operations in resource-limited environments [15]. However, the security of CRT-based schemes heavily depends on strict parameter selection, such as pairwise coprime moduli and carefully adjusted size relationships. Improper parameter choices may weaken their robustness in adversarial settings, thereby limiting their general applicability in security-critical scenarios. In contrast, the polynomial-based paradigm introduced by Shamir has become the dominant theoretical foundation for modern secret sharing and threshold key distribution [16]. Shamir’s
1.1.2 Data Security Audit Schemes
Remote data auditing has now been extensively studied for verifying the integrity of outsourced data in cloud storage environments. Existing schemes typically rely on trusted third parties, key management centers, or other centralized entities to manage keys and support the audit verification process. While such designs simplify system implementation, they are prone to introducing single points of failure and centralized trust issues, making them inappropriate for highly dynamic, heterogeneous MCP environments characterized by frequent cross-domain interactions. As shown in Table 1, existing audit schemes have achieved varying degrees of progress in data integrity verification, privacy protection, and audit efficiency, but they still have shortcomings in decentralized key management, dynamic user control, and metadata compliance verification. Shen et al. [21] proposed a certificateless auditing scheme that reduces certificate management overhead in traditional public key infrastructures and improves system availability. However, this scheme still relies on a centralized key generation process, making it difficult to completely eliminate the single-trust assumption. Additionally, the scheme does not fully support dynamic user addition and revocation, nor does it address the correctness verification of semantically relevant attributes such as access policies, validity periods, and usage constraints. Wu et al. [22] and Wang et al. [23] further investigated security and privacy protection issues in remote data auditing. While these schemes offer improvements in audit security, privacy protection, or verification efficiency, their key management processes typically still rely on a centralized trusted entity. Consequently, if this entity fails or is compromised, the overall security and availability of the system may be compromised. Furthermore, such schemes primarily focus on data content integrity, making it difficult to effectively address dynamic user lifecycle management issues; they also cannot verify whether metadata and policy attributes—such as access permissions, data validity periods, and usage restrictions—have been maliciously tampered with. Chen et al. [24] proposed a Merkle multi-branch hash tree to audit dynamic data in B5G networks, though it lacks metadata compliance verification. Das et al. [25] conducted a comparative review of blockchain-assisted mechanisms for access control, identity management, and data integrity verification in cloud environments, highlighting the potential of decentralization to alleviate centralized trust and single-point-of-failure risks. In contrast, Wang et al. [26] proposed a concrete blockchain-assisted mechanism for publicly verifiable data integrity. Outside the domain of remote cloud data auditing, Simmons and Winograd [27] investigated provenance authentication for broadcast media by combining cryptographically authenticated open-standards metadata with audio and video watermarking. Although their work provides useful insights into metadata authenticity, it targets media provenance rather than outsourced cloud-data auditing and is therefore not included as a technical baseline in Table 1. In recent years, Liu et al. [28] proposed the Ped-TLARDA scheme, achieving further progress in decentralized key generation and distribution. By reducing reliance on a single trusted authority, this scheme enhances system robustness and mitigates the risk of single points of failure. However, current data auditing schemes strictly focus on bit-level data integrity verification, failing to support the joint verification of file content integrity and metadata compliance (e.g., access policies, validity periods, file types, and authorization scopes). Furthermore, even the most advanced decentralized auditing scheme, Ped-TLARDA [28], does not provide mechanisms for dynamic user addition and revocation or for updating registered compliance rules in real time.

1.1.3 MCP-Enabled AI Agent Systems
With the rapid development of large language models, AI agents are increasingly relying on external tools, services, and data sources to enhance their task execution capabilities. The MCP connects AI agents to external servers through standardized interfaces, thereby improving interoperability in accessing heterogeneous resources, collaborating across systems, and invoking tools. However, this open interaction model also expands the attack surface of AI agent systems. Since external data is typically located outside the agent’s direct security perimeter, MCP workflows may face various security threats, including data tampering, data leakage, metadata manipulation, and tool abuse [9,29–31]. Existing MCP security research has primarily focused on threat modeling, access control, tool permission management, and isolation mechanisms. These studies reveal potential risks during agent-external tool interactions and provide important references for foundational protection mechanisms within the MCP ecosystem. However, existing research typically lacks a unified cryptographic audit mechanism capable of continuously verifying the trustworthiness of external data throughout the entire resource invocation process. In particular, when AI agents retrieve data from external servers via MCP, the system must not only confirm that the data content itself has not been tampered with but also verify that metadata and policy attributes related to data usage remain correct, such as access policies, validity periods, authorization scopes, and usage constraints. If these metadata and policy attributes are maliciously modified, AI agents may still generate policy-violating or semantically incorrect outputs based on erroneous context, even if the underlying data content remains bit-for-bit intact. Therefore, AI agent systems for MCP require an audit mechanism capable of jointly verifying data integrity and metadata compliance, while further supporting decentralized key management and dynamic user operations.
In summary, while existing studies have made progress in distributed cryptographic systems and remote data auditing, critical research gaps remain in adapting these techniques for dynamic, cross-domain MCP environments.
1. Gap in Key Management and Policy Binding: Existing threshold-based key distribution schemes are not specifically designed for dynamic resource invocation and lack native support for binding user identities, access policies, and metadata constraints to cryptographic keys within a unified framework.
2. Gap in Metadata Compliance Auditing: Current remote data auditing schemes strictly focus on bit-level data integrity verification. They fail to support the joint verification of file content integrity and metadata compliance, such as access policies, validity periods, and file types. This leaves AI agents vulnerable to context pollution and unauthorized execution.
3. Gap in Unified Frameworks for MCP: A significant deficiency remains in current AI agent systems for MCPs, as no existing scheme simultaneously integrates decentralized key generation, dynamic user management, data integrity verification, and metadata compliance auditing into a single comprehensive framework.
To address these interconnected gaps and establish a practical paradigm for secure data circulation, we propose SecuAudit. The main contributions are summarized as follows:
1. Privacy-Enhancing Auditing Framework. We propose SecuAudit, a privacy-enhancing decentralized auditing framework for secure data circulation in MCP-enabled AI agent environments. It enables reliable verification of external resources during dynamic data invocation. Unlike existing solutions that focus only on bit-level integrity, SecuAudit can jointly verify file content integrity and metadata compliance.
2. Decentralized Key Management with Dynamic Operations. We design a threshold-based key management mechanism that supports dynamic user revocation and semantic-rule updates gated by an on-chain threshold-count check over an approval count reported by the off-chain governance process. The asymptotic complexity of KeyGen is reduced from
3. Lightweight Protocol Design and Security Evaluation. We develop a challenge-response auditing protocol and evaluate its security and computational overhead. Measurements from our implementation show an average additional Signblock overhead of 2.5% relative to our Ped-TLARDA reimplementation and a cost of 499,021 gas for the evaluated contract-interaction lifecycle on local Ganache. Under the defined threat model and cryptographic assumptions, the formal analysis and controlled attack cases indicate resistance to data forgery, metadata tampering, unauthorized rule replacement, and sub-threshold collusion attacks.
Unlike existing approaches that separately address data integrity auditing or access control enforcement, SecuAudit introduces a unified cryptographic binding mechanism that couples file blocks, metadata constraints, and dynamic authorization states into a single auditable object. The novelty lies in the cross-layer binding and verification design rather than the individual cryptographic primitives themselves.
The evaluation framework for SecuAudit is deployed on a high-performance workstation equipped with an Intel Xeon W-2235 CPU clocked at 3.80 GHz, 32 GB DDR4 RAM, and an NVIDIA GeForce RTX 3060 GPU, operating under Microsoft Windows 10 Pro (Build 19045). To eliminate execution volatility and ensure rigorous empirical consistency, a standardized Unix-like CLI environment is maintained via Git Bash across all deterministic automation workflows and build pipelines. To facilitate future independent verification, we provide detailed descriptions of the hardware configuration, software dependencies, cryptographic parameters, and evaluation procedures. Although the current evaluation is conducted using our implementation, all reported measurements are obtained through repeated executions under fixed configurations to improve experimental transparency and reproducibility.
The off-chain protocol core and cryptographic primitives are engineered within the Java ecosystem, executing on the OpenJDK Temurin 1.8.0_492 runtime environment. Algebraic operations and bilinear pairing constraints are instantiated using the Java Pairing-Based Cryptography Library (JPBC v2.0.0) under a Type-A pairing configuration (160-bit subgroup order, 512-bit base field), backed by Bouncy Castle v1.78 for underlying multi-precision integer arithmetic and secure hashing. The Model Context Protocol (MCP) multi-agent system and its heterogeneous resource connectors are benchmarked using CPython 3.11.3 and the FastMCP harness, with statistical variance and confidence bounds computed via NumPy and Pandas. The decentralized policy registry and threshold compliance auditing mechanisms are implemented as Solidity (v0.8.36) smart contracts, compiled using the viaIR-based Yul intermediate representation pipeline with optimization enabled and set to 200 runs. The EVM target is configured as Cancun, supporting post-Dencun EVM semantics. Localized Ethereum Virtual Machine (EVM) opcode behavior and precise gas footprints are profile-tested utilizing Ganache 7.9.2 (JavaScript fallback mode) running on Node.js v24.15.0 and npm v9.6.6. Interface binding and asynchronous ledger interactions are facilitated through Web3.js v4.16.0.
We investigated the impact of block size on system performance using a fixed 2 MB file with security parameters

Figure 2: Effect of block size on the runtime of SecuAudit operations. A fixed 2 MB file was divided using block sizes ranging from 1 to 128 KB under
The per-block signing cost remains remarkably constant at approximately

Then, we systematically evaluated the impact of the threshold value on the performance of SecuAudit, as summarized in Fig. 3. Experiments were conducted with a fixed block size of 64 KB, 10

Figure 3: Effect of the threshold value
Based on the performance profile in Fig. 3, we select
Next, we further examined the effect of the total number of

Figure 4: Effect of the total number of key servers

Figure 5: Runtime comparison between SecuAudit and Ped-TLARDA [28]. The panels compare the execution times of (a) Keygen, (b) Signblock, (c) Genproof, and (d) Checkproof under six threshold configurations:
As shown in Fig. 6, the runtime distribution of SecuAudit is dominated by the Signblock phase, which is expected because this phase generates authenticators for all outsourced blocks. This overhead is a one-time preprocessing cost and is naturally parallelizable across file blocks. Once the data have been signed and outsourced, the online auditing process remains efficient. In particular, both Genproof and Checkproof complete within several seconds, showing that the proposed scheme can verify outsourced data without downloading the entire file. The Keygen phase also stays within a practical range, completing in less than 10 s under the tested setting. This cost is acceptable because key generation is performed only when a user joins the system or when rule-bound keys need to be refreshed. The Setup phase is an initialization cost and does not affect routine auditing. In addition, user revocation and rule update checks incur only negligible local overhead. Overall, the results indicate that SecuAudit shifts most computation to offline preprocessing while keeping the online audit procedure lightweight. The reported measurements only capture local cryptographic computation and simulated contract logic; blockchain consensus latency, gas cost, transaction confirmation time, and network propagation delay are not included.

Figure 6: Execution time of the main SecuAudit operations. The experiments were conducted using a block size of 64 KB,
To characterize run-to-run variability within our implementation, each configuration was executed 100 times with a block size of 64 KB and parameters

To further validate the scalability of SecuAudit under large-scale workloads, we conducted additional experiments with actual executions of the Signblock phase, rather than relying solely on regression-based estimation. The dataset size was increased from

To ensure a fair and consistent comparison, both the SecuAudit and Ped-TLARDA [28] were evaluated under the same pairing environment using a Type A pairing-friendly curve. The comparison focuses on the relative computational overhead of protocol components rather than curve-specific optimizations. We conducted a series of comparative experiments between SecuAudit and Ped-TLARDA under identical parameters. The threshold
As illustrated in Fig. 5, the four phases exhibit different performance trends. In the Keygen phase, SecuAudit incurs higher latency under small parameter settings because each
This qualitative observation is quantitatively validated by linear regression of the data in Table 5: SecuAudit Keygen scales as Keygen

For the Genproof and Checkproof phases, the two schemes show comparable performance. This result is also consistent with Table 2, since both schemes have the same asymptotic complexity in these two phases, namely
To provide a complete quantitative data, Table 5 summarizes the per-phase execution times and percentage differences between SecuAudit and Ped-TLARDA across all six
As summarized in Table 5, the four phases exhibit quantitatively distinct behaviors. In the Keygen phase, at
Furthermore, the comparative measurements are consistent with the expected Keygen scaling of the two schemes within the tested parameter range. SecuAudit scales approximately linearly with m, whereas our Ped-TLARDA reimplementation exhibits growth associated with
2.4 End-to-End Performance and Concurrency Scalability
Building upon the foundational experimental setup described in Section 2.1, we further extended our evaluation into a comprehensive discrete-event simulation framework to analyze the system’s end-to-end (E2E) performance. While the local cryptographic computation follows the exact benchmarks detailed previously, the on-blockchain transaction overheads were verified via Solidity smart contracts deployed on a local Ganache Ethereum emulator. Crucially, to capture the empirical stochasticity of cross-domain resource access within the Model Context Protocol (MCP) ecosystem, the network propagation delays of REST connectors and database I/O latency of DB connectors were statistically modeled using Gaussian (Normal) distributions configured with realistic Round-Trip Times (RTT). As detailed in Table 6, we tested four deployment scenarios spanning from a local area network to a wide area network (300 ms delay), under distinct blockchain confirmation profiles including Layer-2 Polygon (2.0 s) and the Ethereum Mainnet (12.0 s). Even under the most rigorous scenario (WAN + Remote DB + Mainnet), the cryptographic computation remains the dominant performance bottleneck, accounting for 79.2% of the total E2E latency, while the MCP communication and blockchain consensus overheads are minimal. Furthermore, to investigate the system’s resilience under volatile multi-agent workloads, we simulated high-concurrency request patterns utilizing a Poisson M/G/k queuing model combined with extensive Monte Carlo trials. As shown in Table 7, the system scales robustly with the number of available CPU cores, achieving a peak throughput of 0.33 TPS under a 16-core configuration, while the Coefficient of Variation (CV) drops from 14.1% to 0.22% as concurrency increases.


Overall, these results demonstrate that SecuAudit scales robustly across key dimensions within the MCP ecosystem. First, regarding multi-agent concurrency, the system handles increasing concurrent requests (from 1 to 500) under a Poisson M/G/k queuing distribution with the completion time Coefficient of Variation (CV) decreasing monotonically to 0.22% under 16-core parallelism. Second, regarding heterogeneous connector latency across REST API and database connectors with varied network delays (50–300 ms RTT), cryptographic computation consistently accounts for the majority (79.2%) of end-to-end latency, proving that diverse external resource types do not introduce disproportionate communication bottlenecks. Finally, node and governance operations scale efficiently; key generation scales linearly with
2.5 On-Blockchain Overhead and Attack-Driven Safety Mitigations
The economic feasibility of the blockchain component is critical for practical deployment. We deployed the SecuAudit smart contract on a local Ganache emulator to measure precise transaction-level Gas consumption. The reported Gas results focus on operational costs after deployment, including semantic rule updates, tag uploads, and user revocation, while contract deployment cost is excluded because it is a one-time initialization overhead. As presented in Table 8, a complete contract interaction lifecycle, including semantic rule update, tag uploading, and potential user revocation operations, consumes a total of 499,021 gas. At a standard rate of 20 Gwei/Gas and an ETH price of $2000, this translates to approximately $19.96 on the Ethereum Mainnet

Under the evaluated implementation, the contract state associated with each file requires approximately 770 bytes, including the file tag, rule-registry entry, and revocation information. Transaction-confirmation latency was not directly measured on a public blockchain. Using an assumed Layer-2 confirmation interval of 2.0 s, the simulation estimates that the cumulative confirmation latency of the evaluated contract interactions is within 15 s. Actual confirmation latency and transaction cost may vary depending on the selected blockchain network, network congestion, fee policy, and confirmation requirements.
To examine the behavior of the prototype under the threat model defined in Section 4.1.2, we implemented six attack cases covering data-block tampering, expired-rule replay, revoked-user bypass, metadata modification, file-type substitution, and old-rule rollback. As summarized in Table 9, all six implemented attack cases were detected or rejected in the controlled evaluation. Data-block tampering caused the bilinear pairing verification to fail, whereas the remaining cases were rejected through the corresponding smart-contract state and rule-consistency checks. In addition, one legitimate control case completed without a false-positive decision. This observation confirms the expected behavior of the implemented control case but does not establish a general zero false-positive rate.

Taken together, the controlled measurements characterize the implementation-specific overhead of the extended metadata-compliance functions. Relative to our Ped-TLARDA reimplementation, metadata binding introduces an average additional Signblock overhead of 2.5%, while the differences in the online auditing phases remain within 14% across the evaluated configurations. The local contract implementation consumes 499,021 gas for the evaluated interaction lifecycle and requires approximately 770 bytes of contract state per file.
2.6 Protocol Sizing and Deployment Trade-Offs
Based on the quantitative evaluation, SecuAudit provides flexible trade-offs for varied MCP deployment scales. We recommend a default block size of 64 KB, which balances signing efficiency (1285.78 ms per 2 MB) and fine-grained recovery granularity. For the audit parametrization, let
All underlying cryptographic operations are securely instantiated using a Type-A pairing-friendly curve (160-bit subgroup, approximately 80-bit symmetric security), mapping protocol elements to highly compact sizes (e.g., 128 bytes per
Demonstrated Results. Empirical results demonstrate that SecuAudit integrates decentralized key management, metadata-compliance verification, and dynamic user revocation into an MCP-oriented prototype. Relative to our reimplementation of Ped-TLARDA, SecuAudit exhibited 54.6% lower keygen latency at the largest evaluated configuration, where
Theoretical Claims. Beyond the empirical performance metrics, the security of SecuAudit is founded on provable cryptographic guarantees. It is theoretically proven that no probabilistic polynomial-time adversary can forge a valid proof for corrupted data or bypass the metadata compliance checks, assuming the hardness of the Computational Diffie-Hellman (CDH) and Discrete Logarithm (DL) problems. Additionally, the protocol achieves strict collusion resistance; leveraging the information-theoretic properties of Shamir’s threshold secret sharing, we mathematically guarantee that any coalition of fewer than t key servers cannot reconstruct the system master secret or forge valid user credentials.
Assumptions.These security and operational guarantees inherently rely on several foundational assumptions within our threat model. We assume a partially honest distributed key infrastructure, where at least t out of m key servers remain uncompromised and execute the protocol correctly. Furthermore, we rely on the standard assumption of blockchain immutability; the underlying ledger is presumed to provide deterministic smart contract execution and eventual consistency against long-range forks. From a network perspective, we assume that the communication channels between users and key servers are authenticated to prevent man-in-the-middle impersonations.
Future Work.While SecuAudit establishes a secure paradigm for data circulation, certain architectural enhancements are explicitly deferred to future work. First, although the system exhibits extreme cost-efficiency on a local Ganache emulator, future deployments will evaluate real mempool dynamics and gas volatility on live public blockchain mainnets. Second, while the current prototype has been experimentally evaluated under distributed key-server configurations of up to 59
As illustrated in Fig. 7, to clearly demonstrate the overall architecture of SecuAudit and the interaction workflow among entities, this section defines and describes the key components within the MCP ecosystem:

Figure 7: The Cryptographic system model and protocol interactions of SecuAudit. The system consists of distributed key servers (KSs), data owners or users, external resources, a third-party auditor (TPA), and a blockchain-based policy registry. The numbered arrows denote the seven protocol operations: (1) Setup initializes public parameters and distributed key shares; (2) Keygen reconstructs a rule-bound user key from at least t authenticated KS responses; (3) Signblock generates authenticators and outsources the authenticated data blocks; (4) Genproof produces an aggregated proof in response to a randomized audit challenge; (5) Checkproof verifies data integrity and metadata compliance against the on-chain state; (6) User revocation updates the authorization and denial sets; and (7) Rule update replaces a registered semantic rule after threshold approval. Blockchain interactions record file tags, rule hashes, and revocation information, whereas raw data remain off-chain.
Key Servers (
Users: Users are the original owners and uploaders of data in the MCP environment, and may be either human users or AI agents acting on their behalf. Each user interacts with at least
Blockchain: The blockchain serves as an immutable and trusted public infrastructure. It maintains system parameters, data tags, user revocation lists, and policy update records. Smart contracts deployed on the blockchain automatically enforce access control, policy updates, and user revocation in a trustless manner, ensuring transparency and auditability.
External Resources: External Resources host and manage heterogeneous resources accessed through MCP, such as databases, API servers, cloud servers. In SecuAudit, the external servers store outsourced data blocks and their corresponding authenticators, whereas connectors handle resource access forwarding, tag binding, challenge routing, and proof collection. When challenged by the TPA, the external server generates an integrity proof from the stored data to demonstrate that the target data remain correct and intact.
TPA: The TPA is an optional independent verification entity that issues lightweight random challenges to external servers on behalf of data owners or system participants and further checks that it meets current access policies and metadata and access control constraints. By validating the returned proofs, TPA can assess the integrity of remotely stored data without accessing the original data, reducing the computational burden on the user side and improving audit efficiency.
In this section, we consider a multi-party interactive environment involving malicious entities and define the threat model of SecuAudit based on the framework of provable security. We assume that system participants may deviate from the prescribed protocol due to self-interest or external compromise. The semantic rule hash
Malicious External Server (
Adversary
Colluding
Adversary
Malicious MCP Client and Prompt Injection (
Adversary
Compromised MCP Connector (
Adversary
Malicious or Semi-Honest TPA (
Adversary
Security Assumptions:
The security proof of our scheme relies on the following infrastructural premises and cryptographic assumptions:
1. CDH Assumption: Given
2. Discrete Logarithm (DL) Assumption: Given
The quantitative threat-model parameters, their default values, and the corresponding derivations are summarized in Table 10.

To securely support AI agents dynamically invoking heterogeneous resources in the MCP environment, SecuAudit is designed to achieve the following security and functional goals:
1. Robust Data Integrity. The system should ensure that any modification or deletion of outsourced data by a malicious external server can be detected with a probability determined by the challenge size. Under the Computational Diffie-Hellman (CDH) assumption, no PPT adversary can forge a valid proof that passes the verification.
2. Metadata Compliance. SecuAudit should ensure that outsourced data satisfies the latest access policies and metadata constraints during auditing. Any unauthorized change to metadata, such as file type, validity period, authorization scope, or access rules, should be detected even if the file content remains unchanged.
3. Collusion Resistance. The system must withstand collusion attacks. Specifically, a malicious external server colluding with revoked users, or an adversary controlling up to
4. Rule Dynamic Updates. The scheme should support policy updates and user revocation without requiring the data owner to re-download or re-upload the outsourced file content. In the strict rule-bound mode, file tags and authenticators may need to be refreshed to bind existing outsourced data to the updated semantic rule.
4.1.4 Metadata Compliance Model
To provide a mathematically rigorous foundation for verification, we formalize the policy language, metadata schema, satisfaction relations, and dynamic lifecycle management below.
Definition 1 (Compliance Syntax). A semantic rule is a 5-tuple
Definition 2 (Semantic Satisfaction). Let
All sub-conditions reduce to decidable finite-set membership or partial-order tests, ensuring deterministic, polynomial-time execution during the Checkproof phase.
Definition 3 (Semantic Rule Update State Machine). The dynamic lifecycle of a policy is governed by a deterministic finite state machine with states
1. Update:
2. Revoke:
Description of SecuAudit
The system master private key is collaboratively generated by
Setup
The Setup phase initializes the public parameters and the distributed key infrastructure. The system defines a cyclic group
If the equation does not hold, node
Keygen
The Keygen phase derives a user private key with the help of at least
Invalid responses are discarded. For each valid response, the user computes
Signblock
The Signblock phase generates authenticators and creates a rule-bound file tag before outsourcing. The data owner assigns a unique identifier
Genproof
The Genproof protocol is executed by an authorized verifier and the external server. The verifier may be an optional TPA or another entity with access to the required public verification information. Given a challenge parameter
Checkproof
The Checkproof phase verifies data integrity and metadata compliance. After receiving
The verifier retrieves the latest semantic rule
Usrrevo
The Usrrevo protocol revokes a user’s access privilege through the smart contract. Given a user identity
Updaterule
The Updaterule protocol updates registered compliance rules using an approval count produced by an off-chain governance process. Given a new semantic rule
The notations is summarized in Appendix A, while the detailed smart contract architecture and execution mechanics, correctness analysis and security analyses are provided in Appendices B–D, respectively.
In this paper, we proposed SecuAudit, a privacy-enhancing and decentralized data auditing framework strictly tailored to secure cross-domain data circulation within the MCP-enabled AI agent ecosystem. Addressing the inherent limitations of traditional bit-level integrity checkers, SecuAudit introduces a joint verification mechanism that cryptographically binds dynamic metadata, access control policies, and user identities directly to the underlying data content. By integrating a threshold-based distributed key management architecture with a lightweight challenge-response protocol and immutable smart contract registries, the system effectively mitigates single points of failure while supporting seamless semantic rule updates and dynamic user revocation.
Under the stated cryptographic assumptions and threat model, the formal analysis establishes resistance to the modeled data-forgery, metadata-tampering, and sub-threshold collusion attacks. Within our controlled implementation, SecuAudit exhibited approximately linear Keygen scaling with the number of key servers m and achieved lower Keygen latency than our reimplementation of Ped-TLARDA under the largest evaluated configurations. The local Ganache measurements and simulation-based analyses further indicate bounded blockchain and concurrency overhead under the selected parameters. These findings support the feasibility of SecuAudit within the evaluated settings, but they do not establish implementation-independent superiority, production readiness, or independently reproduced performance. SecuAudit therefore provides a foundation for further investigation of metadata-compliance auditing in MCP-enabled AI-agent systems.
Although SecuAudit demonstrates effective metadata compliance auditing under the evaluated MCP scenarios, several limitations remain. First, the current implementation is evaluated mainly in a local Ethereum-compatible environment rather than on a production blockchain network. Therefore, the reported latency, gas consumption, and system stability may not fully reflect blockchain congestion, transaction confirmation delays, and network fluctuations in real-world deployments. Second, although the experiments evaluate configurations with up to 59 key servers, large-scale and geographically distributed deployments involving hundreds of key servers require further investigation, particularly with respect to communication overhead, node churn, fault tolerance, and availability. Third, the security guarantees rely on the defined threat model, especially the assumption that fewer than the threshold number of key servers collude. Attacks such as endpoint compromise, denial-of-service attacks, and side-channel leakage are not explicitly addressed in the current framework. Fourth, the current challenge-response protocol returns an unmasked linear aggregate of the challenged data blocks. Although a single audit does not directly disclose the individual blocks, an adaptive TPA may issue repeated correlated challenges and accumulate additional information about the challenged data. The current implementation therefore does not provide a formal confidentiality guarantee against unrestricted adaptive-query attacks. Incorporating verifier-independent challenge randomness, challenge-rate control, and randomized proof masking is left for future work. Fifth, the randomized challenge-response mechanism provides probabilistic rather than deterministic detection, meaning that a single audit may not detect extremely sparse data corruption. Finally, the current framework focuses on integrity and metadata compliance verification, while privacy-preserving rule evaluation over encrypted metadata remains an open direction for future research. In addition, the current semanticRuleUpdate prototype does not cryptographically verify individual KS-node approvals on-chain. It relies on an off-chain governance process to authenticate the approvers and report the approval count correctly. Implementing on-chain verification of unique KS signatures, together with nonce- and version-based replay protection, remains future work.
Acknowledgement: Not applicable.
Funding Statement: This work was supported in part by Natural Science Foundation of Henan (252300421879, 252300420987), in part by Key Technologies R&D Program of Henan Province (252102210213), in part by outstanding young science and technology talent project of Zhengzhou (42).
Author Contributions: The authors confirm contribution to the paper as follows: conceptualization, Yufa Shi, Jiaxing Hu and Lipeng Wang; methodology, Yufa Shi and Jiaxing Hu; software, Yufa Shi; validation, Yufa Shi, Jiaxing Hu and Mengyao Wang; formal analysis, Yufa Shi and Jiaxing Hu; investigation, Yufa Shi and Mengyao Wang; resources, Lipeng Wang, Rui Ma and Zhijuan Jia; data curation, Yufa Shi and Mengyao Wang; writing—original draft preparation, Yufa Shi; writing—review and editing, Jiaxing Hu, Lipeng Wang, Rui Ma, Zhijuan Jia and Mengyao Wang; visualization, Yufa Shi; supervision, Lipeng Wang, Rui Ma and Zhijuan Jia; project administration, Lipeng Wang and Rui Ma; funding acquisition, Lipeng Wang, Rui Ma and Zhijuan Jia. All authors reviewed and approved the final version of the manuscript.
Availability of Data and Materials: The data that support the findings of this study are available from the Corresponding Author, Lipeng Wang, upon reasonable request.
Ethics Approval: Not applicable.
Conflicts of Interest: The authors declare no conflicts of interest.
The main mathematical symbols and system parameters used throughout this paper are summarized in Table A1.

Appendix B Smart Contract Architecture and Execution Mechanics

To facilitate transparent and immutable enforcement within the MCP ecosystem, the SecuAudit smart contract is explicitly architected to optimize gas economics, transaction latency, and state consistency. The design rationale addressing the core operational workflows and failure handling is formalized below:
1. Contract Design & Revocation Mechanism: The architecture is built upon three core state mappings: the semantic rule registry
2. Rule-Update Workflow: The current semanticRuleUpdate implementation applies an on-chain threshold-count guard to rule updates. The contract receives an approval count
3. Failure Handling and Guard Ordering: The contract evaluates authorization and revocation conditions before rule-consistency checks and before state-mutating SSTORE operations. Consequently, a request that fails an earlier validation guard is reverted without executing the subsequent contract logic or performing state updates. This ordering is intended to avoid unnecessary execution for invalid requests. However, the present evaluation does not measure the Gas consumption of reverted transactions or compare it with a separate baseline implementation; therefore, no quantitative Gas-saving claim is made for rejected transactions.
4. Transaction Latency & Auditability: To minimize read-latency for the off-chain TPA, the contract relies on an event-driven design. By emitting structured Solidity events (RuleUpdated, TagRegistered, UserRevoked), the MCP Server and TPA can asynchronously track the compliance state via rapid RPC node queries, circumventing the latency of direct on-chain state reads during real-time data circulation. Gas consumption for the evaluated successful contract operations is reported in Section 2.5. Rejected-transaction Gas costs and confirmation latency on a public blockchain were not directly measured.
Appendix C Correctness Analysis
We first show the correctness of the verifiable share distribution in Setup. For each
Thus, any honestly generated share passes the verification Eq. (2), while invalid shares can be detected before being used in the aggregate key generation process.
Then, we define the system-wide aggregate polynomial as
Since
Next, we verify the correctness of Eq. (3) in the Keygen step. Let
Thus, Eq. (3) holds for every honest
We then show that the public verification component
Since
Finally, we verify the correctness of Eq. (4) in the Checkproof step. For each challenged block index
Since
Thus, Eq. (4) holds for honestly generated proofs. The metadata compliance check is independent of the pairing equation. It ensures that the verified data also satisfies the current metadata and access control constraints.
Theorem A1 (Auditing Soundness): In SecuAudit, when the outsourced resource stored on the external server is corrupted or inconsistent with the designated metadata and the latest semantic rule, the external server is unable to produce a legitimate proof that satisfies the verifier’s validation process, except with negligible probability.
Proof: Assume that the CDH assumption holds in group
Game 0: This game is the real attack game. The challenger
Analysis: The verifier accepts only if the following condition holds:
Game 1: This game is identical to Game 0, except that the challenger maintains query lists for
Analysis: By the birthday bound, the probability of such a collision is bounded by
Game 2: This game is identical to Game 1, except that the challenger aborts if
Analysis: For each block
Game 3: This game is identical to Game 2, except that we consider the case where
Analysis: For an honest proof, the aggregated authenticator satisfies
Game 4: This game is identical to Game 3, except that we consider the case where
Analysis: During
Thus, Combining the above games, the real-world advantage of
If the challenge size
Theorem A2 (Collusion Resistance): In SecuAudit, when fewer than
Proof: Let
Game 0: The challenger
Analysis: This game defines the real collusion attack. The initial advantage is denoted as
Game 1: This game is identical to Game 0, except that
Analysis: Let the aggregate polynomial be
Game 2: This game is identical to Game 1, except that we consider whether
Analysis: Recovering
Game 3: This game is identical to Game 2, except that we examine whether
Analysis: In
Game 4: This game is identical to Game 3, except that we examine whether
Analysis: During
Thus, Combining the above games, the advantage of
The term
MCP-Specific Threat Analysis.
Beyond the formal security guarantees established in Theorems A1 and A2 against adversaries
1. Against Malicious MCP Client (
Second, the smart contract enforces a strict validation sequence (Algorithm A1) that includes sender identity, revocation status, RH consistency, and
2. Against Compromised MCP Connector (
3. Against Malicious TPA (
Together with Theorems A1 and A2 and the attack-driven evaluation in Section 2.5, this analysis indicates that SecuAudit provides a multi-layered defense against the modeled threats, subject to the stated assumptions and the adaptive-TPA limitation discussed above. The six attack cases are designed to cover representative attack categories corresponding to the defined threat model, including integrity violation, metadata manipulation, replay, unauthorized update, and collusion attacks. They are not intended to exhaustively enumerate all possible adaptive adversarial strategies. A formal evaluation against fully adaptive adversaries is beyond the scope of this work and will be investigated in future research.
References
1. Hou X, Zhao Y, Wang S, Wang H. Model context protocol (MCPlandscape, security threats, and future research directions. ACM Trans Softw Eng Methodol. 2026;3901–15. doi:10.1145/3796519. [Google Scholar] [CrossRef]
2. Anbiaee Z, Rabbani M, Mirani M, Piya G, Opushnyev I, Ghorbani A, et al. Security threat modeling for emerging AI-agent protocols: a comparative analysis of MCP, A2A, Agora, and AN. arXiv:2602.11327. 2026. [Google Scholar]
3. Zhao W, Liu J, Ruan B, Li S, Liang Z. When MCP servers attack: taxonomy, feasibility, and mitigation. arXiv:2509.24272. 2025. [Google Scholar]
4. de Witt CS, Krawiecka K, Krawczuk I, Hagag B, Anderson WL, Belcak P, et al. Open challenges in multi-agent security: towards secure systems of interacting AI agents. arXiv:2505.02077. 2025. [Google Scholar]
5. dos Santos Filho EB. ESAA-Security: an event-sourced, verifiable architecture for agent-assisted security audits of AI-generated code. arXiv:2603.06365. 2026. [Google Scholar]
6. Wang L, Hu M, Yang LT, Sun X, Chen Z. AI-auditor: a data auditing framework for enhancing the trustworthiness of AI models. IEEE Trans Ind Inform. 2025;21(12):9208–16. [Google Scholar]
7. Han G, Li H. Sec-auditor: a blockchain-based data auditing solution for ensuring integrity and semantic correctness. Comput Mater Contin. 2024;80(2):2121–37. [Google Scholar]
8. Lei H, Wang XA, Liu W, Wu L, Zhang C, Jiang W, et al. An improved blockchain-based cloud auditing scheme using dynamic aggregate signatures. Comput Mater Contin. 2026;86(2):1–32. doi:10.32604/cmc.2025.070030. [Google Scholar] [CrossRef]
9. Radosevich B, Halloran J. MCP safety audit: LLMs with the model context protocol allow major security exploits. arXiv:2504.03767. 2025. [Google Scholar]
10. Zhao M, Chen H. Identity-based provable data possession with designated verifier from lattices for cloud computing. Entropy. 2025;27(7):753–73. doi:10.3390/e27070753. [Google Scholar] [PubMed] [CrossRef]
11. Miao Y, Huang Q, Xiao M, Susilo W. Blockchain assisted multi-copy provable data possession with faults localization in multi-cloud storage. IEEE Trans Inf Forensics Secur. 2022;17:3663–76. doi:10.1109/tifs.2022.3211642. [Google Scholar] [CrossRef]
12. Alharby M. Preserving data secrecy and integrity for cloud storage using smart contracts and cryptographic primitives. Comput Mater Contin. 2024;79(2):2449. doi:10.32604/cmc.2024.050425. [Google Scholar] [CrossRef]
13. Asmuth C, Bloom J. A modular approach to key safeguarding. IEEE Trans Inf Theory. 1983;29(2):208–10. doi:10.1109/tit.1983.1056651. [Google Scholar] [CrossRef]
14. Wang L, Hu M, Jia Z, Gong B, Zhang J. A chinese remainder theorem-based signature scheme for blockchain voting scenarios. J Comput Appl Res. 2020;37(2):538–43. (In Chinese). [Google Scholar]
15. Sarkar S, Kisku B, Misra S, Obaidat MS. Chinese remainder theorem-based RSA-threshold cryptography in MANET using verifiable secret sharing scheme. In: Proceedings of the 2009 IEEE International Conference on Wireless and Mobile Computing, Networking and Communications; 2009 Oct 12–14; Marrakech, Morocco. p. 258–62. [Google Scholar]
16. Shamir A. How to share a secret. Commun ACM. 1979;22(11):612–3. doi:10.1145/359168.359176. [Google Scholar] [CrossRef]
17. Feldman P. A practical scheme for non-interactive verifiable secret sharing. In: Proceedings of the 28th Annual Symposium on Foundations of Computer Science (sfcs 1987); 1987 Oct 12–14; Los Angeles, CA, USA. p. 427–38. [Google Scholar]
18. Kasser D. An improvement upon the bounds for the local leakage resilience of shamir’s secret sharing scheme. In: Theory of Cryptography Conference. Berlin/Heidelberg, Germany: Springer; 2025. p. 395–422. [Google Scholar]
19. Baghery K, Knapen N, Nicolas G, Rahimi M. Pre-constructed publicly verifiable secret sharing and applications. In: International Conference on Applied Cryptography and Network Security. Berlin/Heidelberg, Germany: Springer; 2025. p. 89–119. [Google Scholar]
20. Wang L, Gao J, Li Q, Chen Z. A multi-receiver multi-message signcryption scheme based on blockchain. J Softw. 2021;32(11):3606–27. (In Chinese). doi:10.3934/mbe.2023806. [Google Scholar] [CrossRef]
21. Shen J, Zeng P, Choo KKR, Li C. A certificateless provable data possession scheme for cloud-based EHRs. IEEE Trans Inf Forensics Secur. 2023;18:1156–68. doi:10.1109/tifs.2023.3236451. [Google Scholar] [CrossRef]
22. Wu Y, Tan X, Xie Q. Certificateless provable data possession scheme for cloud-based electronic health records system. Mathematics. 2024;12(24):3883–906. doi:10.3390/math12243883. [Google Scholar] [CrossRef]
23. Wang M, Yu J, Shen W, Hao R. Privacy-preserving time-based auditing for secure cloud storage. IEEE Trans Inf Forensics Secur. 2024;19:7866–78. doi:10.1109/tifs.2024.3449095. [Google Scholar] [CrossRef]
24. Chen H, Tao Z, Wang Z, Liu X. Merkle multi-branch hash tree-based dynamic data integrity auditing for B5G network cloud storage. J Inf Secur Appl. 2025;89(1):103981. doi:10.1016/j.jisa.2025.103981. [Google Scholar] [CrossRef]
25. Das S, Priyadarshini R, Mishra M, Barik RK. Leveraging towards access control, identity management, and data integrity verification mechanisms in blockchain-assisted cloud environments: a comparative study. J Cybersecur Priv. 2024;4(4):1018–43. doi:10.3390/jcp4040047. [Google Scholar] [CrossRef]
26. Wang K, Wu Q, Han T, Luo D, Deng H, Qin B, et al. A blockchain-based publicly verifiable data access control scheme without pairing. Comput Electr Eng. 2024;120(2):109724. doi:10.1016/j.compeleceng.2024.109724. [Google Scholar] [CrossRef]
27. Simmons JC, Winograd JM. Interoperable provenance authentication of broadcast media using open standards-based metadata, watermarking and cryptography. arXiv:2405.12336. 2024. [Google Scholar]
28. Liu K, Ning J, Wu P, Xu S, Chen R. TLARDA: threshold label-aggregating remote data auditing in decentralized environment. IEEE Trans Inf Forensics Secur. 2025;20:3146–60. [Google Scholar]
29. Liu Y, Jia Y, Geng R, Jia J, Gong NZ. Formalizing and benchmarking prompt injection attacks and defenses. In: Proceedings of the 33rd USENIX Security Symposium (USENIX Security 24); 2024 Aug 14–16; Philadelphia, PA, USA. p. 1831–47. [Google Scholar]
30. Debenedetti E, Zhang J, Balunovic M, Beurer-Kellner L, Fischer M, Tramèr F. AgentDojo: a dynamic environment to evaluate prompt injection attacks and defenses for LLM agents. Adv Neural Inf Process Syst. 2024;37:82895–920. [Google Scholar]
31. Hu Y, Fan C, Samyoun S, Du J. Log-To-Leak: prompt injection attacks on tool-using LLM agents via model context protocol. 2026 [cited 2026 May 1]. Available from: https://openreview.net/forum?id=UVgbFuXPaO. [Google Scholar]
Cite This Article
Copyright © 2026 The Author(s). Published by Tech Science Press.This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


Submit a Paper
Propose a Special lssue
View Full Text
Download PDF
Downloads
Citation Tools