Cline - 中文版 Docs
  • Cline Documentation
  • 入门指南
    • 快速开始
    • What is Cline?
  • Basics
    • Cline - 中文版胜算 说明文档
      • Cline 和模型上下文协议 (MCP) 服务器:提升 AI 能力
      • Interactive blocks
        • OpenAPI
      • Integrations
        • Cloud Provider Integration
        • Security Concerns
      • .clineignore 功能支持
  • Cline - 中文版胜算 说明文档
    • 什么是Cline - 胜算云增强版
    • 对于新程序员
    • 安装 Cline-胜算云增强版
    • 安装 Dev Essentials
    • 我们最喜欢的技术栈
    • 上下文管理
    • 型号选择指南
  • Getting Started
    • What is Cline?
    • For New Coders
    • Installing Cline
    • Installing Dev Essentials
    • Our Favorite Tech Stack
    • Context Management
    • Model Selection Guide
  • 提高提示技巧
    • 提示工程指南
    • Cline-胜算云增强版 内存库
  • Improving Your Prompting Skills
    • Prompt Engineering Guide
    • Cline Memory Bank
  • 探索 Cline 的工具
    • Cline-胜算云增强版 工具指南
  • 检查站
  • 计划与行动模式:有效人工智能发展指南
  • 新建任务工具
  • Remote Browser 支持
  • Exploring Cline's Tools
    • Cline Tools Guide
    • Checkpoints
    • Plan & Act Modes: A Guide to Effective AI Development
    • New Task Tool
  • Remote Browser Support
  • 企业解决方案
    • 安全问题
  • 云提供商集成
  • MCP 服务器
  • 自定义说明
  • Security Concerns
    • Security Concerns
  • Cloud Provider Integration
  • MCP Servers
  • Custom Instructions
  • MCP服务器
    • MCP概述
    • MCP市场
  • 从 GitHub 添加 MCP 服务器
  • 配置 MCP 服务器
  • 连接到远程服务器
  • MCP 传输机制
  • MCP 服务器开发协议
  • MCP Servers
    • MCP Overview
  • MCP Marketplace
  • Adding MCP Servers from GitHub
  • Configuring MCP Servers
  • Connecting to a Remote Server
  • MCP Transport Mechanisms
  • MCP Server Development Protocol
  • 自定义模型配置
    • 带有凭证身份验证的 AWS Bedrock
    • 带配置文件身份验证的 AWS Bedrock
    • GCP Vertex AI
  • LiteLLM 和 Cline-胜算云增强版(使用 Codestral)
  • Custom Model Configs
    • AWS Bedrock w/ Credentials Authentication
  • AWS Bedrock w/ Profile Authentication
  • GCP Vertex AI
  • LiteLLM & Cline (using Codestral)
  • 本地运行模型
    • 请先阅读
    • Ollama
    • LM 工作室
  • Ollama
  • LM Studio
  • Running Models Locally
  • More Info
    • Telemetry
    • 遥测
Powered by GitBook
On this page

Configuring MCP Servers

PreviousAdding MCP Servers from GitHubNextConnecting to a Remote Server

Last updated 2 months ago

Global MCP Server Inclusion Mode

Utilizing MCP servers will increase your token useage. Cline offers the ability to restrict or disable MCP server functionality as desired.

  1. Click the "MCP Servers" icon in the top navigation bar of the Cline extension.

  2. Select the "Installed" tab, and then Click the "Advanced MCP Settings" link at the bottom of that pane.

  3. Cline will open a new settings window. find Cline>Mcp:Modeand make your selection from the dropdown menu.

Managing Individual MCP Servers

Each MCP server has its own configuration panel where you can modify settings, manage tools, and control its operation. To access these settings:

  1. Click the "MCP Servers" icon in the top navigation bar of the Cline extension.

  2. Locate the MCP server you want to manage in the list, and open it by clicking on its name.

Deleting a Server

  1. Click the Trash icon next to the MCP server you would like to delete, or the red Delete Server button at the bottom of the MCP server config box.

NOTE: There is no delete confirmation dialog box

Restarting a Server

  1. Click the Restart button next to the MCP server you would like to restart, or the gray Restart Server button at the bottom of the MCP server config box.

Enabling or Disabling a Server

  1. Click the toggle switch next to the MCP server to enable/disable servers individually.

To set the maximum time to wait for a response after a tool call to the MCP server:

  1. Click the Network Timeout dropdown at the bottom of the individual MCP server's config box and change the time. Default is 1 minute but it can be set between 30 seconds and 1 hour.

Settings for all installed MCP servers are located in the cline_mcp_settings.jsonfile :

  1. Click the MCP Servers icon at the top navigation bar of the Cline pane.

  2. Select the "Installed" tab.

  3. Click the "Configure MCP Servers" button at the bottom of the pane.

The file usees a JSON format with a mcpServers object containing named server configurations:

Copy

{
  "mcpServers": {
    "server1": {
      "command": "python",
      "args": ["/path/to/server.py"],
      "env": {
        "API_KEY": "your_api_key"
      },
      "alwaysAllow": ["tool1", "tool2"],
      "disabled": false
    }
  }
}

Example of MCP Server config in Cline (STDIO Transport)


MCP supports two transport types for server communication:

Used for local servers running on your machine:

  • Communicates via standard input/output streams

  • Lower latency (no network overhead)

  • Better security (no network exposure)

  • Simpler setup (no HTTP server needed)

  • Runs as a child process on your machine

STDIO configuration example:

Copy

{
  "mcpServers": {
    "local-server": {
      "command": "node",
      "args": ["/path/to/server.js"],
      "env": {
        "API_KEY": "your_api_key"
      },
      "alwaysAllow": ["tool1", "tool2"],
      "disabled": false
    }
  }
}

Used for remote servers accessed over HTTP/HTTPS:

  • Communicates via Server-Sent Events protocol

  • Can be hosted on a different machine

  • Supports multiple client connections

  • Requires network access

  • Allows centralized deployment and management

SSE configuration example:

Copy

{
  "mcpServers": {
    "remote-server": {
      "url": "https://your-server-url.com/mcp",
      "headers": {
        "Authorization": "Bearer your-token"
      },
      "alwaysAllow": ["tool3"],
      "disabled": false
    }
  }
}

After configuring an MCP server, Cline will automatically detect available tools and resources. To use them:

  1. Type your request in Cline's conversation window

  2. Cline will identify when an MCP tool can help with your task

  3. Approve the tool use when prompted (or use auto-approval)

Example: "Analyze the performance of my API" might use an MCP tool that tests API endpoints.

Common issues and solutions:

  • Server Not Responding: Check if the server process is running and verify network connectivity

  • Permission Errors: Ensure proper API keys and credentials are configured in your mcp_settings.json file.

  • Tool Not Available: Confirm the server is properly implementing the tool and it's not disabled in settings

  • Slow Performance: Try adjusting the network timeout value for the specific MCP server

Network Timeout

Editing MCP Settings Files

Understanding Transport Types

STDIO Transport

For more in-depth information about how STDIO transport works, see

SSE Transport

For more in-depth information about how SSE transport works, see

Using MCP Tools in Your Workflow

Troubleshooting MCP Servers

​
​
​
​
MCP Transport Mechanisms.
​
MCP Transport Mechanisms.
​
​
Edit this page
​
​
​
​