Skip to main content
Model Context Protocol (MCP) is an open standard that defines how AI applications communicate with external tools and data sources. Think of it as a USB-C port for AI: a single, universal interface that lets an AI model plug into anything — databases, APIs, file systems, browser automation, and more. MCP servers are the programs that implement this protocol. Each server exposes a set of tools (functions the AI can call) and optionally resources (read-only data the AI can reference). Cline acts as the MCP client, discovering available tools and invoking them on your behalf.

MCP Marketplace

Browse and install pre-built MCP servers directly inside Cline.

Adding servers manually

Edit the MCP config JSON to add, configure, and manage servers.

Build your own server

Use the MCP SDK and Cline’s dev protocol to build a custom server.

Official MCP servers

Browse the official collection of reference MCP server implementations.

How MCP works

At its core, MCP is a client–server architecture layered on top of a transport (either local stdio or remote HTTP). When Cline starts, it reads your MCP configuration, launches each enabled server as a subprocess (or connects to a remote endpoint), and queries the server for its list of tools and resources. Those capabilities are then available to Cline during every conversation.
┌──────────────────────────────────────────────┐
│                   Cline (MCP client)         │
│  - Reads cline_mcp_settings.json             │
│  - Launches / connects to servers            │
│  - Calls tools, reads resources              │
└───────────────┬──────────────────────────────┘
                │  MCP protocol (stdio or HTTP)
    ┌───────────┴───────────┐
    │                       │
┌───▼──────────┐   ┌────────▼──────────┐
│  Local server │   │  Remote server    │
│  (stdio)      │   │  (SSE / HTTP)     │
│  e.g. file    │   │  e.g. SaaS API    │
│  system ops   │   │  gateway          │
└──────────────┘   └───────────────────┘

Key concepts

Tools are named functions exposed by an MCP server that Cline can call. Each tool has a name, a description, and a JSON Schema describing its input parameters. When Cline identifies a tool that can help with your request, it asks for your approval before calling it.
{
  "name": "query_database",
  "description": "Run a read-only SQL query against the analytics database",
  "inputSchema": {
    "type": "object",
    "properties": {
      "sql": { "type": "string", "description": "The SQL query to execute" }
    },
    "required": ["sql"]
  }
}
Resources expose read-only data under a URI scheme (e.g. file:///project/readme.md or db://sales/schema). Cline can reference resource content as context without executing any code. Resources are ideal for things like configuration files, database schemas, or API documentation.
An MCP host is the application that embeds a model — in this case, the Cline VS Code extension or Cline CLI. The host manages server lifecycles, surfaces capabilities to the model, and enforces user-approval rules. The client is the protocol layer inside the host that speaks the MCP wire format to each server.
Each MCP server runs in its own process with its own credentials. Sensitive data (API keys, tokens) lives in the server’s environment variables and is never sent to the model directly. Every tool call requires explicit user approval unless you add it to the alwaysAllow list in your config.

What you can do with MCP

Web services and APIs

Monitor GitHub for new issues, post to Slack, fetch real-time weather data, or call any REST or GraphQL API.

Database queries

Query Postgres, MySQL, SQLite, or any database. Generate reports, analyze customer behavior, or build dashboards — all from a chat message.

Browser automation

Automate web testing, scrape e-commerce sites for price data, or take screenshots for visual regression checks.

File system operations

Read and write local files, generate documentation from source code, or keep README files in sync with your project.

Project management

Create Jira tickets from code commits, generate weekly progress reports, or sync tasks across tools like Linear and Notion.

Codebase intelligence

Generate API docs from code comments, create architecture diagrams, or perform semantic search across a large monorepo.

Example: chaining multiple servers

Cline can use tools from several MCP servers in a single conversation. For example:
  1. The GitHub MCP server fetches a list of open pull requests.
  2. The database server queries metrics for the affected code paths.
  3. The Notion server creates a formatted review report with those metrics attached.
You describe the task once; Cline orchestrates the tool calls.

How Cline integrates MCP

Using servers

Once a server is configured, Cline automatically detects its tools. During a conversation, Cline recognises when a tool could help and suggests using it. You approve the call, Cline executes it, and the result is incorporated into the response. You can also ask Cline directly:
“Use the database server to show me last week’s top-10 products by revenue.”

Building servers

Cline can help you build new MCP servers from scratch using natural language:
  • Describe the API or service you want to wrap.
  • Cline generates the boilerplate, tool definitions, and configuration.
  • Paste in official API documentation for best results.
  • Cline handles dependencies, environment variables, and the build step.
See Building custom MCP servers for the full development protocol.

CLI support

MCP servers work with both the Cline VS Code extension and the Cline CLI. If you use the CLI, configure servers under the mcpServers key in the CLI configuration file.

Getting started

1

Find a server

Browse the MCP Marketplace inside Cline, or check community repositories like the official MCP servers and awesome-mcp-servers.
2

Install or configure it

Use the one-click installer in the Marketplace, or add the server manually by editing cline_mcp_settings.json.
3

Use it in chat

Ask Cline to use the new server’s capabilities. Cline will select the right tool and prompt for approval.

Security best practices

MCP servers can execute code and access external services on your behalf. Only install servers from sources you trust, and review the tools a server exposes before enabling it.
  • Store credentials in env fields in your MCP config — never hard-code them in server code.
  • Use the alwaysAllow list sparingly; prefer reviewing each tool call until you trust a server.
  • Restrict server permissions to only the resources they need (e.g., read-only database roles).
  • Validate all inputs inside your server code to guard against injection attacks.
  • For SSE/remote servers, use HTTPS and token-based authentication.

External resources

Build docs developers (and LLMs) love