# System Architecture

ETMCP's system architecture is designed to support scalable, secure, and modular agent-based compute across decentralized networks. Inspired by the DeMCP structure, our architecture is composed of the following layers:

#### 1. Client Layer

* **Users & Agents**: End-users and AI agents serve as primary input/output entities.
* **Client Applications**: Interfaces such as desktop apps or Web3 dApps (e.g., Copilot Studio, Claude Desktop, etc.) allow user interaction.

#### 2. Language Model Layer

* **LLM (Large Language Model)**: Acts as the cognitive engine for understanding prompts and deciding which tools or agents to invoke.
* Interacts with MCP Clients for execution tasks.

#### 3. MCP Client Layer

* **MCP Client**: The primary coordinator that interacts with registries, data stores, and TEE nodes.
* It receives prompts/tool calls and securely delegates workloads.

#### 4. Registry & Verification

* **Centralized MCP Registry**: A discovery layer where verified metadata about tools and agents are maintained.
* **Blockchain Registry**: On-chain ledger for registry of agents, smart contracts, and proofs.
* **Attestation Verifier**: Validates execution integrity using zk/TEE attestation methods.

#### 5. Execution & Secure Environment

* **TEE MCP Server**: Executes tasks in a secure enclave, includes:
  * Tools Execution Engine
  * I/O Encryption Processor
  * Security Policy Enforcer
* **Trust Execution Environment**: Ensures workloads are run in isolated, tamper-proof environments.

#### 6. Storage & Libraries

* **User Data Storage**: Handles temporary or persistent state of agents and data context.
* **Function Library / APIs / Resources**: A pool of callable external functions or models that agents may invoke.

#### 7. Flow Summary

1. A user prompt is submitted through a client app.
2. The LLM interprets the prompt and calls an agent/tool.
3. MCP Client verifies registry data and delegates execution.
4. Secure execution takes place via TEE MCP Server.
5. Result is verified, returned to user, and optionally stored.

<figure><img src="/files/Gni5OwUMBYK95qE3DINu" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.etmcp.com/technology/system-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
