All Agent Engineering

Configuring MCP servers for Cline: transports, the type default and connection checks

Check where Cline keeps MCP config, the stdio and remote field shapes, the type default, and how to confirm a server connected.

AINavWritten / Updated
On this page

At a glance

Connecting an MCP server to Cline usually fails on one of three practical details rather than on the protocol: the JSON went into a file Cline does not read; a remote server has no type and therefore runs the legacy transport; or the config looks right but the tools never appear and nobody checked whether the server exposes them. The official MCP page separates the config entry points, the field shapes, the transport choice and the troubleshooting table clearly, and it also leaves a few real gaps. This article re-orders those facts as: which file, what to write, which transport, how to confirm, where to look when it fails - and it labels the questions the page does not answer instead of filling them in. Every fact comes from https://docs.cline.bot/mcp/configuring-mcp-servers, read on 2026-11-23. Nothing was installed, no MCP config was written, no server was connected, and no connection or tool-call result was observed; sentences marked as editorial advice are choices about checking order, not documented behaviour.

Runtime and applicability

Article type
Engineering practice
Verified
Applies to
  • Cline Cline: MCP server config file, transports and connection checks

Execution locations and responsibilities

  • The Cline CLI file ~/.cline/data/settings/cline_mcp_settings.json Holds the server definitions under mcpServers; the path can be overridden with CLINE_MCP_SETTINGS_PATH.
  • The MCP settings the IDE extension opens via Configure MCP Servers Serves as the config source the extension actually reads; check it separately from the CLI file rather than assuming they are the same document.

When to use

  • You are adding a local or remote MCP server to Cline and need to know which file holds the config, what each field is called, and how the local and remote shapes differ.
  • A server is configured but its tools never appear in the list, or it will not connect, or reports an auth error or a timeout, and you want to work through the official troubleshooting table.

When not to use

  • You want the MCP protocol itself: message shapes, capability negotiation, tool description structure. This page describes how one host, Cline, configures servers; it does not define the protocol, so the specification is a separate read.
  • You want a project-scoped MCP config that applies only to one repository. Within what this page states there is no project-level config path or key, and this article will not invent one.

Which file holds the config

The official page gives two entry points. The CLI keeps its config at ~/.cline/data/settings/cline_mcp_settings.json, and the location can be overridden with the CLINE_MCP_SETTINGS_PATH environment variable. For the IDE extensions, the UI takes you to the settings: in the Cline panel click the MCP Servers icon (the stacked server icon in the top toolbar), open the Configure tab, and click Configure MCP Servers near the bottom. The extension opens the MCP settings JSON it uses, and you add or update entries under mcpServers. The shells differ, but the skeleton is the same mcpServers object.

Scope, as far as this page states it, means exactly that: the CLI has one fixed path (overridable by the environment variable) and the IDE extension has a settings file the UI opens, both organised by server entry. No pair of project-level and global-level configs appears. This article therefore makes no project-scope inference: if you need "only inside this repository", the page as read has no path or key for it, and the honest next step is a newer official page rather than a filename you invented.

There are two ways to avoid hand-writing JSON. The Remote Servers tab in the UI adds hosted endpoints: enter Server Name (any unique label), enter Server URL (the full endpoint URL), choose Transport Type, then click Add Server. In a terminal, cline mcp opens a wizard that can list configured servers with their enabled or disabled status, add a server, edit one, enable or disable without deleting, run or rerun browser OAuth authorization for a remote server, and delete a server permanently. When adding, the wizard prompts for server name, transport type, and either command/args for stdio or URL/headers for remote transports.

The page also shows how to add or remove a server from a script, skipping the menu. Without --yes, cline mcp add opens the add wizard with those fields already filled in, so a human confirms them. To look without writing, cline config mcp lists the servers and cline config mcp --json returns them as JSON.

Example: original official excerpt (remote add, remove and JSON listing); not executed in this batch
Shell
cline mcp add docs https://example.com/mcp --transport http --header "Authorization: Bearer TOKEN" --yes
cline mcp remove docs
cline config mcp --json

The two server shapes and their fields

The official page reduces server configuration to two shapes: a local STDIO server using command plus args, and a remote HTTP/SSE server using url. Both excerpts below are the original examples from that page, indentation copied, with no key added from outside it. Note that both carry disabled and autoApprove: the first is the enable switch, the second is the list of tools approved automatically, and both examples use an empty array, which means no tool is auto-approved by default.

Example: the official local STDIO server excerpt; nothing was written or connected in this batch
json
{
  "mcpServers": {
    "local-server": {
      "command": "node",
      "args": ["/path/to/server.js"],
      "env": {
        "API_KEY": "your_api_key"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
Example: the official remote Streamable HTTP server excerpt; nothing was written or connected in this batch
json
{
  "mcpServers": {
    "remote-server": {
      "type": "streamableHttp",
      "url": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer your-token"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
Fields shown in the official examples and the shape each belongs to
FieldShapeWhat the page says
commandLocal STDIOThe local command to run; the official local example uses node
argsLocal STDIOArray of arguments passed to the command; the example passes a script path
envLocal STDIOEnvironment variable object; the example puts API_KEY there
typeRemoteSelects the transport; values in the next section, defaults to legacy sse when omitted
urlRemoteThe full endpoint URL
headersRemoteRequest header object; the example puts a Bearer token in Authorization
disabledBothServer enable state; both official examples set it to false
autoApproveBothList of tools approved automatically; both official examples use an empty array

What belongs in env is addressed, but not settled, by the security basics: store secrets in environment variables. That sentence does not distinguish writing the secret into the config env object from having the process that launches Cline inject it. The two examples show the first reading, while "store in environment variables" can also mean the second. That is a genuine ambiguity in the page: putting a token in plaintext env matches the example shape, and matching the shape is not the same as meeting your team key-management rules. Who injects the credential and whether the config file is committed or synced are questions the page does not answer.

Timeouts have a similar gap. Managing servers says you can set request timeouts in MCP settings, and the troubleshooting row for timeout errors says to increase the MCP timeout and test the server response directly, but the page never gives the timeout key name and no example contains one. The honest statement is therefore: the page confirms an adjustable timeout exists inside MCP settings and does not name its field, so neither a key nor a nesting level can be assumed here.

Choosing a transport, and that default

The page lists two transport families with a trade-off: STDIO is a local process with lower latency and simpler local setup; remote HTTP/SSE is a hosted endpoint with centralised deployment and support for multiple clients. The recommendation is equally direct: STDIO for local tools, remote transport for shared hosted services. In the UI the remote option offers exactly two choices, Streamable HTTP marked recommended and SSE marked Legacy.

The trap is the JSON default. The type field selects the transport, and omitting it falls back to the legacy sse transport for backward compatibility. An entry with only url and no type therefore looks almost identical to the recommended configuration while actually running the Legacy transport. The official wording is explicit: set "type": "streamableHttp" for the recommended transport, and use "type": "sse" only for legacy SSE servers. This default is the most likely cause of "config looks right, behaviour is wrong", so it belongs first in any remote-server check.

Transport options and the reasons the page gives
TransportShape or label on the pageWhat the page says it is for
STDIOConfigured as command + args; the UI Transport Type in the Remote Servers tab does not offer itLocal process, lower latency, simpler local setup; use for local tools
streamableHttpStreamable HTTP (recommended)Hosted endpoint, centralised deployment, multi-client use; suited to shared hosted services
sseSSE (Legacy)Use only for legacy SSE servers; also the fallback when type is omitted

Do not use the Cline layer to reason about transport behaviour itself. This page is host-side configuration documentation: it tells you which key to write, what the default is and which option the UI recommends, but it does not describe implementation, reconnection semantics or session negotiation - those belong to the MCP specification. Keeping the two layers apart matters when a server connects and then drops: confirm which type you actually wrote before digging into the protocol and the server implementation, rather than experimenting with the config file.

How to confirm it connected

The quick start states the acceptance test in four steps: open MCP Servers in Cline; add a local server manually or connect to a hosted remote server; configure credentials and environment variables; and verify tools appear and test one tool call. That last step is the only explicit "confirm it connected" action on the page, and it asks for two things: the tools show up in the list, and a tool call actually succeeds. A written config, or a server entry that merely exists, satisfies neither.

  • First confirm you edited the file Cline actually reads: the CLI path is ~/.cline/data/settings/cline_mcp_settings.json (or wherever CLINE_MCP_SETTINGS_PATH points), while the IDE extension uses the settings its Configure MCP Servers button opens. Treating those as the same file is an assumption, not a fact.
  • Then confirm the entry sits under mcpServers, that its name is unique, and that disabled is not the inverted enable state. Managing servers confirms you can enable and disable, restart an unresponsive server, set timeouts and remove servers, so "left disabled" is a legitimate and silent failure mode.
  • For a remote server, check explicitly that type says streamableHttp. The fallback when it is omitted is sse, and that default comes from the official wording, not from this article.
  • Finish with quick-start step 4: do the tools appear, and does one tool call work. When the list is empty, the matching official troubleshooting row is to confirm the server started successfully and that tools are exposed.
  • To re-read the config without writing anything, cline config mcp or cline config mcp --json lists the servers and their enabled status. That is an official command, but it reads configuration only and does not verify a connection.

The page does not describe how connection state is presented: there is no status field, status indicator or log location, and no statement about whether a failure reason appears in the UI or only in the background. So "confirm it connected" can only rest on two observable points here - whether the tools appear in the list, and whether a tool call succeeds. If your UI shows additional status information, that is the host interface, and this article does not describe it on the strength of this page.

Troubleshooting against the official table

The official troubleshooting pairs, as stated
SymptomWhere the page points you
Server will not connectVerify command or URL, server process status, and port
Missing toolsConfirm the server started successfully and tools are exposed
Auth errorsRe-check API keys or tokens and the required headers
Timeout errorsIncrease the MCP timeout and test the server response directly

Those four rows matter less as a complete list than as a division of responsibility: a connection failure points at the command and port (local) or the URL (remote); missing tools point at whether the server exposes them at all; auth errors point at tokens and headers; and a timeout may need either a Cline-side setting or a direct test of whether the server responds. Classifying your symptom first, then checking the side it belongs to, beats repeatedly reshaping the config.

  • Local server: command must resolve to an executable in the environment Cline runs in, and args must be arguments it accepts. The official example uses node with an absolute script path; a relative path or a command that depends on PATH shows up as a failed connection or a process that exits immediately, which is exactly the "verify command, process status and port" row.
  • Remote server: url is the full endpoint URL and headers carries authentication. The official example puts Authorization: Bearer ... in headers, so auth errors should be checked there first rather than in env, which belongs to the local-process shape.
  • Credential exposure: the security basics ask you to install only servers you trust, store secrets in environment variables, limit autoApprove to safe tools, and review tool calls before approval. Together those make autoApprove an explicit decision to narrow approval, not a switch for making prompts go away.
  • Stop conditions (editorial advice): if the table has been worked through item by item and the server still will not connect and its tools never appear, stop there and preserve the observation - confirm where the config was written and whether type was read as intended, instead of changing the server side repeatedly to guess Cline behaviour. This is a suggestion about checking order, not an official rule.

Scope, and what the page leaves open

  • This page is host-side configuration documentation, not the MCP specification. It defines which file Cline reads, which keys to write and how the UI guides you; it does not define protocol messages. Reading it as a protocol source gets the layer wrong.
  • The page gives no project-level and global-level pair of configs. This article therefore describes only the CLI fixed path (overridable with CLINE_MCP_SETTINGS_PATH) and the extension settings the UI opens, and does not infer an in-repo config file.
  • The page confirms request timeouts can be set inside MCP settings but never names the field, and no example contains one. When you need to raise it, the key must be verified elsewhere instead of copied from a guess.
  • Security basics say to store secrets in environment variables, while the examples put API_KEY and a Bearer token directly in the config env and headers. The gap between those two statements - who injects the credential and how the config file itself is protected - is not answered.
  • The page does not describe connection-state presentation, status fields or log locations. Confirming a connection can only rest on quick-start step 4: the tools appear, and one tool call is actually invoked and succeeds.
  • The exact matching semantics of autoApprove - exact tool names or wildcards - are not stated, and the examples only show an empty array. Do not assume it accepts wildcards.

Every fact here comes from the official MCP configuration page as read on 2026-11-23, including the two config entry points, the field names under mcpServers, both JSON examples, the type fallback, the transport guidance, the list of management actions, the four security basics and the four troubleshooting pairs. Nothing was installed, no MCP config file was written or modified, cline mcp and cline config mcp were not run, no server was connected, and no tool list or tool call was observed, so there is no "configure it like this and it connects" claim anywhere in this article. The only editorial advice is about checking order - confirm the file location and type first, classify the symptom against the table next, and touch the server last - and it is not a documented promise. Where the page itself has the gaps listed above, the right move is a newer official page, not treating this text as the missing answer.

Sources

All links are official pages; verification dates are listed per source, and links point to the version checked.

  1. Cline · MCP: Add, configure, and use MCP servers in Cline

Found an error? Tell us →