@treza/mcp
v0.3.0
Published
Model Context Protocol server for Treza Enclaves — lets AI agents manage TEEs, verify attestations, redact PII, and sign transactions
Maintainers
Readme
@treza/mcp
Model Context Protocol (MCP) server for Treza Enclaves. Lets AI agents manage hardware-isolated TEEs, verify cryptographic attestations, and interact with the Treza platform — all through natural tool calls.
Quick Start
With Claude Desktop / Cursor / Any MCP Client
Add to your MCP configuration:
{
"mcpServers": {
"treza": {
"command": "npx",
"args": ["@treza/mcp"],
"env": {
"TREZA_BASE_URL": "https://app.trezalabs.com"
}
}
}
}As a Standalone Server
npm install -g @treza/mcp
treza-mcpEnvironment Variables
| Variable | Default | Description |
|---|---|---|
| TREZA_BASE_URL | https://app.trezalabs.com | Treza Platform API URL |
| TREZA_TIMEOUT | 30000 | Request timeout in milliseconds |
| TREZA_API_KEY | — | API key (treza_live_...) for authenticated tools like treza_redact_text and treza_pii_audit_query |
| TREZA_ACCOUNT | — | Optional tenant account the API key belongs to |
Available Tools
Enclave Management
| Tool | Description |
|---|---|
| treza_list_enclaves | List all enclaves owned by a wallet address |
| treza_get_enclave | Get detailed info about a specific enclave |
| treza_create_enclave | Create a new AWS Nitro Enclave with hardware-isolated TEE |
| treza_update_enclave | Update enclave name, description, or config |
| treza_delete_enclave | Permanently delete a terminated enclave |
| treza_enclave_action | Pause, resume, or terminate an enclave |
| treza_get_enclave_logs | Retrieve logs filtered by source type |
Attestation & Verification
| Tool | Description |
|---|---|
| treza_get_attestation | Get attestation document with PCR measurements and certificate chain |
| treza_verify_attestation | Full cryptographic verification with compliance checks (SOC2, HIPAA, FIPS) |
| treza_get_verification_status | Quick trust level check |
Platform
| Tool | Description |
|---|---|
| treza_list_providers | List available enclave providers and regions |
| treza_get_provider | Get provider details and config schema |
| treza_list_tasks | List scheduled tasks |
| treza_create_task | Create a cron-scheduled task in an enclave |
| treza_list_api_keys | List scoped API keys |
| treza_create_api_key | Create a new API key with specific permissions |
PII & Redaction
| Tool | Description |
|---|---|
| treza_redact_text | Redact PII from a text string via the redaction enclave; returns redacted text, detected entities, and mode (requires TREZA_API_KEY with redact:run) |
| treza_redact_chat_completions | OpenAI-compatible chat completion with PII redacted before forwarding upstream; returns the provider response, request id, mode, and optional rehydration map (requires TREZA_API_KEY with redact:proxy) |
| treza_pii_scan | Heuristically classify which fields in a JSON payload contain PII |
| treza_pii_workflow_check | Audit a workflow definition for where PII flows in, is stripped, or leaks |
| treza_pii_audit_query | Query the PII audit log for past workflow runs (requires TREZA_API_KEY) |
MCP Resources
The server also exposes browsable resources that give agents ambient context:
| Resource URI | Description |
|---|---|
| treza://enclaves/{walletAddress} | All enclaves for a wallet |
| treza://enclaves/{enclaveId}/details | Full enclave details |
| treza://enclaves/{enclaveId}/attestation | Attestation document |
| treza://enclaves/{enclaveId}/verification | Verification status |
Example Agent Interactions
An AI agent using the Treza MCP server can:
"Create me a Nitro Enclave in us-west-2 for my trading bot"
→ treza_create_enclave
"Is my enclave verified? What's the trust level?"
→ treza_verify_attestation
"Show me the last 20 error logs from my enclave"
→ treza_get_enclave_logs
"Pause my enclave to save costs while I'm not using it"
→ treza_enclave_action (pause)Architecture
AI Agent (Claude, Cursor, etc.)
│
▼
┌──────────────┐
│ @treza/mcp │ ← MCP Server (this package)
│ 16 tools │
│ 4 resources │
└──────┬───────┘
│ HTTP
▼
┌──────────────────┐
│ Treza Platform │ ← https://app.trezalabs.com
│ REST API │
└──────┬───────────┘
│
▼
┌──────────────────┐
│ AWS Nitro │ ← Hardware-isolated TEEs
│ Enclaves │
└──────────────────┘Development
git clone https://github.com/treza-labs/treza-sdk.git
cd treza-sdk/packages/mcp
npm install
npm run build
npm startRelated
- @treza/sdk — Core SDK
- Treza Platform — Web dashboard
- OpenAPI Spec — Full API schema
- Agent Manifest — Machine-readable capabilities
License
MIT
