In this categoryVS Code Setup ยท 25
- How to Set Up GitHub Copilot in VS CodeStart
- How to Use Copilot Chat and Inline Chat in VS Code
- How to Install and Manage Extensions in VS Code
- How to Install the Continue Extension in VS Code
- How to Install Cline, the Autonomous Coding Agent, in VS Code
- How to Configure Continue with an API Model
- How to Set Up an AI Assistant in VS Code
- How to Run Continue with a Local Model Using Ollama
- How to Run Copilot, Continue, and Cline Together Without Conflicts
- How to Add an MCP Server to Cline
- How to Fix AI Suggestions Not Appearing in VS Code
- How to Install and Trust an AI Extension in VS Code
- How to Install a VS Code Extension from the Command Line
- How to Create a launch.json to Debug a Node.js App in VS Code
- How to Initialize a Git Repository in VS Code
- How to Stage, Commit, and Push Changes from VS Code
- How to Debug a Browser App in VS Code with the Built-in Chrome Debugger
- How to Resolve Git Merge Conflicts in VS Code
- How to Run Build and Dev Commands with tasks.json in VS Code
- How to Add Environment Variables to a VS Code Debug Configuration
How to Add an MCP Server to Cline
Extend Cline with a Model Context Protocol server so the agent can use external tools like a filesystem or web fetch.
The Model Context Protocol, or MCP, lets agents call external tools through a standard interface. Cline supports MCP servers, which means you can give the agent abilities like fetching web pages, querying a database, or browsing a sandboxed filesystem. This guide adds an MCP server to Cline and confirms the new tools appear.
What you need
- Cline installed and connected to a model
- Node.js installed so npx can run server packages
- About 9 minutes
Step 1: Open the MCP servers panel
In the Cline panel, open the menu and choose MCP Servers. This view lists installed servers and has an option to edit the configuration file directly. The config is JSON and maps a server name to the command that launches it.
Step 2: Add a server to the config
Click Edit Configuration to open the JSON file. Add an entry under mcpServers with a command and its arguments. The example below adds the official filesystem server, scoped to a single project directory so the agent cannot reach outside it.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/projects/demo"
]
}
}
}Step 3: Save and let the server start
Save the file. Cline launches the server with npx, which downloads the package on first use. When it connects, the server appears in the MCP Servers list with a green status dot and its available tools listed underneath.
Step 4: Use the new tools in a task
Give Cline a task that needs the tool, such as list every Markdown file in the project and summarize each one. The agent now calls the MCP tools to do it, asking for approval just like any other action.
Result
Cline now has access to an MCP server and its tools, scoped safely to one directory. You can extend the agent with any MCP-compatible server the same way, growing what it can do without changing the extension itself.
Watch related tutorials
15:50
14:27
23:41
14:00
12:36
18:52New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.