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.
- Configure: paste the URL into your MCP client JSON (see below) — never bookmark it as a webpage.
- Verify server: https://mcp.forgetreasury.com/health (or https://mcp.forgetreasury.com/) — safe GET endpoints that return JSON.
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
- Open Cursor → Settings → MCP (or edit
.cursor/mcp.jsonin your project). - Add or enable
forge-treasury-remotewith the config below. - 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
| Tool | When to use |
|---|---|
get_current_apy | Before deposit — show "X% USDC + Y% FORGE" style APY |
simulate_deposit | Before deposit — project 30/90/365-day returns |
deposit | Park idle USDC — returns calldata to sign |
get_balance | Check position — shares + USDC equivalent |
withdraw | Exit position — pass shares from get_balance |
get_vault_stats | Live TVL, share price, and vault metadata |
Advanced tier
| Tool | When to use |
|---|---|
get_forge_rewards | Check claimable $FORGE for an address |
claim_forge | Claim weekly emissions — requires Merkle proof |
Deposit flow
get_current_apy(agentAddress)→ show yield to usersimulate_deposit("10000")→ show projections- [wallet] approve USDC → vault
deposit("10000", agentAddress)→ sign returned txget_balance(agentAddress)→ confirm position
Withdraw flow
get_balance(agentAddress)→ get shareswithdraw(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
| Error | Action |
|---|---|
| Insufficient USDC allowance | Approve USDC to vault first |
| Insufficient shares | Call get_balance for correct share amount |
| Vault paused | Wait for unpause; check protocol status |
| Invalid Merkle proof | Refresh proof from rewards API |
| Browser shows 405/406 on /mcp | Expected — use an MCP client, not a browser tab |
Contract addresses
| Contract | Address |
|---|---|
| ForgeVault (ERC-4626) | 0x55667a441fa5df209167b9738fb04f78baa94c21Basescan ↗ |
| ForgeToken ($FORGE) | 0x0E6c751592Ea138B5aae7B76531107Cae41b5a6EBasescan ↗ |
| RewardDistributor | 0x634D66c046F8212C3E6f40474ae4aE7C616a70a4Basescan ↗ |
| USDC | 0x036CbD53842c5426634e7929541eC2318f3dCF7eBasescan ↗ |
| Chain ID | 84532 |
Deployment details and contract addresses are listed in the contract table above.
Support
- MCP server status: https://mcp.forgetreasury.com/health
- MCP endpoint (client config only):
https://mcp.forgetreasury.com/mcp