New: watch your coding agents work, step by step, on a live board. Try the demo, no account

Add a remote MCP server to Cline

Cline keeps MCP servers in cline_mcp_settings.json under mcpServers. A remote server takes a type, a url and optional headers, and the type matters: leave it out and Cline uses legacy SSE.

By Jake Marsh. Checked against Cline's own docs on 2026-10-31; each section links its source.

The Cline config

For a server named my-server at https://example.com/mcp that takes an Authorization header. Where it goes: cline_mcp_settings.json (in the Cline panel, MCP Servers > Configure > Configure MCP Servers; Cline CLI: ~/.cline/data/settings/cline_mcp_settings.json).

{
  "mcpServers": {
    "my-server": {
      "type": "streamableHttp",
      "url": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Swap in your own server below and the Cline version updates first, with every other client after it.

Where Cline reads it

  • cline_mcp_settings.json (in the extension: MCP Servers icon > Configure > Configure MCP Servers)your user, for the editor extension
  • ~/.cline/data/settings/cline_mcp_settings.json (override with CLINE_MCP_SETTINGS_PATH)your user, for Cline CLI

Keys, headers and sign-in

Static keys go in headers. Cline's docs recommend keeping secrets in environment variables and show an env block for local stdio servers; they don't document variable expansion in a remote server's headers, so the value you write is the value sent.

For OAuth, Cline CLI's MCP wizard (cline mcp) has an Authorize OAuth action that runs, or reruns, browser authorization for a remote server.

Source: docs.cline.bot/mcp/mcp-overview

Check that it connected

In MCP settings you can turn servers on and off and restart one that stops responding. Cline's own check after setup: confirm the tools appear, then test one tool call. In the CLI, cline config mcp lists servers (add --json for JSON).

Source: docs.cline.bot/mcp/mcp-overview

Cline gotchas

  • Set "type": "streamableHttp" explicitly. Omitting type falls back to the legacy sse transport for backward compatibility, and a Streamable HTTP server won't connect that way.

    Source: docs.cline.bot/mcp/mcp-overview

  • Keep autoApprove to tools that are safe to run unreviewed, and review the rest before approving.

    Source: docs.cline.bot/mcp/mcp-overview

Still not connecting? Cline MCP server not connecting walks through the fixes in order.

Generate the config for your server

Runs in your browser. Nothing you type is sent anywhere. Still, don't paste real keys on shared screens.

The header value is never put in the link.

Cline

cline_mcp_settings.json (in the Cline panel, MCP Servers > Configure > Configure MCP Servers; Cline CLI: ~/.cline/data/settings/cline_mcp_settings.json)

{
  "mcpServers": {
    "my-server": {
      "type": "streamableHttp",
      "url": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Source: docs.cline.bot/mcp/mcp-overview

Claude Code

Run in a terminal (--scope user makes it available in every project)

claude mcp add --transport http --scope user my-server "https://example.com/mcp" --header "Authorization: Bearer YOUR_KEY"

Source: code.claude.com/docs/en/mcp

Cursor

~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project)

{
  "mcpServers": {
    "my-server": {
      "url": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Source: cursor.com/docs/context/mcp

Codex CLI

~/.codex/config.toml

[mcp_servers.my_server]
url = "https://example.com/mcp"
http_headers = { "Authorization" = "Bearer YOUR_KEY" }

Source: developers.openai.com/codex/mcp

Windsurf / Devin Desktop

~/.config/devin/mcp_config.json (older Windsurf: ~/.codeium/windsurf/mcp_config.json)

{
  "mcpServers": {
    "my-server": {
      "serverUrl": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Source: docs.devin.ai/windsurf/plugins/cascade/mcp

Devin CLI / Devin Local

Run in a terminal (-s user saves it to ~/.config/devin/mcp_config.json for every project)

devin mcp add -s user -H "Authorization: Bearer YOUR_KEY" my-server "https://example.com/mcp"

Source: docs.devin.ai/cli/extensibility/mcp/configuration

VS Code (Copilot agent mode)

.vscode/mcp.json in the workspace, or your user mcp.json (MCP: Open User Configuration)

{
  "servers": {
    "my-server": {
      "type": "http",
      "url": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Source: code.visualstudio.com/docs/agents/reference/mcp-configuration

Gemini CLI

~/.gemini/settings.json (or .gemini/settings.json in the project)

{
  "mcpServers": {
    "my-server": {
      "httpUrl": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Source: geminicli.com/docs/tools/mcp-server/

Antigravity CLI (agy)

~/.gemini/config/mcp_config.json (or .agents/mcp_config.json in the workspace)

{
  "mcpServers": {
    "my-server": {
      "serverUrl": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Source: antigravity.google/docs/mcp

OpenCode

opencode.json in the project root, or ~/.config/opencode/opencode.json for every project

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "my-server": {
      "type": "remote",
      "url": "https://example.com/mcp",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Source: opencode.ai/docs/mcp-servers/

Need a task list for those agents?

Taskhold is a remote MCP server that gives Cline and your other agents a task list you share, with their progress on a live board. Its setup link writes this config for the agent, so you don't have to. $12 a month or $120 a year, 7-day trial.

Other clients