Sponsored by Deepsite.site

Cloaked

Created By
cloakedagenta month ago
Give AI agents spending power without giving them your wallet keys. Cloaked creates on-chain spending accounts with enforced constraints that agents cannot bypass - even if jailbroken or compromised. Website: https://cloakedagent.com Documentation: https://cloakedagent.com/docs SDK: https://www.npmjs.com/package/@cloakedagent/sdk GitHub: https://github.com/CloakedAgent/cloaked
Overview

Cloaked

Trustless spending accounts for AI agents on Solana

npm License: MIT

cloakedagent.com


The Problem

AI agents need to spend money autonomously. But giving them wallet access is dangerous:

  • Jailbroken agent? Drains your wallet
  • Bug in agent code? Infinite spending loop
  • Prompt injection? Attacker controls your funds

Agent-side limits don't work - the agent has the keys and can bypass its own rules.

The Solution

On-chain enforced constraints that agents literally cannot bypass.

┌─────────────────────────────────────────────────────────────────┐
│                      CLOAKED AGENT                              │
├─────────────────────────────────────────────────────────────────┤
│  Owner: Human wallet (full control)                             │
│  Delegate: AI agent key (can spend within limits)               │
│                                                                 │
│  Constraints (enforced by Solana program):                      │
│  ├── max_per_tx: 0.1 SOL                                        │
│  ├── daily_limit: 1 SOL                                         │
│  ├── total_limit: 10 SOL                                        │
│  ├── expires_at: 2026-02-15                                     │
│  └── token_limits:                                              │
│       └── USDC: 5/tx, 50/day, 500 total                        │
│                                                                 │
│  Even if jailbroken, agent CANNOT exceed these limits.          │
└─────────────────────────────────────────────────────────────────┘

Privacy Architecture

Cloaked offers dual-mode privacy:

Standard Mode

  • Owner wallet linked to agent on-chain
  • Simple setup, lower fees

Private Mode (ZK)

  • Zero-knowledge proofs hide wallet-agent link
  • Owner proves ownership without revealing identity
  • Funded anonymously via Privacy Cash
┌─────────────────────────────────────────────────────────────────┐
│                    PRIVACY STACK                                │
├─────────────────────────────────────────────────────────────────┤
│  ZK Circuits:      Noir (Aztec)                                 │
│  Client Prover:    Barretenberg (UltraHonk via WASM)            │
│  On-chain Verify:  Sunspot (Groth16 on Solana)                  │
│  Hash Function:    Poseidon (ZK-friendly)                       │
│  Anonymous Funding: Privacy Cash (privacycash.org)              │
└─────────────────────────────────────────────────────────────────┘

Private Agent Creation:
  Wallet signs message → Master secret derived → Commitment generated
  On-chain: owner_commitment (hash), NOT wallet address
  To manage: Prove knowledge of preimage via ZK proof

Technology Stack

ComponentTechnology
BlockchainSolana
RPCHelius
Smart ContractAnchor Framework
ZK ProofsNoir + Barretenberg + Sunspot
FrontendNext.js 16, React 19, TypeScript
BackendExpress.js (Relayer)
AI IntegrationMCP (Model Context Protocol)
Token SupportUSDC
x402 PaymentsNative support

Program IDs (Devnet)

Cloaked Program: 3yMjzAeXXc5FZRUrJ1YqP4YMPhPd5bBxHQ6npNSPCUwB
ZK Verifier:     G1fDdFA16d199sf6b8zFhRK1NPZiuhuQCwWWVmGBUG3F

Key Features

1. On-Chain Constraints

  • Per-transaction limits
  • Daily spending caps
  • Lifetime limits
  • Expiration dates
  • Instant freeze

2. Privacy Options

  • Standard mode (simple)
  • Private mode (ZK proofs)
  • Anonymous funding (Privacy Cash)

3. x402 Protocol Support

  • Automatic payment handling
  • Pay-per-use APIs
  • AI service payments

4. Multi-Agent Dashboard

  • Create/manage multiple agents
  • Real-time spending visibility
  • One-click freeze

5. USDC Token Support

  • USDC with per-token spending constraints
  • Same on-chain enforcement as SOL
  • Token balance visibility in dashboard

Quick Start

For AI Agents (MCP)

{
  "mcpServers": {
    "cloaked": {
      "command": "npx",
      "args": ["cloaked-mcp"],
      "env": {
        "CLOAKED_AGENT_KEY": "your-agent-key-here"
      }
    }
  }
}

The agent can pay in SOL or USDC - pass token: "USDC" to cloak_pay.

For Developers (SDK)

npm install @cloakedagent/sdk
import { CloakedAgent } from "@cloakedagent/sdk";

// Load agent (can spend)
const agent = new CloakedAgent(agentKey, rpcUrl);

// Spend within limits
await agent.spend({
  destination: recipientPubkey,
  amount: 100_000_000  // 0.1 SOL
});

// Spend USDC (requires token enabled on agent)
await agent.spendToken({
  destination: recipientPubkey,
  mint: USDC_MINT,
  amount: 5_000_000  // 5 USDC (6 decimals)
});

Project Structure

cloaked/
├── programs/cloaked/     # Anchor program (constraints, ZK verification)
├── circuits/             # Noir ZK circuits (ownership proofs)
├── app/                  # Next.js frontend (dashboard, docs)
├── backend/              # Express relayer (fee payer, ZK ops)
└── sdk/                  # TypeScript SDK (@cloakedagent/sdk)
    └── src/mcp/          # MCP server (cloaked-mcp binary)

Documentation

Full documentation available at cloakedagent.com/docs


Why Cloaked?

ProblemCloaked Solution
AI can drain walletOn-chain limits can't be bypassed
No spending visibilityReal-time dashboard
Can't stop runaway agentInstant freeze
Wallet identity exposedPrivate mode with ZK proofs
Complex integrationsNative x402 support

Cloaked - Trustless spending accounts for AI agents

Server Config

{
  "mcpServers": {
    "cloaked": {
      "command": "npx",
      "args": [
        "@cloakedagent/sdk/mcp"
      ],
      "env": {
        "CLOAKED_AGENT_KEY": "your-agent-key-here"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.