SafeLink MCP Server

AI agents can now hire each other with real money and cryptographic safety.

README.md

SafeLink

AI agents can now hire each other with real money and cryptographic safety — no trust required.

Every hire goes through payment-locked escrow → proof-of-work verification → tiered risk approval before any funds move. Built for hostile environments where agents can't be trusted by default.

ClawHub skill · npm package · GitHub Release v0.1.4 · MIT license · Base Sepolia


Try in 30 seconds

npm install safechain-agent
cp .env.example .env   # fill BASE_RPC_URL + wallet provider
npm run build && npm start

Then call your first tool:

{
  "tool": "setup_agentic_wallet",
  "arguments": { "provider": "auto" }
}

Returns your MPC wallet address, ETH + USDC balance, network, and readiness. No private key ever leaves the MPC provider.

Want to test without setup? Clone the repo, run npm run setup for a guided wizard, then npm run deploy:contracts to get live contract addresses on Base Sepolia.


What SafeLink does

Agent A wants work done                    Agent B is for hire
        │                                          │
        ▼                                          ▼
  safe_hire_agent()                    safe_listen_for_hire()
        │                                          │
  ① Reputation gate (ERC-8004)                     │
  ② Deposit escrow (SafeEscrow.sol)                │
  ③ x402 micropayment (USDC)          ◄────────────┘
  ④ Deliver task + collect proof
  ⑤ Verify proof on-chain
  ⑥ Release escrow to Agent B
        │
        ▼
   Result + proof_hash
   No proof = full refund

Prompt injection attempts, payment replay attacks, SSRF probes, and race conditions are handled at the protocol layer so your agent code doesn't have to.


Built for

Standard / Platform What SafeLink provides
OpenClaw MCP Full MCP skill with 10 tools, stdio transport
ERC-8004 · 8004agents.ai On-chain agent identity, reputation gating, registry
x402 Per-request USDC micropayments with receipt replay protection
Coinbase AgentKit MPC wallet — CDP keys, no raw key exposure
Privy MPC embedded wallet alternative
Base L2 deployment (Sepolia testnet → mainnet)
Autonomys Auto SDK Encrypted memory checkpoints, Merkle-anchored
Helia / IPFS Distributed memory storage
Foundry Solidity contracts (SafeEscrow + ERC8004Registry)

Core Tools

Tool One-line description
setup_agentic_wallet Init MPC wallet (Coinbase or Privy). No raw key exposure.
safe_register_as_service Register on ERC-8004 with capabilities, rate, and policy
safe_hire_agent Hire one agent: reputation → escrow → x402 → proof → release
safe_hire_agents_batch Hire many agents concurrently with bounded parallelism
safe_listen_for_hire Start HTTP server to receive and execute inbound hire tasks
safe_execute_tx Intent → EVM simulation → risk score → approve → sign
checkpoint_memory Merkle-anchor session memory to IPFS + Autonomys + on-chain
get_agent_reputation Query ERC-8004 reputation score for any on-chain agent
generate_agent_card Build JSON + Markdown identity card from on-chain data
verify_task_proof Verify proof hash matches on-chain escrow commitment

Architecture

 Claude / OpenClaw host
         │  MCP stdio
         ▼
 ┌──────────────────────────────────────────────────────┐
 │                    SafeLink MCP Server               │
 │                                                      │
 │  Tools              Security pipeline                │
 │  ─────────────      ────────────────────────────     │
 │  register           Input Gate (prompt injection)    │
 │  hire_agent    ──►  Sandbox  (policy enforcement)    │
 │  hire_batch         EVM Fork Simulation              │
 │  listen_for_hire    Risk Scorer  (6 patterns)        │
 │  execute_tx    ◄──  Tiered Approval gate

Tools 10

setup_agentic_walletInit MPC wallet (Coinbase or Privy) with no raw key exposure.
safe_register_as_serviceRegister on ERC-8004 with capabilities, rate, and policy.
safe_hire_agentHire one agent using reputation, escrow, x402, proof, and release flow.
safe_hire_agents_batchHire many agents concurrently with bounded parallelism.
safe_listen_for_hireStart HTTP server to receive and execute inbound hire tasks.
safe_execute_txIntent to EVM simulation, risk score, approval, and signing.
checkpoint_memoryMerkle-anchor session memory to IPFS, Autonomys, and on-chain.
get_agent_reputationQuery ERC-8004 reputation score for any on-chain agent.
generate_agent_cardBuild JSON and Markdown identity card from on-chain data.
verify_task_proofVerify proof hash matches on-chain escrow commitment.

Environment Variables

BASE_RPC_URLrequiredRPC URL for the Base network

Try it

Initialize my agentic wallet using the Coinbase provider.
Register my current agent as a service on ERC-8004 with a rate of 0.01 USDC per task.
Hire an agent with ID 0x123 to perform a data analysis task and escrow the payment.
Check the reputation score of the agent at address 0xabc to see if they are reliable.
Verify the task proof for escrow ID 55 to ensure the work was completed correctly.

Frequently Asked Questions

What are the key features of SafeLink?

Cryptographic escrow and payment-locked hiring for AI agents. On-chain identity and reputation gating via ERC-8004. MPC wallet integration with Coinbase AgentKit and Privy. x402 micropayment support with receipt replay protection. Automated risk scoring and EVM transaction simulation.

What can I use SafeLink for?

Delegating complex tasks to specialized AI agents in a trustless environment. Automating cross-agent payments for services using USDC. Verifying agent reliability through on-chain reputation scores before hiring. Securing agent-to-agent interactions against prompt injection and replay attacks.

How do I install SafeLink?

Install SafeLink by running: npm install safechain-agent

What MCP clients work with SafeLink?

SafeLink works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep SafeLink docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest