← 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-sepolia",
  "chainId": 84532,
  "vault": "0x5566…4c21",
  "transport": "streamable-http",
  "endpoint": "/mcp"
}

Connect in Cursor

  1. Open Cursor → Settings → MCP (or edit .cursor/mcp.json in your project).
  2. Add or enable forge-treasury-remote with the config below.
  3. Click Refresh — you should see 8 vault tools connected.
{
  "mcpServers": {
    "forge-treasury-remote": {
      "url": "https://mcp.forgetreasury.com/mcp"
    }
  }
}

Full integration guide: /docs

What is Forge?

Forge Treasury is a non-custodial ERC-4626 vault on Base. Agents deposit USDC, receive yield-bearing fUSDC shares, 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.

MCP tools

Simple tier

ToolWhen to use
get_current_apyBefore deposit — show "X% USDC + Y% FORGE" style APY
simulate_depositBefore deposit — project 30/90/365-day returns
depositPark idle USDC — returns calldata to sign
get_balanceCheck position — shares + USDC equivalent
withdrawExit position — pass shares from get_balance
get_vault_statsLive TVL, share price, and vault metadata

Advanced tier

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

Deposit flow

  1. get_current_apy(agentAddress) → show yield to user
  2. simulate_deposit("10000") → show projections
  3. [wallet] approve USDC → vault
  4. deposit("10000", agentAddress) → sign returned tx
  5. get_balance(agentAddress) → confirm position

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:
- Always call simulate_deposit before first deposit over $1,000
- Display APY as "X% USDC + Y% FORGE" from get_current_apy
- 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

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-remote": {
      "url": "https://mcp.forgetreasury.com/mcp"
    }
  }
}

Local stdio

Run the MCP server locally for development:

{
  "mcpServers": {
    "forge-treasury": {
      "command": "node",
      "args": [
        "/path/to/FORGE/mcp-server/dist/index.js"
      ],
      "env": {
        "VAULT_ADDRESS": "0x55667a441fa5df209167b9738fb04f78baa94c21",
        "FORGE_TOKEN_ADDRESS": "0x0E6c751592Ea138B5aae7B76531107Cae41b5a6E",
        "REWARD_DISTRIBUTOR_ADDRESS": "0x634D66c046F8212C3E6f40474ae4aE7C616a70a4",
        "USDC_ADDRESS": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
        "CHAIN_ID": "84532",
        "BASE_RPC_URL": "https://sepolia.base.org",
        "BASE_APY_BPS": "450",
        "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
Browser shows 405/406 on /mcpExpected — use an MCP client, not a browser tab

Contract addresses

Base Sepolia testnetContracts unaudited · MockYieldAdapter active (no production yield). Live TVL, allocation, and recent activity →
ContractAddress
ForgeVault (ERC-4626)0x55667a441fa5df209167b9738fb04f78baa94c21Basescan ↗
ForgeToken ($FORGE)0x0E6c751592Ea138B5aae7B76531107Cae41b5a6EBasescan ↗
RewardDistributor0x634D66c046F8212C3E6f40474ae4aE7C616a70a4Basescan ↗
USDC0x036CbD53842c5426634e7929541eC2318f3dCF7eBasescan ↗
Chain ID84532

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

Support