How to Set Up MCP Servers in Cline: Configuration and Remote Setups
While most developers configure Model Context Protocol (MCP) servers locally, local setups restrict AI agents to a single machine's local disk space. This guide details how to set up MCP servers in Cline by editing the global config file. Learn how to configure local stdio commands, set up streamableHttp remote transports, and connect persistent cloud workspaces.
The Architecture of Model Context Protocol in Cline
According to the LangChain State of Agent Engineering report, 57% of surveyed organizations now run AI agents in production environments, representing a rapid transition from simple text generation to autonomous execution. This shift is particularly visible in developer environments, where tools like Cline have evolved from autocomplete helpers into agentic assistants that run tests, manage files, and execute terminal commands. To coordinate this work, Cline relies on the Model Context Protocol (MCP), an open standard that connects large language models to local systems and remote data sources.
In traditional developer setups, an AI assistant is isolated. It can read the files open in your editor and look at the active workspace path, but it cannot access your databases, query remote web pages, or inspect server status. MCP resolves this isolation by defining a protocol where the AI agent acts as a client that queries a local or remote server. These servers expose tools, resources, and prompts, allowing the agent to perform complex operations like running database migrations, inspecting container configurations, or searching documentation sites.
Cline implements MCP by running a background manager that communicates with server instances. The manager handles two primary transport methods: standard input/output (stdio) and streamable HTTP. Stdio connections start a local process, such as a Node.js script or a Python daemon, and communicate by reading and writing JSON-RPC messages over standard streams. Streamable HTTP connections route these same messages over the web, enabling connection to remote endpoints. When you configure custom tools in Cline, you expand the assistant from a simple code generator into a capable agent that acts on your local system or queries cloud environments.
Where Is the cline_mcp_settings.json File Located?
To configure MCP servers, you must edit a global configuration file named cline_mcp_settings.json. A common gap in developer tutorials is omitting the exact directory path to this file, leaving developers to search through hidden app folders. The settings file resides within the user configuration storage of your IDE, and its location depends on your operating system.
If you are using the Cline VS Code extension, the paths to the active configuration file are:
- macOS user folder:
/Users/username/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Windows AppData directory:
C:\Users\username\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json - Linux config directory:
/home/username/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
If you are running the Cline command line interface (CLI) or a portable version of VS Code, the settings are stored in a different global directory. The default path for the standalone Cline configuration is:
/home/username/.cline/data/settings/cline_mcp_settings.json
Instead of searching through hidden directories on your machine, you can open this configuration file directly from the Cline interface in VS Code. Open the Cline sidebar panel, and click the MCP Servers icon, which is represented by a stacked plug or server icon in the top right header. Select the Configure tab, and click the Configure MCP Servers button at the bottom of the interface. This action immediately opens the correct JSON settings file in a new VS Code editor tab. Any changes you make to this file are monitored in real time, meaning Cline will reload and reinitialize your servers the moment you save the document.
If the target directory does not exist on your system, it is because Cline has not yet initialized its settings. Rather than manually creating these folders, launching the configuration window from the user interface is the safest way to ensure the extension builds the directory structure with correct system permissions. If your local workspace is restricted by system policies, make sure the user running VS Code has permission to write to this global settings path.
How Do I Add a Custom Local MCP Server to Cline?
To register a local tool with Cline, you add a server block inside the mcpServers object in your configuration file. Local servers run as subprocesses of the IDE, communicating via the stdio transport layer. This approach is ideal for local scripts, databases, and file operations that execute directly on your workstation.
The standard JSON block for a local server requires a unique identifier, an execution command, and an array of arguments. For example, to set up the official SQLite MCP server, add the following configuration:
{
"mcpServers": {
"sqlite-local": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sqlite",
"--db",
"/Users/username/data/development.sqlite"
],
"env": {
"SQLITE_TIMEOUT_MS": "5000"
},
"disabled": false,
"autoApprove": []
}
}
}
In this block, the command field specifies the executable, such as node, npx, python, or a precompiled binary. The args array contains the parameters passed to that command. The optional env object lets you inject environment variables, such as database paths or credentials, keeping them out of your primary codebase. The disabled boolean allows you to toggle the server off without deleting the configuration.
When running local node tools on Windows, path resolution can create errors. If the terminal fails to locate the global npx command, you must specify the absolute path to the node executable or wrap the command. For Windows environments, the command must be modified to point to cmd.exe or powershell.exe with arguments to run the script. In addition, you must escape backslashes in Windows file paths, changing C:\Users\data to C:\\Users\\data within the JSON configuration to prevent escape character parsing errors.
You can add multiple local servers in this manner by separating the configuration blocks with commas inside the mcpServers object. When creating custom tools, you can also define an autoApprove array in each server block. Adding specific tool names to this list permits Cline to run those commands automatically without prompting you for confirmation, which speeds up autonomous loops.
How Do I Configure Remote MCP Servers with Streamable HTTP?
While local servers are effective for single-machine workflows, they limit your coding assistant to local compute resources. To connect to hosted databases, team tools, or shared files, you must use remote MCP servers. Cline supports connecting to remote endpoints via the streamableHttp transport, which transmits JSON-RPC requests over an active web connection instead of standard input/output.
To configure a remote server, add a configuration block that specifies streamableHttp as the connection type. This setup requires the server URL and any necessary authentication headers. For example, to connect to a cloud workspace like Fast.io, update your configuration file with this JSON block:
{
"mcpServers": {
"fastio-workspace": {
"type": "streamableHttp",
"url": "https://fast.io/mcp",
"headers": {
"Authorization": "Bearer your_fastio_api_token_here"
},
"disabled": false,
"autoApprove": []
}
}
}
In this schema, the type field is set to streamableHttp in camelCase. Specifying this type tells Cline to establish a streamable HTTP connection rather than looking for a local command process. The url field points to the remote server endpoint, and the headers object passes the authorization token. The remote server handles the request, executes the tools, and streams the results back to the IDE.
Establishing a remote streamable connection reduces local processing overhead. Instead of running node processes that consume CPU and memory, your machine offloads tool execution, database queries, and document parsing to the remote cloud infrastructure. This remote setup is particularly useful when working on lower-spec machines or when sharing agent contexts across a team of developers, as everyone connects to the same central tool and storage layer.
For legacy servers that use Server-Sent Events, Cline also supports the sse transport type. If you omit the type field or set it to sse, the client fallback mechanism assumes the server communicates using standard SSE protocols. However, streamableHttp remains the preferred transport for modern cloud-based setups, providing better performance and lower latency during long-running tasks.
Persist your coding agent's files across IDE sessions
Get a shared cloud workspace with an MCP-ready endpoint for your Cline agent's reads and writes, with version history and semantic search built in. Starts with a 14-day free trial.
Connecting Fast.io Shared Workspaces for Cline Memory
When using Cline for complex programming tasks, the agent needs a persistent place to read, write, and store files. Developers often start by saving agent outputs to local drives, simple Amazon S3 buckets, or consumer cloud folders like Dropbox or Google Drive. However, these traditional storage methods lack the intelligence required for agentic workflows. They do not index files for semantic query, they do not prevent concurrent version conflicts, and they require you to manage complex API keys or local synchronization daemons.
Fast.io provides an alternative by serving as an intelligent cloud workspace designed for both human developers and AI agents. By pointing Cline to a remote Fast.io workspace, the agent gains access to a persistent storage layer that operates across IDE reloads and different physical machines. Fast.io indexes files automatically, allowing Cline to query files, notes, and schemas via its MCP server.
To configure this setup, your agent connects to the Fast.io MCP server. You can read the official Fast.io MCP documentation or review the agent onboarding guidelines to understand the tool schemas. This connection lets the agent query your team workspaces directly, bridging the gap between local code execution and remote document management.
This intelligent workspace enables several capabilities that improve Cline's development workflows:
- Intelligence Mode: Once enabled, Fast.io automatically indexes all documents and source code for Retrieval-Augmented Generation (RAG). Cline can run semantic queries to find files based on abstract concepts, retrieving only the relevant text chunks to save API token costs.
- Metadata Views: This structured extraction layer turns unstructured files into structured database views. You can describe the fields you want extracted, such as contract dates and counterparties, policy numbers and coverage limits, or invoice line items, in natural language. The system designs a typed schema of Text, Integer, Decimal, Boolean, URL, JSON, or Date & Time, matches files in the workspace, and populates a sortable, filterable spreadsheet. No templates or manual OCR rules are required, and the system works with PDFs, images, scanned pages, and handwritten notes. You can add new columns without reprocessing. These structured data views are accessible via MCP tools, allowing Cline to query extraction results directly. Detailed documentation is available on the Metadata Views product page.
- Per-File Version History: If Cline makes an incorrect edit or writes a bug during an autonomous run, you can view the complete version history of that file and restore it to a clean state. This prevents data loss during complex code operations.
- Collaborative Notes: Real-time co-editing allows human developers to work on the same canvas as the AI agent. You can draft requirements, update tasks, and edit documentation together, keeping the agent aligned with project goals.
- Branded Shares: When the agent completes its work, it can configure branded shares (Send, Receive, or Exchange) to securely deliver output files to external clients. These shares can be durable or set to expire.
This unified workspace ensures that your agent does not operate in isolation. You can review the append-only audit log, view real-time events in the activity feed, and oversee tasks. Fast.io does not offer a permanent free plan or free agent tier. Organizations run on a paid subscription, with pricing starting at Starter at $29/mo, Business at $99/mo, and Growth at $299/mo. The developer workflow allows you to sign up your agent for free, build the workspace, and then transfer organization ownership to a human admin who starts the 14-day free trial, which requires a credit card. Check the Fast.io pricing page to get started.
Troubleshooting Cline MCP Configuration and Connection Errors
When configuring custom MCP servers in Cline, you may run into connection failures or syntax issues. Understanding how to diagnose these errors ensures that your agentic development environment remains active and reliable.
The most common issues include:
- JSON Format Violations: A single syntax error in cline_mcp_settings.json will cause Cline to fail to load any of your configured servers. This usually happens when you leave a trailing comma after the last server configuration block, omit a closing bracket, or forget to escape backslashes in Windows file paths. Always use a JSON validator or check for red squiggly lines in the VS Code editor before saving your settings.
- Node or NPX Path Resolutions: If a local server fails to start, check if your terminal can resolve the execution commands globally. On Windows, command calls like npx may fail if the node installation is not in the system PATH. To fix this, replace the command with cmd and pass the arguments using the execution flag:
"command": "cmd", "args": ["/c", "npx", "@modelcontextprotocol/server-sqlite", ...]. - Remote Connection Timeouts: If a remote server using streamableHttp fails to connect, check your authorization headers. The API token must be active, and the Authorization header must follow the Bearer schema exactly:
"Authorization": "Bearer your_token". Verify that your network proxy or local firewall is not blocking outbound requests to the server URL. - Portable VS Code Mode: If you use VS Code in Portable Mode, the standard global directory paths do not apply. Cline will look for the standalone configuration file in your portable user data folder. If the file is missing, click the MCP Servers icon in the Cline panel and select the Configure button to force the IDE to generate the JSON file in the correct directory.
To inspect detailed error logs, open the Output panel in VS Code and select Cline from the dropdown. This log records the initialization sequence of every registered server, displaying stdout and stderr outputs. By checking these logs, you can quickly determine if a local process crashed due to a missing dependency or if a remote server returned an authentication error.
Frequently Asked Questions
Where is the cline_mcp_settings.json file located?
The settings file location depends on your operating system. For VS Code on macOS, it is at `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`. For Windows, it is at `%APPDATA%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`. If you use the Cline CLI, the default path is `~/.cline/data/settings/cline_mcp_settings.json`.
How do I add a custom MCP server to Cline?
You add a custom server by opening the `cline_mcp_settings.json` file and registering the server block under the `mcpServers` key. For local servers, specify the executable in the `command` field and its parameters in `args`. For remote servers, set the `type` field to `streamableHttp` and specify the endpoint `url` and credentials.
What is the difference between stdio and streamableHttp transport in Cline?
Stdio transport launches a local process on your computer (like Node.js or Python) and communicates through standard streams, which restricts it to your local machine. StreamableHttp transport sends JSON-RPC requests over web HTTP connections, allowing Cline to connect to remote servers and cloud workspaces.
Related Resources
Persist your coding agent's files across IDE sessions
Get a shared cloud workspace with an MCP-ready endpoint for your Cline agent's reads and writes, with version history and semantic search built in. Starts with a 14-day free trial.