Agent and MCP
The in-app agent, connecting your own agent, and automation.
The in-app agent#
The Agent panel answers about funds, prices and your portfolio, and can act: launch a fund, deposit, redeem, rebalance, change a basket or a policy, withdraw. It acts through your app wallet with the same rules as the buttons on screen. You can shape it in Agent: its identity, its knowledge, its rules, what it remembers about you, and skills you import from a skill.md link. It runs on platform credits.
It treats everything it reads — fund names, descriptions, web pages, token metadata — as data, never as instructions. Text inside a fund description cannot make it move money.
Connecting your own agent#
@dfm-fi/agent is DFM’s MCP server. Any MCP client — Claude, Cursor and others — can run it:
npx -y @dfm-fi/agent install
Authenticate it with an API key from Agent → Keys; a key can be revoked at any moment. Tools that move money also require DFM_AGENT_WRITE_ENABLED=true in the agent’s settings. Fund operations always run through your app wallet, never through a key on your machine.
| Tools | What they do |
|---|---|
list_dtfs · get_vault · get_portfolio | Read funds, a fund’s basket, weights, drift and fees, and your positions. |
discover_tokens · get_token_price | Find tokens and prices. |
launch_vault · deposit · redeem | Launch a fund, deposit USDC, redeem shares. |
rebalance_to_targets · update_vault_assets · update_vault_policy | Manage a fund you run. |
app_wallet · app_wallet_fund · app_wallet_withdraw · withdraw_asset | Read and move your app wallet’s balances. |
zap_status · swap_quote · swap | Follow a deposit or redemption; swap tokens in the app wallet. |
The agent can also read DFM’s skill file at skill.md, which teaches it the product.
Autonomous rebalancing#
- Arm. You sign the creation of a session key that can only rebalance your fund. It can never deposit, withdraw or move principal out of the basket, and it is bound by the delegated-key limits: at most 50% of a position per transaction, at least 5 seconds apart, at most 48 rebalances a day, only into the fund’s own assets. It expires after 30 days at most.
- Set up. Choose one trigger: rebalance when drift passes a threshold, or on a schedule.
- Disarm. Revokes and closes the key and pauses the automation. You can arm again at any time.