D

Dfm Agent

by DFM-Finance · io.github.DFM-Finance/dfm-agent

Enables any MCP-capable AI agent to discover and trade onchain Solana funds — launching a fund, depositing, rebalancing, redeeming, swapping tokens, managing an app wallet, and following other traders against the live DFM API. Includes onboarding tools for headless agents and read-only versus write access controlled by an API key and a write-enabled flag.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-dfm-finance-dfm-agent": {
      "command": "npx",
      "args": [
        "-y",
        "@dfm-fi/agent"
      ],
      "env": {
        "DFM_API_KEY": "<YOUR_VALUE>",
        "DFM_AGENT_WRITE_ENABLED": "false",
        "DFM_MCP_CONFIRM_REQUIRED": "<VALUE>",
        "DFM_API_URL": "https://app.dfm.finance",
        "DFM_RPC_URL": "<VALUE>",
        "HELIUS_RPC_URL": "<VALUE>",
        "SOLANA_CLUSTER": "mainnet-beta",
        "DFM_AGENT_AVATAR_PATH": "~/.config/dfm/avatar.{png,jpg,jpeg,webp,gif}",
        "DFM_AGENT_KEYPAIR_JSON": "<VALUE>",
        "DFM_AGENT_KEYPAIR_PATH": "~/.config/dfm/agent-wallet.json",
        "DFM_ALLOW_WRITE_KEY_MINT": "<VALUE>",
        "DFM_MCP_NONINTERACTIVE_WRITES": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-dfm-finance-dfm-agent": {
      "command": "npx",
      "args": [
        "-y",
        "@dfm-fi/agent"
      ],
      "env": {
        "DFM_API_KEY": "<YOUR_VALUE>",
        "DFM_AGENT_WRITE_ENABLED": "false",
        "DFM_MCP_CONFIRM_REQUIRED": "<VALUE>",
        "DFM_API_URL": "https://app.dfm.finance",
        "DFM_RPC_URL": "<VALUE>",
        "HELIUS_RPC_URL": "<VALUE>",
        "SOLANA_CLUSTER": "mainnet-beta",
        "DFM_AGENT_AVATAR_PATH": "~/.config/dfm/avatar.{png,jpg,jpeg,webp,gif}",
        "DFM_AGENT_KEYPAIR_JSON": "<VALUE>",
        "DFM_AGENT_KEYPAIR_PATH": "~/.config/dfm/agent-wallet.json",
        "DFM_ALLOW_WRITE_KEY_MINT": "<VALUE>",
        "DFM_MCP_NONINTERACTIVE_WRITES": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-dfm-finance-dfm-agent": {
      "command": "npx",
      "args": [
        "-y",
        "@dfm-fi/agent"
      ],
      "env": {
        "DFM_API_KEY": "<YOUR_VALUE>",
        "DFM_AGENT_WRITE_ENABLED": "false",
        "DFM_MCP_CONFIRM_REQUIRED": "<VALUE>",
        "DFM_API_URL": "https://app.dfm.finance",
        "DFM_RPC_URL": "<VALUE>",
        "HELIUS_RPC_URL": "<VALUE>",
        "SOLANA_CLUSTER": "mainnet-beta",
        "DFM_AGENT_AVATAR_PATH": "~/.config/dfm/avatar.{png,jpg,jpeg,webp,gif}",
        "DFM_AGENT_KEYPAIR_JSON": "<VALUE>",
        "DFM_AGENT_KEYPAIR_PATH": "~/.config/dfm/agent-wallet.json",
        "DFM_ALLOW_WRITE_KEY_MINT": "<VALUE>",
        "DFM_MCP_NONINTERACTIVE_WRITES": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-dfm-finance-dfm-agent": {
      "command": "npx",
      "args": [
        "-y",
        "@dfm-fi/agent"
      ],
      "env": {
        "DFM_API_KEY": "<YOUR_VALUE>",
        "DFM_AGENT_WRITE_ENABLED": "false",
        "DFM_MCP_CONFIRM_REQUIRED": "<VALUE>",
        "DFM_API_URL": "https://app.dfm.finance",
        "DFM_RPC_URL": "<VALUE>",
        "HELIUS_RPC_URL": "<VALUE>",
        "SOLANA_CLUSTER": "mainnet-beta",
        "DFM_AGENT_AVATAR_PATH": "~/.config/dfm/avatar.{png,jpg,jpeg,webp,gif}",
        "DFM_AGENT_KEYPAIR_JSON": "<VALUE>",
        "DFM_AGENT_KEYPAIR_PATH": "~/.config/dfm/agent-wallet.json",
        "DFM_ALLOW_WRITE_KEY_MINT": "<VALUE>",
        "DFM_MCP_NONINTERACTIVE_WRITES": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-dfm-finance-dfm-agent": {
      "command": "npx",
      "args": [
        "-y",
        "@dfm-fi/agent"
      ],
      "env": {
        "DFM_API_KEY": "<YOUR_VALUE>",
        "DFM_AGENT_WRITE_ENABLED": "false",
        "DFM_MCP_CONFIRM_REQUIRED": "<VALUE>",
        "DFM_API_URL": "https://app.dfm.finance",
        "DFM_RPC_URL": "<VALUE>",
        "HELIUS_RPC_URL": "<VALUE>",
        "SOLANA_CLUSTER": "mainnet-beta",
        "DFM_AGENT_AVATAR_PATH": "~/.config/dfm/avatar.{png,jpg,jpeg,webp,gif}",
        "DFM_AGENT_KEYPAIR_JSON": "<VALUE>",
        "DFM_AGENT_KEYPAIR_PATH": "~/.config/dfm/agent-wallet.json",
        "DFM_ALLOW_WRITE_KEY_MINT": "<VALUE>",
        "DFM_MCP_NONINTERACTIVE_WRITES": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-dfm-finance-dfm-agent": {
      "command": "npx",
      "args": [
        "-y",
        "@dfm-fi/agent"
      ],
      "env": {
        "DFM_API_KEY": "<YOUR_VALUE>",
        "DFM_AGENT_WRITE_ENABLED": "false",
        "DFM_MCP_CONFIRM_REQUIRED": "<VALUE>",
        "DFM_API_URL": "https://app.dfm.finance",
        "DFM_RPC_URL": "<VALUE>",
        "HELIUS_RPC_URL": "<VALUE>",
        "SOLANA_CLUSTER": "mainnet-beta",
        "DFM_AGENT_AVATAR_PATH": "~/.config/dfm/avatar.{png,jpg,jpeg,webp,gif}",
        "DFM_AGENT_KEYPAIR_JSON": "<VALUE>",
        "DFM_AGENT_KEYPAIR_PATH": "~/.config/dfm/agent-wallet.json",
        "DFM_ALLOW_WRITE_KEY_MINT": "<VALUE>",
        "DFM_MCP_NONINTERACTIVE_WRITES": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
DFM_API_KEY secret No Auth for an agent operating a human's account: a dfm_ key the human mints in the app (write access needed for write tools). Not needed by a headless agent.
DFM_AGENT_WRITE_ENABLED No Master switch for every write tool. Default: false
DFM_MCP_CONFIRM_REQUIRED No 1 = every write needs confirmPhrase:"<tool_name>" typed by the human (prompt-injection guard).
DFM_API_URL No API base (/api/v2 is appended). Default: https://app.dfm.finance
DFM_RPC_URL No Optional: submit through your own RPC instead of the backend.
HELIUS_RPC_URL No Optional: submit through your own RPC instead of the backend.
SOLANA_CLUSTER No Cluster name. Default: mainnet-beta
DFM_AGENT_AVATAR_PATH No Operator avatar for set_profile (≤ 2 MB). Absent → a generated default. Default: ~/.config/dfm/avatar.{png,jpg,jpeg,webp,gif}
DFM_AGENT_KEYPAIR_JSON No Identity of a headless agent as JSON (SIWS sign-in; create_identity_wallet creates it once). It only signs in and funds the app wallet (app_wallet_fund); fund operations are signed by the app wallet. Keep it 0600 and backed up.
DFM_AGENT_KEYPAIR_PATH No Identity of a headless agent (SIWS sign-in; create_identity_wallet creates it once). It only signs in and funds the app wallet (app_wallet_fund); fund operations are signed by the app wallet. Keep it 0600 and backed up. Default: ~/.config/dfm/agent-wallet.json
DFM_ALLOW_WRITE_KEY_MINT No 1 = create_api_key may mint write keys / write caps. Otherwise it mints read-only keys only.
DFM_MCP_NONINTERACTIVE_WRITES No 1 = skip the phrase even when required. Only for unattended machines.

Similar servers