npm @cloakedagent/sdkstdioMITupdated 6mo ago
Trustless spending accounts for AI agents on Solana
O que dΓ‘ para fazer com Cloaked Agent?
Cloaked
Trustless spending accounts for AI agents on Solana
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
| Component | Technology |
|---|---|
| Blockchain | Solana |
| RPC | Helius |
| Smart Contract | Anchor Framework |
| ZK Proofs | Noir + Barretenberg + Sunspot |
| Frontend | Next.js 16, React 19, TypeScript |
| Backend | Express.js (Relayer) |
| AI Integration | MCP (Model Context Protocol) |
| Token Support | USDC |
| x402 Payments | Native 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?
| Problem | Cloaked Solution |
|---|---|
| AI can drain wallet | On-chain limits can't be bypassed |
| No spending visibility | Real-time dashboard |
| Can't stop runaway agent | Instant freeze |
| Wallet identity exposed | Private mode with ZK proofs |
| Complex integrations | Native x402 support |
Cloaked - Trustless spending accounts for AI agents
InstalaΓ§Γ£o
Adicione Cloaked Agent ao seu cliente. Escolha o que vocΓͺ usa.
claude mcp add sdk -- npx -y @cloakedagent/sdkcodex mcp add sdk -- npx -y @cloakedagent/sdkamp mcp add sdk -- npx -y @cloakedagent/sdk{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@cloakedagent/sdk"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@cloakedagent/sdk"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"sdk","command":"npx","args":["-y","@cloakedagent/sdk"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@cloakedagent/sdk"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@cloakedagent/sdk"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@cloakedagent/sdk"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"sdk": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@cloakedagent/sdk"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"sdk": {
"command": {
"path": "npx",
"args": [
"-y",
"@cloakedagent/sdk"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @cloakedagent/sdkRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
PontuaΓ§Γ£o
39 / 100
Incompleta
- DocumentaΓ§Γ£o25/25
- ManutenΓ§Γ£o13/25
- ConfianΓ§a16/20
- Capacidade0/15
- InstalaΓ§Γ£o12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 179 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
HistΓ³rico de versΓ΅es
| VersΓ΅es | Publicada |
|---|---|
| 0.2.0Mais recente | 20 de fev. de 2026 |
| 0.1.3 | 12 de fev. de 2026 |