MCP Directory
All Tutorials

How to Use MCP with Cline

Wire official MCP reference servers into the Cline VS Code extension.

OVERVIEW Cline is an autonomous coding agent extension for VS Code (and compatible forks). It supports MCP so the agent can call official reference tools from modelcontextprotocol/servers — not only built-in file edits but also Memory, Fetch, Git, Sequential Thinking, and more. This guide uses install commands verified at https://github.com/modelcontextprotocol/servers. Cline's own UI labels change between releases; consult Cline documentation for the exact MCP settings panel location. WHAT MCP ADDS TO CLINE Without MCP, Cline operates on the editor workspace through its native mechanisms. With MCP, Cline becomes a client orchestrating separate server processes — the same architecture Claude Desktop uses. Each server advertises tools; Cline's agent selects and invokes them during multi-step tasks. PREREQUISITES - VS Code with Cline extension installed - Node.js 18+ (for npx servers) - uv / uvx (for Python servers) Official test commands: npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir npx -y @modelcontextprotocol/server-memory uvx mcp-server-git --repository path/to/git/repo OPEN MCP SETTINGS IN CLINE Typical flow (wording may vary): 1. Open Cline sidebar. 2. Find MCP Servers or server configuration icon. 3. Add JSON config or use form fields for command/args. 4. Save and start a new agent task. If MCP is missing, update Cline to the latest version and review its GitHub documentation. CONFIG FORMAT (MATCHES CLAUDE DESKTOP) Official README pattern: { "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir" ] } } } RECOMMENDED STARTER SET FOR CLINE Filesystem — project-scoped path for read/write/search. Git — uvx mcp-server-git --repository set to same project root. Memory — persistent decisions across long agent runs. Windows: wrap npx entries with cmd /c per official README; uvx unchanged. WINDOWS EXAMPLE { "mcpServers": { "filesystem": { "command": "cmd", "args": [ "/c", "npx", "-y", "@modelcontextprotocol/server-filesystem", "C:\Users\you\repo" ] }, "git": { "command": "uvx", "args": ["mcp-server-git", "--repository", "C:\Users\you\repo"] } } } SECURITY NOTES Cline can autonomously chain tool calls. Enable user approval for destructive Filesystem tools if available. Official reference servers disclaimer applies — not production-audited. Never scope Filesystem to entire user profile directories. FAQ Q: Cline vs Cursor MCP? A: Same server commands; different config UI and agent behavior. Q: Official commands? A: modelcontextprotocol/servers README. Q: Fetch in Cline? A: uvx mcp-server-fetch — useful for doc retrieval during agent tasks; mind SSRF policies. USAGE TIPS Ask Cline to run edit_file with dryRun first when using Filesystem MCP — the Filesystem README recommends preview mode. Store recurring conventions via Memory tools. Use Sequential Thinking for large migrations. TROUBLESHOOTING Run server commands in VS Code integrated terminal to capture errors. Ensure VS Code inherits PATH for node and uvx. Reload window after MCP config changes. CURSOR / CLAUDE NOTE Users switching between Cline and Claude Desktop can reuse identical mcpServers JSON blocks (adjust paths). Only the config file location differs. CLINE AUTONOMY AND MCP Cline plans multi-step tasks — read issue, search code, edit files, run terminal commands. MCP Git and Filesystem integrate into that loop when native VS Code APIs are insufficient or when you want explicit allowlists. Configure approval settings so destructive MCP tools pause for confirmation during high-risk operations. FETCH FOR RESEARCH TASKS Ask Cline to Fetch official documentation URLs before implementing unfamiliar APIs — uvx mcp-server-fetch from the official README. Combine with explicit instructions to cite fetched sections in comments. Monitor SSRF policy on corporate networks. SEQUENTIAL THINKING IN LONG AGENT RUNS Add npx -y @modelcontextprotocol/server-sequential-thinking when Cline tackles migrations spanning dozens of files — externalized steps reduce derailed agent runs. Watch context size; restart task with summary when thinking traces grow large. MEMORY FOR CLINE SESSION CONTINUITY Cline tasks may span multiple user messages within a session; Memory extends continuity across entirely new sessions days later — useful for remembering architectural decisions made during a Friday Cline run when you return Monday in Claude Desktop with the same Memory config pointing to the same store. WINDOWS DEVELOPER NOTES Use cmd /c for all npx servers per official README. uvx for Git and Fetch without wrapping. Install Git for Windows so Git MCP underlying calls succeed. Use escaped backslashes in JSON paths inside Cline MCP config UI. VALIDATION WORKFLOW After configuring MCP in Cline: (1) start small task "list allowed directories via filesystem MCP", (2) verify tool appears in Cline action log, (3) escalate to read_file on known path, (4) only then enable autonomous large refactors. OFFICIAL DOCUMENTATION LINKS Server commands: https://github.com/modelcontextprotocol/servers MCP specification: https://modelcontextprotocol.io Cline MCP setup: refer to Cline extension documentation for UI steps that change between releases — this guide intentionally does not invent menu paths. WHY CLINE USERS ADOPT MCP EARLY Cline was built agent-first — MCP extends reach without waiting for extension updates for every new integration. Official reference servers provide filesystem, memory, git, and fetch coverage immediately via documented install commands shared with Claude Desktop and Cursor. CLINE MCP CONFIG RECAP (FILESYSTEM + MEMORY) macOS / Linux — commands from https://github.com/modelcontextprotocol/servers : { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"] }, "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] } } } Windows npx entries use cmd /c as documented in the same README. Relaunch VS Code window after saving MCP settings so Cline spawns fresh server processes.