Agent guides

Connect Gemini CLI to IPMusk

Add IPMusk to Gemini CLI's settings.json. Gemini can then read your account and build proxy URLs from the terminal.

Who this is for

Developers who use Google's Gemini CLI and want it to fetch proxy URLs and account details.

What you need

  • An IPMusk account with a verified email address.
  • An IPMusk API key. Create it in Settings → API keys (/app/settings/api-keys). For typical use tick read and connect. Add support only if the assistant should open tickets, and order only if it should create orders that end in a payment link.
  • The key in an environment variable named IPMUSK_API_KEY, for example export IPMUSK_API_KEY="ipm_live_YOUR_KEY" in your shell profile. The examples below read it from there.
  • Gemini CLI installed.

Set it up

Add the server to ~/.gemini/settings.json, or to .gemini/settings.json in a project.

  • Or run: gemini mcp add --transport http --header "Authorization: Bearer $IPMUSK_API_KEY" ipmusk https://ipmusk.com/mcp
  • Use httpUrl, not url. url is for the older SSE transport.
~/.gemini/settings.json
{
  "mcpServers": {
    "ipmusk": {
      "httpUrl": "https://ipmusk.com/mcp",
      "headers": {
        "Authorization": "Bearer $IPMUSK_API_KEY"
      },
      "timeout": 30000
    }
  }
}

Sign in with OAuth instead

Replace headers with an oauth block, start Gemini CLI and run /mcp auth ipmusk. Sign in to IPMusk in your browser.

~/.gemini/settings.json
{
  "mcpServers": {
    "ipmusk": {
      "httpUrl": "https://ipmusk.com/mcp",
      "oauth": { "enabled": true }
    }
  }
}

Check it works

Run /mcp inside Gemini CLI. ipmusk should be listed as connected with its tools.

Ask the assistant: Which IPMusk account am I connected as? It should call get_account and answer with your email address.

Try these prompts

  • How much IPMusk residential traffic do I have left?
  • Get a sticky US proxy URL for 10 minutes and use it in this script.
  • List my IPMusk Static ISP proxies and when they expire.

If it fails

  • 401 authentication_required: the key is missing, wrong, revoked or expired. Check that IPMUSK_API_KEY is set where the client starts. echo ${#IPMUSK_API_KEY} prints its length without showing the key.
  • The server is disconnected: check the JSON is valid and that you used httpUrl.
  • 403 forbidden on one tool: the key lacks that tool's scope, or your email is not verified. Scopes cannot be added to a key, so create a new key with the scope and swap it in.
  • 429 rate_limited: too many calls in one minute (read 60, connect 20, support 30, order 10). Wait a minute and try again.

Remove access

  • Revoke the key in Settings → API keys (/app/settings/api-keys). It stops working at once.
  • Then delete the ipmusk entry from settings.json, or run gemini mcp remove ipmusk.
  • If you signed in with OAuth, disconnect Gemini CLI in Settings → API keys → Connected AI apps.