Agent guides

Connect Model Studio to IPMusk

Add IPMusk as a custom MCP service in Model Studio. Your agent applications can then read your account and build proxy URLs.

Who this is for

People who build agent applications in Alibaba Cloud Model Studio (阿里云百炼).

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.
  • An Alibaba Cloud account with Model Studio enabled.
  • 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

  1. 1
    Create a custom MCP service

    In Model Studio, open MCP and create a custom MCP service (自定义 MCP 服务).

  2. 2
    Choose a remote service

    Pick the remote type with streamableHttp and set the URL to https://ipmusk.com/mcp.

  3. 3
    Add your key

    If the console offers request headers, add Authorization with the value Bearer followed by a space and your key. Confirm this field in your console; if it is missing, see the next section.

  4. 4
    Attach it

    Add the MCP service as a skill to your agent application and publish the application.

Service
Type: streamableHttp
URL: https://ipmusk.com/mcp
Header: Authorization = Bearer ipm_live_YOUR_KEY

The console changes often. If a step does not match, check Model Studio's current documentation.

No header field: bind it in code

If the console has no header field, pass the server from your application code instead. Model Studio's own examples describe a remote server like this, with type streamable-http and a headers dict. Check the current SDK reference for where the block goes.

MCP server (shape only)
{
  "ipmusk": {
    "type": "streamable-http",
    "url": "https://ipmusk.com/mcp",
    "headers": {
      "Authorization": "Bearer ipm_live_YOUR_KEY"
    }
  }
}

Check it works

Test the agent application in the console and ask: Which IPMusk account am I connected as? It should call get_account and answer with your email address.

Try these prompts

  • How much residential traffic do I have left on IPMusk?
  • Give me a rotating residential proxy URL for Germany.
  • List my Static ISP proxies and when they expire.

If it fails

  • 401 authentication_required: the header was not sent. Check the console saved it, or bind the service in code.
  • The service fails to connect: check the type is streamableHttp, not SSE, and the URL is exactly https://ipmusk.com/mcp.
  • 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.
  • 403 capability_unavailable: the customer API is switched off on this deployment. Contact support.

Remove access

  • Revoke the key in Settings → API keys (/app/settings/api-keys). It stops working at once.
  • Then remove the MCP skill from your applications and delete the custom MCP service.