← Home

MCP Integration

Forge exposes vault operations as MCP tools. Agents discover and call them without custom REST APIs or custodial dashboards.

Do not open /mcp in a browser

https://mcp.forgetreasury.com/mcp is a Streamable HTTP transport for MCP clients only (Cursor, Claude Desktop, etc.). A browser GET returns 405/406 or a notice — that is expected, not an outage.

Expected health response:

{
  "status": "ok",
  "name": "forge-treasury-mcp",
  "chain": "base",
  "chainId": 8453,
  "vault": "0x2C9a3922b426005B979FDD1A8F43Eb61B309193B",
  "transport": "streamable-http",
  "endpoint": "/mcp"
}

Connect in Cursor

  1. Install in Cursor (one-click deeplink) — or open Cursor → Settings → MCP and paste the config below.
  2. Add or enable forge-treasury with the remote URL.
  3. Click Refresh — you should see 9 vault tools connected.
{
  "mcpServers": {
    "forge-treasury": {
      "url": "https://mcp.forgetreasury.com/mcp"
    }
  }
}

Full integration guide: /docs

What is Forge?

Forge Treasury is non-custodial ERC-4626 vaults on Base. Agents deposit USDC, receive yield-bearing share tokens (fUSDC for Core, fmUSDC for Middle), and can earn optional $FORGE token boosts distributed weekly via Merkle claims.

Integration is via the Model Context Protocol (MCP). No lockups on principal — agents withdraw anytime. Live mainnet TVL, allocation, and recent deposits/withdrawals: /stats.

Risk profiles

Forge ships three agent strategies in product canon — Conservative, Balanced, and Aggressive — as cross-vault allocation guidance (Option A multi-vault). On-chain there are separate ERC-4626 vault buckets: Core and Middle (both live on mainnet), and Infra (planned). MCP exposes Conservative → Core and Balanced → Core + Middle (two legs, 50/50 effective split). aggressive returns STRATEGY_NOT_LIVE. Use the list_profiles tool at runtime to discover what is live without hard-coding.

ProfileStatusMainnet target allocation
conservativeLive — Core vault (five-leg book)35% Spark · 22.5% Morpho Prime · 15% Gauntlet Prime · 12.5% Steakhouse HY · 15% Aave
balancedLive — Core + Middle (50/50 effective; Infra 10% → Middle)Cross-vault: Core yield + Middle adapters (wstETH, cbETH, avUSDC, Moonwell). See docs/BALANCED_STRATEGY.md.
aggressivePlanned (Phase 2)Higher infra weight (Virtuals, Venice)

Mainnet allocation rows are governance targets, not deployed addresses. Live stats: Core vault · Middle vault. Sepolia routes 100% to a MockYieldAdapter for E2E testing — no real protocol exposure. Final weights are set on-chain via timelock governance.

APY methodology

get_current_apy and simulate_deposit return a blended target APY across the conservative profile's allocation weights — split into a base USDC component and a $FORGE boost component, with the combined display string formatted as "X% USDC + Y% FORGE (blended target)". The default base assumption is 3.70% (R1 blended target across Spark / Morpho / Aave) and the FORGE boost is 2.00% until weekly emissions personalise per address.

This is target / illustrative — not guaranteed yield. It is not insured and not advice — the response includes a disclaimer field agents should surface to end users alongside the headline number. Realised on-chain APY appears on /stats (Core and Middle vaults on mainnet).

MCP tools

Simple tier

ToolWhen to use
get_current_apyBefore deposit — show the display field and disclaimer from the structured response
simulate_depositBefore deposit — project 30/90/365-day returns at the blended target APY
depositPark idle USDC — returns calldata to sign (optional profile, defaults to conservative)
get_balanceCheck position — shares + USDC equivalent
withdrawExit position — pass shares from get_balance
get_vault_statsLive TVL, share price, and vault metadata
list_profilesEnumerate available profiles + status (live / planned) at runtime

Advanced tier

ToolWhen to use
get_forge_rewardsCheck claimable $FORGE for an address
claim_forgeClaim weekly emissions — requires Merkle proof

Deposit flow

  1. list_profiles() → confirm which profiles are live (skip if your client hard-codes conservative)
  2. get_current_apy({ agentAddress, profile: "conservative" }) → show yield + disclaimer to user
  3. simulate_deposit({ amount: "10000", profile: "conservative" }) → show 30/90/365-day projection
  4. [wallet] approve USDC → vault
  5. deposit({ amount: "10000", agentAddress, profile: "conservative" }) → sign returned tx (the response includes the resolved vault address)
  6. get_balance(agentAddress) → confirm position

profile defaults to conservative. balanced returns legs[] with approve + deposit calldata per vault. aggressive returns STRATEGY_NOT_LIVE.

On Base mainnet, the first vault deposit routes USDC into live yield adapters in one transaction. Wallets that cap gas too low may revert — use --gas-limit 4000000 on Core and 6000000 or higher on Middle when broadcasting deposit txs returned by MCP.

Withdraw flow

  1. get_balance(agentAddress) → get shares
  2. withdraw(shares, agentAddress) → sign returned tx

Note: 15% performance fee on profits above high-water mark, taken at withdraw.

Copy-paste system prompt

You manage USDC treasury for an AI agent on Base via the forge-treasury MCP server.

Rules:
- Default risk profile is "conservative" (Core vault). "balanced" returns two deposit legs (Core + Middle) on mainnet.
- Always call simulate_deposit before first deposit over $1,000
- Display APY using the "display" field from get_current_apy (e.g. "3.70% USDC + 2.00% FORGE (blended target)") and surface the disclaimer
- Never custody keys; return calldata for the agent wallet to sign
- Prefer partial withdrawals over full if gas costs matter
- Check get_forge_rewards weekly and claim if > $10 equivalent
- Call list_profiles before assuming a strategy is live

Cursor MCP configuration

Remote (recommended)

Paste into .cursor/mcp.json. The URL is for MCP clients only — do not open it in Chrome:

{
  "mcpServers": {
    "forge-treasury": {
      "url": "https://mcp.forgetreasury.com/mcp"
    }
  }
}

Local stdio

Run the MCP server locally for development:

{
  "mcpServers": {
    "forge-treasury-local": {
      "command": "node",
      "args": [
        "/path/to/FORGE/mcp-server/dist/index.js"
      ],
      "env": {
        "VAULT_ADDRESS": "0x2C9a3922b426005B979FDD1A8F43Eb61B309193B",
        "FORGE_TOKEN_ADDRESS": "0xF50469247B3F1BB86d226bB2b333ca015A2b8470",
        "REWARD_DISTRIBUTOR_ADDRESS": "0x44fE9676008154Eb461736F482873Ae7E3F87923",
        "USDC_ADDRESS": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "CHAIN_ID": "8453",
        "BASE_RPC_URL": "https://sepolia.base.org",
        "BASE_APY_BPS": "370",
        "FORGE_BOOST_APY_BPS": "200"
      }
    }
  }
}

AgentKit co-integration

Set CDP_API_KEY_NAME and CDP_API_KEY_PRIVATE_KEY to merge Coinbase AgentKit onchain tools (transfers, swaps) alongside Forge vault tools in one server. The public Hetzner endpoint does not include AgentKit — local dev only.

Error handling

ErrorAction
Insufficient USDC allowanceApprove USDC to vault first
Insufficient sharesCall get_balance for correct share amount
Vault pausedWait for unpause; check protocol status
Invalid Merkle proofRefresh proof from rewards API
PROFILE_NOT_LIVE (aggressive)Infra vault not deployed. Fall back to conservative or balanced.
PROFILE_UNKNOWNTypo in profile argument. Call list_profiles to enumerate valid IDs.
Browser shows 405/406 on /mcpExpected — use an MCP client, not a browser tab

Contract addresses

Base mainnetContracts externally reviewed · Core + Middle vaults live. Live TVL and activity →
ContractAddress
Core vault — fUSDC (ForgeVault)0x2C9a3922b426005B979FDD1A8F43Eb61B309193BBasescan ↗
Middle vault — fmUSDC (ForgeVault)0x0cAB46658aFD0F01018117475e17CAE439E36C5DBasescan ↗
ForgeToken ($FORGE)0xF50469247B3F1BB86d226bB2b333ca015A2b8470Basescan ↗
RewardDistributor0x44fE9676008154Eb461736F482873Ae7E3F87923Basescan ↗
USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Basescan ↗
Chain ID8453

Deployment details and contract addresses are listed in the contract table above.

Portfolio lookups

Read-only agent treasury snapshots live at /portfolio (mainnet only). Pass an agent EOA: /portfolio?address=0x…. KPIs combine RPC (balanceOf, convertToAssets, claimable FORGE) with subgraph activity and VaultDayData for NAV history. Estimated PnL is illustrative — not guaranteed yield or tax advice.

Example: user deposits (Core vault, mainnet)

{
  deposits(
    first: 20
    orderBy: timestamp
    orderDirection: desc
    where: {
      vault: "0x2c9a3922b426005b979fdd1a8f43eb61b309193b"
      owner: "0xYOUR_AGENT_EOA"
    }
  ) {
    assets
    shares
    timestamp
    transactionHash
  }
}

Example: user activity across Core + Middle

{
  coreDeposits: deposits(
    where: {
      vault: "0x2c9a3922b426005b979fdd1a8f43eb61b309193b"
      owner: "0xYOUR_AGENT_EOA"
    }
    orderBy: timestamp
    orderDirection: asc
    first: 100
  ) {
    assets
    shares
    timestamp
  }
  middleDeposits: deposits(
    where: {
      vault: "0x0cab46658afd0f01018117475e17cae439e36c5d"
      owner: "0xYOUR_AGENT_EOA"
    }
    orderBy: timestamp
    orderDirection: asc
    first: 100
  ) {
    assets
    shares
    timestamp
  }
}

Example: vault day data for NAV replay

{
  vaultDayDatas(
    where: { vault: "0x2c9a3922b426005b979fdd1a8f43eb61b309193b" }
    orderBy: date
    orderDirection: asc
    first: 90
  ) {
    date
    totalAssets
    totalSupply
    sharePrice
    depositVolume
    withdrawVolume
  }
}

Optional accountVaultDayDatas and transfers entities activate when the subgraph schema is extended — the portfolio page degrades to deposit/withdraw replay until then.

Support