Skip to Content
ModelWorks logoModelWorks
AdaptorsOpenAI SSE Adaptor

Connect Cline

Route Cline to any ModelWorks circuit as a custom model provider via the OpenAI SSE adaptor.

Connect Cline to ModelWorks

Cline is an autonomous coding agent for VS Code with 72K+ GitHub stars. This guide shows you how to connect Cline to any circuit on ModelWorks.

Prerequisites

Step 1: Get your adaptor URL

Every circuit with an OpenAI SSE adaptor exposes a URL like:

Text
https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxxxxxxxxxx/query

Step 2: Configure Cline

Open the Cline panel in VS Code → click the settings icon → API Provider → select OpenAI Compatible:

  • Base URL: https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxx/query
  • API Key: mw_YOUR_API_KEY
  • Model ID: glm-53-abliterated

Step 3: Run your first circuit

Open a file in VS Code and ask Cline to do something. The circuit runs on ModelWorks and Cline receives the response as if it were a standard OpenAI model.

Connecting via MCP

Cline also supports MCP. Add the ModelWorks xMCP server to Cline's MCP settings (.cline/mcp_settings.json):

JSON
{
  "mcpServers": {
    "modelworks": {
      "url": "https://modelworks.ai/.well-known/x.mcp",
      "headers": {
        "Authorization": "Bearer mw_YOUR_API_KEY"
      }
    }
  }
}

Troubleshooting

IssueFix
401 UnauthorizedYour API key expired. Generate a new one from Settings.
402 Payment RequiredFund your wallet at modelworks.ai/settings/wallet.
Empty responseVerify the circuit version is RUNNING (not STAGING).
On this page

On this page

© 2026 ModelWorks. All rights reserved.