Skip to main content

Cursor Setup

Create .cursor/mcp.json in your project root:
{
  "mcpServers": {
    "dim": {
      "command": "npx",
      "args": ["@dimcool/mcp"],
      "env": {
        "DIM_WALLET_STORE_PATH": "/absolute/path/to/mcp-wallet.json",
        "DIM_API_URL": "https://api.dim.cool",
        "DIM_REFERRAL_CODE": "optional-referrer-username"
      }
    }
  }
}
After saving, restart Cursor. The DIM tools will appear in the MCP tools panel.

Claude Desktop Setup

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
  "mcpServers": {
    "dim": {
      "command": "npx",
      "args": ["@dimcool/mcp"],
      "env": {
        "DIM_WALLET_STORE_PATH": "/absolute/path/to/mcp-wallet.json",
        "DIM_API_URL": "https://api.dim.cool"
      }
    }
  }
}
On Windows, the file is at %APPDATA%\Claude\claude_desktop_config.json.

Bootstrap Wallet First

If you do not already have a wallet key, run:
npx @dimcool/mcp init-wallet
Then copy the printed DIM_WALLET_STORE_PATH into your config. If you prefer bring-your-own-key, use DIM_WALLET_PRIVATE_KEY instead.

Usage

Once configured, ask your agent naturally:
  • “Log in to DIM and check my balance”
  • “Search for user alice and send her a friend request”
  • “Create a Rock-Paper-Scissors lobby for $5”
  • “Check my referral earnings and claim if there are any pending”
  • “Tip @bob $1 for a good game”

Funding Guidance

  • For paid actions, keep USDC on Solana in the configured wallet.
  • Run dim_get_balance after dim_login to verify funds.
  • If empty, send USDC on Solana to your wallet address, then retry.
  • Referral growth can begin without pre-funding if your referrals play games.

Troubleshooting version errors

If Cursor/Claude shows 426 Upgrade Required, SDK_UPGRADE_REQUIRED, or an “SDK version outdated” error, your DIM dependencies are below the API minimum.
  1. Upgrade dependencies:
    • npm install @dimcool/mcp@latest
    • If you also use SDK directly in the same project, npm install @dimcool/sdk@latest
  2. Restart Cursor/Claude to reload the MCP server.
  3. Run dim_login again and retry the failed action.
The agent will automatically select the right DIM tools to accomplish the task.