← Learn
Liveproduct· 7 min read

How to build an automated USDC treasury for AI agents on Base

Step-by-step MCP flow for programmatic stablecoin yield: vault discovery, approve/deposit calldata, Core vault routing, gas notes, and agent FAQ.

Last updated: May 25, 2026 · Published 2026-05-25

Forge Treasury smart contracts are unaudited. Yield is variable and not guaranteed. Read Risks & Disclosures before depositing USDC or integrating MCP tools.

An automated USDC treasury on Base lets an AI agent park idle stablecoins in yield venues without a human clicking through dashboards. Forge Treasury targets that workflow: the agent calls Forge MCP tools, receives unsigned transaction calldata, and signs from its own EOA. This guide walks through the full deposit path for the Core vault on Base mainnet — the Conservative strategy MVP — with gas notes, approval semantics, and an FAQ. Read Risks & Disclosures first: contracts are unaudited and TVL is early-stage smoke testing (~$10 as of May 2026).

Forge MCP returns calldata only — never private keys. Production at `mcp.forgetreasury.com` exposes eight Forge vault tools with no CDP credentials on the server (Option A custody). Your agent EOA must hold USDC and ETH for gas on Base (chain ID `8453`).

What you are building

The end state is a programmatic loop: detect idle USDC → simulate economics → approve the vault → deposit → monitor share price on Stats. Under the hood, USDC moves into the Core ForgeVault (`0x2C9a3922b426005B979FDD1A8F43Eb61B309193B`), which routes through Spark Savings, Morpho, and Aave adapters. Yield is variable — MCP returns illustrative target blends, not guaranteed APY. FORGE emissions are a separate Merkle-claim stream; see FORGE emissions vs vault yield.

ConstantValueNotes
Chain ID8453Base mainnet — not Base Sepolia (84532)
USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Circle native USDC on Base
Core ForgeVault0x2C9a3922b426005B979FDD1A8F43Eb61B309193BConservative strategy destination
Share tokenfUSDC (ERC-4626)NAV accrues via adapter harvests
Prod MCPhttps://mcp.forgetreasury.com/mcpEight Forge vault tools
MCP healthhttps://mcp.forgetreasury.com/healthJSON uptime probe
Base mainnet constants for automated treasury agents

Step 1 — Connect MCP and discover vault state

Add Forge MCP to your agent runtime (Cursor deeplink on Docs). Before any deposit, call `get_vault_stats` and `list_profiles` to confirm the Conservative profile maps to Core and that adapter counts match expectations. After P2-C0 Core expansion (~May 27, 2026), `adapterCount` may increase — agents should not cache stale metadata. The Model Context Protocol tool schemas describe parameters so the LLM does not hallucinate HTTP routes.

  1. Point MCP config at `https://mcp.forgetreasury.com/mcp` (production integrator profile).
  2. Verify health at `https://mcp.forgetreasury.com/health`.
  3. Call `list_profiles` — MVP: `conservative` → Core vault only; `balanced` returns not-live until Middle timelock.
  4. Call `get_vault_stats` for share price, TVL, and adapter metadata.
  5. Confirm agent EOA USDC balance on Base via your wallet MCP or Basescan.

Step 2 — Simulate before you broadcast

Use `simulate_deposit` with the intended USDC amount and `profile: "conservative"`. The response includes target allocation weights, illustrative APY fields labelled target/illustrative, and warnings when strategies are not live. This is planning UX — not a promise of realised yield. Underlying Spark, Morpho, and Aave rates float independently; Forge adapters add another unaudited layer. Never combine USDC yield and FORGE boost into one headline number.

APY strings from MCP are blended targets for agent prompts. Realised vault yield accrues in share price (NAV). FORGE emissions require a separate `claim_forge` path. See Tokenomics and Risks & Disclosures.

Step 3 — ERC-20 approve calldata

ERC-4626 deposits require the vault to pull USDC via `transferFrom`. The agent must first broadcast an `approve` on USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`) with `spender` set to the Core vault address and `amount` at least equal to the deposit (many agents use max uint256 for gas efficiency on repeat deposits — document this policy in your agent prompt). Forge MCP `deposit` tool documentation assumes approval is handled separately; the tool returns `ForgeVault.deposit(assets, receiver)` calldata only.

  • Target contract: USDC on Base.
  • Spender: Core ForgeVault `0x2C9a3922b426005B979FDD1A8F43Eb61B309193B`.
  • Signer: Agent EOA — not the Forge deployer (`0x2aAbb8…`) and not a CDP server wallet.
  • Gas: Typical approve ~50k–65k gas on Base; monitor Base gas tracker.

Step 4 — Deposit calldata from MCP

Call the MCP `deposit` tool with `amount` (human-readable USDC string, e.g. `"10"`), `agentAddress` (receiver of fUSDC shares), and `profile: "conservative"`. The server returns encoded calldata, contract address, chain ID, and human-readable notes. Sign and broadcast from the agent EOA. Shares mint to `agentAddress`; underlying USDC routes into adapter positions per vault governance weights. Withdraw later via the `withdraw` tool — instant ERC-4626 redeem subject to adapter liquidity.

OrderToolPurpose
1list_profilesConfirm Conservative → Core mapping
2simulate_depositIllustrative economics before tx
3Wallet: approve USDCAllow vault pull (not returned by MCP)
4depositGet ForgeVault.deposit calldata
5get_balanceVerify fUSDC share balance post-tx
6get_forge_rewardsOptional — separate emission eligibility
MCP deposit workflow — tool sequence

Gas planning on Base

Base L2 gas is cheap relative to Ethereum L1, but multi-adapter vault deposits cost more than a simple ERC-20 transfer. Post P2-C0 Core expansion, first deposits that touch multiple adapters may need ~4M gas limit — always simulate in your wallet or via eth_call before broadcasting. Keep a small ETH buffer on the agent EOA for approve + deposit + future withdraw. Failed deposits from out-of-gas do not move USDC but waste fees. For smoke tests, $1–10 USDC is appropriate given current ~$10 protocol TVL — not a minimum enforced on-chain, but proportional to experimental risk.

Monitoring and withdrawal

  • Track share price and allocation on Stats — subgraph may lag Basescan by minutes.
  • Use `get_balance` with the agent address for MCP-native share reads.
  • Withdraw via `withdraw` calldata when policy triggers fire (e.g. USDC balance below operating buffer).
  • Claim FORGE separately via `claim_forge` when Merkle proofs are available — not auto-compounded.

Conservative vs Balanced — what agents can automate today

Conservative is fully automatable on Core today. Balanced requires Core + Middle vault deposits — Middle adapters are timelock pending as of May 2026; see Balanced strategy. Agents should treat `profile: "balanced"` MCP errors as gates, not bugs. Phase 2 will return multi-tx calldata bundles; until then, manual split math applies.

Security checklist

  • Read Risks & Disclosures — unaudited Forge contracts, no insurance, variable yield.
  • Never deposit from Forge deployer or CDP experimental wallets.
  • Validate chain ID 8453 and USDC address on every run — wrong-chain assets are lost.
  • Treat MCP as convenience; vaults remain callable directly via Basescan write contract.
  • Log tool response `asOf` timestamps; adapter addresses change after timelock execution.

Frequently asked questions

How much USDC should my agent deposit first?

Start with a smoke amount ($1–10 USDC) to validate approve → deposit → balance reads. Protocol TVL is ~$10 as of May 2026 — this is experimental infrastructure, not production treasury scale. Scale only after your agent policy and monitoring are proven.

Does Forge hold my USDC during automation?

No. MCP never receives USDC on the production server. Calldata is returned; your agent EOA signs. USDC moves on-chain into the Core vault only after your signed deposit transaction confirms.

Can I automate deposits without MCP?

Yes — interact directly with the ForgeVault ABI via viem, ethers, or Basescan. MCP standardises discovery and calldata encoding for LLM agents. See MCP-native treasury for why tool schemas matter.

What APY should my agent report to users?

Report realised share-price change for USDC yield and FORGE claim eligibility separately. MCP `get_current_apy` returns target/illustrative blends for planning — not guaranteed returns. Combined APY headlines are misleading and R4-risky.

Why did my Balanced deposit fail?

Middle vault adapters may not be live until timelock execution (~May 27, 2026). MVP automation should use `profile: "conservative"` only. Check Balanced strategy and `/stats` adapter counts before enabling multi-vault policies.

What is Forge's audit status?

Forge vault and adapter contracts are unaudited as of May 2026 — no completed external security audit. Underlying Spark, Morpho, and Aave have their own security history — that does not cover Forge wrappers. Full disclosure on Risks & Disclosures.

This guide is integration documentation, not investment advice. Automated USDC treasury agents inherit smart-contract, oracle, and liquidity risks from Forge and underlying protocols. Yield is variable; FORGE may be illiquid.

Share this article

Draft copy for social posts — review before publishing. URL: https://forgetreasury.com/learn/automated-usdc-treasury-agents-base

Open Graph / preview card

Automated USDC treasury for AI agents on Base MCP step-by-step: simulate, approve, deposit into Core vault. Calldata-only, unaudited MVP. Read risks first. https://forgetreasury.com/learn/automated-usdc-treasury-agents-base

Twitter / X

Build an automated USDC treasury on Base — MCP simulate → approve → deposit calldata. Agent EOA signs locally. Unaudited MVP: https://forgetreasury.com/learn/automated-usdc-treasury-agents-base

LinkedIn

AI agents need programmatic stablecoin yield without surrendering keys. Forge MCP returns approve/deposit calldata for the Core vault on Base — non-custodial, eight prod tools. Contracts unaudited; yield variable. Full walkthrough: https://forgetreasury.com/learn/automated-usdc-treasury-agents-base