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 cline_mcp_settings.json buried in VS Code's globalStorage directory. 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.

Transport
Advanced: environment variables

Config JSON

Where this file lives

    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 lives in VS Code's globalStorage, three directories deep, and is shared across all workspaces. Hunting for it in the repo finds nothing - always open it via the Cline panel's "Configure MCP Servers" button, which also creates the file on first use.

    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.

    FAQ

    Where is cline_mcp_settings.json?

    Inside VS Code's globalStorage: <home>/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/ on macOS, the %APPDATA% equivalent on Windows, and ~/.config on Linux. The reliable way to open it is the "Configure MCP Servers" button in Cline's MCP panel.

    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.