Agent guides

Connect Kimi Code to IPMusk

Add IPMusk to Kimi Code's mcp.json. Kimi can then read your account and build proxy URLs while it codes.

Who this is for

Developers who use Kimi Code CLI from Moonshot AI (月之暗面) and want it to fetch proxy URLs and account details.

Still on the older, archived kimi-cli? See the section on it below.

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.
  • This client takes the key itself rather than reading the IPMUSK_API_KEY environment variable the other guides use. Keep the original in a password manager.
  • Kimi Code CLI installed.
  • IPMusk applies the same source-country rules to the API and MCP as to the website, so connect from a region where ipmusk.com is available.

Set it up

Add the server to ~/.kimi-code/mcp.json. Inside a session, /mcp-config opens the same settings.

  • Replace ipm_live_YOUR_KEY with your key. The file lives in your home folder, not in your project. Never commit it.
  • Restart Kimi Code after editing the file.
~/.kimi-code/mcp.json
{
  "mcpServers": {
    "ipmusk": {
      "url": "https://ipmusk.com/mcp",
      "headers": {
        "Authorization": "Bearer ipm_live_YOUR_KEY"
      }
    }
  }
}

Older kimi-cli

The archived kimi-cli used commands instead of a file. Write the header as KEY: VALUE, with a space after the colon.

To sign in with OAuth instead of a key, add the server with --auth oauth and no header, then run kimi mcp auth ipmusk.

kimi-cli
# With an API key
kimi mcp add --transport http ipmusk https://ipmusk.com/mcp --header "Authorization: Bearer ipm_live_YOUR_KEY"

# Or sign in with OAuth
kimi mcp add --transport http --auth oauth ipmusk https://ipmusk.com/mcp
kimi mcp auth ipmusk

# Check the connection
kimi mcp test ipmusk

Check it works

Restart Kimi Code and open /mcp-config. ipmusk should be listed. If your version shows servers somewhere else, check Kimi Code's current documentation.

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 in the file is wrong, revoked or expired. Paste it again without extra spaces.
  • The server does not load: check the JSON is valid and the file is ~/.kimi-code/mcp.json.
  • 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.
  • On the older kimi-cli: run kimi mcp test ipmusk to see the exact error.

Remove access

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