---
title: "Outbound Auth with Trusted MCP"
---

Trusted MCP extends standard MCP with identity attestation between components and end-to-end encrypted communication, preventing service-identity spoofing, data tampering, and traffic hijacking; combined with confidential computing (such as Jeddak AICC) and trusted inference (such as Confidential Doubao), it lets the agent and model run in a trusted environment. VeADK connects to Trusted MCP services natively via the `tools` mechanism. This is the trusted-execution plane from the [security overview](/en/docs/framework/security).

## Prerequisites

1. Have a working Trusted MCP service address, e.g. `wss://your-trusted-mcp.example.com`.
2. Have an AICC config file `./aicc_config.json` (for the confidential environment and remote attestation); see the [official example](https://github.com/volcengine/AICC-Trusted-MCP/blob/main/README.md).
3. Set the `x-trusted-mcp: true` request header in the connection params to enable trusted mode.

## Usage

```python title="agent.py"
import asyncio

from veadk import Agent, Runner
from veadk.utils.mcp_utils import get_mcp_params
from veadk.tools.mcp_tool.trusted_mcp_toolset import TrustedMcpToolset

mcp_url = "<TrustedMCP server address>"

# 1. Build connection params and enable trusted mode
connection_params = get_mcp_params(mcp_url)
connection_params.headers = {"x-trusted-mcp": "true"}

# 2. Initialize the Trusted MCP toolset
toolset = TrustedMcpToolset(connection_params=connection_params)

# 3. Initialize and run the agent
agent = Agent(tools=[toolset])
runner = Runner(agent=agent)

response = asyncio.run(runner.run(messages="What's the weather in Beijing?"))
print(response)  # It's sunny in Beijing, 25°C.
```

## Configuration

`TrustedMcpToolset` supports these key options:

| Option | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `x-trusted-mcp` (header) | string | `true` | Whether to enable the trusted channel |
| `aicc_config` (path) | string | `./aicc_config.json` | Path to the AICC config file, used for attestation and policy in the confidential computing environment |

For the config file example and details, see [TrustedMCP config](https://github.com/volcengine/AICC-Trusted-MCP/blob/main/README.md).
