Sign onchain with 1Claw AgentKit on Base
Run the 1Claw AgentKit MCP server so an autonomous agent signs Base transactions with no keys on disk.
@1claw/agentkit is a hardened MCP server built on Coinbase AgentKit. Your agent gets the full onchain toolkit for Base, but signing happens in a TEE via the Intents API and secrets are resolved from your vault at boot, never touching disk.
This path is for autonomous agents that run without a human approving each transaction. Guardrails like per-tx caps, daily limits, and address allowlists are enforced server-side.
- 1
Path A: MCP server setup. Clone the repo and run the setup wizard. It asks for your human 1ck_ key and provisions a vault, an agent with Intents API and Base guardrails, a Base signing key, and a read policy on agentkit/*.
bashgit clone https://github.com/1clawAI/1claw-agentkit.git cd 1claw-agentkit npm install npm run setup - 2
The wizard prints an MCP config JSON. Paste the JSON the wizard prints into your AI client config. It pairs 1claw-agentkit with the 1claw MCP server under the agent key the wizard provisioned.
text# The wizard outputs something like: # { # "mcpServers": { # "1claw-agentkit": { ... }, # "1claw": { ... } # } # } # Paste that output into your client config file. - 3
Set the chain ID for Base Sepolia (testnet) before moving to mainnet.
bashexport ONECLAW_CHAIN_ID=84532 - 4
Path B: Library API. Resolve secrets and build a Base wallet provider, then send a TEE-signed transaction. Use the agent credentials from the
npm run setupwizard. Value is in ETH (0.001 ETH ≈ a few dollars).typescriptimport { createBaseMainnetProvider } from "@1claw/agentkit"; const wallet = createBaseMainnetProvider({ agentApiKey: process.env.ONECLAW_AGENT_API_KEY!, agentId: process.env.ONECLAW_AGENT_ID!, }); const result = await wallet.sendTransaction({ to: "0xRecipient", value: "0.001", }); console.log(`TX: ${result.txHash} (${result.status})`); - 5
Path C: Full-stack starter (Scaffold-Agent). To bootstrap a full-stack onchain dApp instead, use Scaffold-Agent, which wires HSM-backed secrets and Intents signing into a Scaffold-ETH 2 scaffold.
text# See scaffoldagent.xyz and github.com/1clawAI/scaffoldagent_xyz
Set ONECLAW_CHAIN_ID to 84532 for Base Sepolia (testnet) or 8453 for Base mainnet. Always test on Sepolia first.
Your agent now signs and broadcasts transactions on Base through the Intents API, with keys held in the vault TEE and guardrails capping what a prompt injection could ever do.
What this gives you, and what it does not. This is the point where an agent stops reading and starts moving value, and the failure mode changes shape.
- Onchain actions are irreversible. Every other mistake in this course can be rotated, revoked or re-issued; a broadcast transaction cannot.
- Testnets are the whole point of the setup step. An agent that has never been exercised on a testnet is being debugged with real funds.
- Guardrails are the safety net, not the framework. Recipient allowlists, per-transaction caps and daily limits live on the agent and apply regardless of which framework calls the API.
Before an onchain agent touches mainnet, write down what it should never be able to do and check that a guardrail expresses each item. If a rule cannot express it, it is not a constraint.
Decide
An onchain agent has worked on a testnet for two weeks. The team wants to move it to mainnet on Friday afternoon, arguing that the code is identical and only the RPC endpoint changes.
What is the substantive objection?
Check your understanding
3 questionsWhere are the signing keys stored with @1claw/agentkit?
When should you pick @1claw/agentkit over mcp.base.org?
What starter kit bootstraps a full onchain dApp with 1Claw?