How to Add an MCP Server to Cline

Cline is an autonomous coding agent that runs as a VS Code extension, and it reads MCP servers from a single global cline_mcp_settings.json file. The supported way to open that file is the Cline panel itself - MCP Servers > Configure > Configure MCP Servers - rather than navigating internal directories by hand. Beyond the standard command/args/env fields, Cline adds its own keys - disabled and autoApprove - that control whether a server runs and which of its tools execute without confirmation.

Config file location

Generate a Cline config

The tool below is pre-set to Cline. Fill in the server and copy the JSON — it never leaves your browser.

Files are read locally; nothing is uploaded.

Working example

A Cline config with the Cline-only autoApprove field: the two listed tools run without per-call confirmation, everything else still asks.

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "<your-token-here>"
      },
      "disabled": false,
      "autoApprove": ["get_issue", "search_repositories"]
    }
  }
}
cline_mcp_settings.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/you/projects"
      ],
      "disabled": false,
      "autoApprove": [
        "read_file",
        "list_directory"
      ]
    }
  }
}
cline_mcp_settings.json with a filesystem server, disabled flag set to false, and an autoApprove list for read-only tools.

How to add the server, step by step

  1. Open the Cline sidebar in VS Code and click the MCP Servers icon at the top.
  2. Choose "Configure MCP Servers" - Cline opens cline_mcp_settings.json for you.
  3. Paste your server into the mcpServers object and save.
  4. Watch the MCP panel: Cline launches the server immediately and shows its status inline.
  5. Tune autoApprove for the tools you trust, then ask Cline a task that uses one.

Cline-specific pitfalls

The file is not in your project

cline_mcp_settings.json is one global file shared across all workspaces, and it lives outside your repo - hunting for it in the project finds nothing. Always open it via the Cline panel's "Configure MCP Servers" button, which also creates the file on first use. Older guides that point into VS Code's extension storage are describing an internal detail that is no longer the supported entry point.

autoApprove changes your security posture

Listing a tool in autoApprove lets Cline run it with no confirmation prompt - including destructive ones. Approve read-only tools (search, fetch) freely; think hard before auto-approving anything that writes files, runs shell commands, or mutates a database.

First npx runs can time out

The first time npx downloads a server package it can take longer than Cline's startup timeout, so the server shows as failed. Run the same npx command once in a terminal to warm the cache, then restart the server from Cline's MCP panel.

Use "disabled" to debug conflicts

Two servers exposing similar tool names confuse the model about which to call. Instead of deleting a server, set "disabled": true - the config stays for later, but Cline stops launching it and hides its tools.

Related troubleshooting

FAQ

Where is cline_mcp_settings.json?

Open it from the Cline panel: MCP Servers > Configure > "Configure MCP Servers", and Cline opens (or creates) the real file for you. Cline's docs also record a current global path at ~/.cline/data/settings/cline_mcp_settings.json, but the IDE entry is the supported route - older guides that send you digging through VS Code's extension storage describe an internal detail, not the supported entry point.

What does autoApprove do in Cline?

It is a per-server list of tool names Cline may execute without asking you each time. Tools not in the list still require confirmation. It is Cline-specific - other clients ignore the field.

Why does my Cline MCP server fail on the first run?

Usually a startup timeout while npx downloads the package. Run the command once in a terminal to warm the npx cache, then restart the server from Cline's MCP panel. Also confirm the args include -y so npx never waits for a prompt.

Configuring other clients too? See the guides forClaude Desktop,Cursor,VS Code,Windsurf,Zed andCline, or readhow MCP transports differ.