用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) logo

用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP)

Community
twtrubiks

用 Cline or Claude 在 VSCode 玩轉 MCP

Publishertwtrubiks
Repositorymcp-vscode-cline
LanguagePython
Forks
3
Stars
27
Available tools
0
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    27 stars and 3 forks from the linked repository.

用 Cline 在 VSCode or Claude 玩轉 Model Context Protocol (MCP) 🚀

MCP 到底是什麼? 🤔

MCP 的全名是 Model Context Protocol。簡單說,它就像是 AI 界的 USB Type-C 🔌 ✨

想想看以前,手機、電腦、平板,每種都要不同的充電線和插頭,超麻煩對吧 😩

USB Type-C 出來後,一條線搞定很多事.

MCP 也是類似的概念,它想給 AI 一個通用的溝通方式,讓 AI 可以很方便地去發現、搞懂、然後使用外部的工具或服務。

這樣有啥好處? 💡

開發者就不用再為了接不同的 AI 或工具,一直去研究那些 API 參數。

而且,AI 自己也能更聰明,看情況決定要用哪個工具來幫忙.

MCP 跟 Function Calling 有啥不同?

你可能聽過 Function Calling( N8N 的 AI Agent 比較類似這個),那也能讓 AI 去叫外面的功能。

但 MCP 又更靈活一點!

Function Calling 通常是你得先告訴 AI 有哪些功能可以用,像個菜單一樣。

但 MCP 更像是讓 AI 自己主動去看看周圍 (Context) 有哪些工具可以用,然後自己決定要怎麼用。

流程圖

下面這張圖,大約就是你在 VSCode 用 Cline 跟 AI 聊天時,背後 MCP 在忙什麼:

Cline

透過 Cline, 其實就是一個 VSCode 的擴充功能

目前已經很非常多 awesome-mcp-servers

很多 MCP 的工具或伺服器都是用 Python 或 Node.js 寫的, 所以建議大家可以先安裝.

MCP Server 就是在你的本機運行一些程式,

alt tag

Cline 取得「大語言模型決定」後,用這個決定作為依據,再去呼叫 MCP Server.

整理一下,

MCP Host 是 VSCode

MCP Client 是 Cline

MCP Server 是 本機運行的程式

如果你想加入, sse 的遠端 server, 直接將 URL 貼到 Remote Servers 即可.

alt tag

安裝 Node.js

下載 Node.js

cmd
# 下載並安裝 nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# 下載並安裝 Node.js:
nvm install 22

# 核對 Node.js 版本:
node -v # 應會印出 "v22.14.0"。
nvm current # 應會印出 "v22.14.0"。

# 核對 npm 版本:
npm -v # 應會印出 "10.9.2"。

Claude

這個社群板不維護了

Linux 目前只有社群維護的版本 claude-desktop-debian

如果你想要用它連結你的遠端 MCP Server,

請到 ~/.config/Claude/claude_desktop_config.json 設定

json
{
  "mcpServers": {
    "n8n mcp": {
      "command": "npx",
      "args": [
        "-y",
        "supergateway",
        "--sse",
        "https://xxxxxxx/mcp/xxxxxxxxx/sse"
      ]
    }
  }
}

使用的概念是 supergateway - sse--stdio

接著重新啟動 Claude, 如果都設定正確

alt tag

MCP Server

Context7

告別 AI 瞎猜! Context7 MCP 搭配 .clinerules 優化 Prompt,精準生成 Odoo 18 Addon 實戰

官網使用可以到 context7

Context7 MCP:為你的 AI Prompt 提供最新的程式碼文件

【問題:沒有 Context7 時 ❌】

大型語言模型 (LLM) 在回答程式碼相關問題時,常常依賴過時或通用的訓練資料,導致:

❌ 程式碼範例過時,基於一年前的舊資料。 ❌ 產生出根本不存在的幻想 API。 ❌ 針對舊的軟體包版本,給出通用或不適用的答案。

【解決方案:使用 Context7 時 ✅】

Context7 MCP 能直接從原始來源抓取最新、針對特定版本的文件和程式碼範例,並將這些最新資訊直接放入你提供給 AI 的 Prompt (提示語) 的上下文中。

VS Code MCP 設定 Context7 MCP

json
{
  "servers": {
    "Context7": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp@latest"]
    }
  }
}

使用 Cline + Odoo 18 + gemini-2.0-flash-001 來實戰一下,

這邊除了用 Context7 之外, 還會使用 Filesystem MCP Server.

直接把我們的需求全部給 Cline 不切實際, 效果也不好, 透過 .clinerules 來改善這個問題

設定的位置在這邊

img

範例可參考 .clinerules 資料夾底下

.clinerules/00-doc.md - 請它用 Context7 先閱讀文件, 避免幻覺.

.clinerules/01-logic.md - 定義他的邏輯.

接著直接給 Cline 下 Prompt

text
先閱讀文件 再開發 addons

如果在執行中, 你想要讓 Cline 自動一直執行下去, 不要每次都一直和你要求允許,

點擊打勾這個圖示, 右邊的 autoApprove 就會填入對應的事件 type, 之後遇到相同的就會跳過去了

img

Augment Code

介紹 augmentcode

14天試用, 300則免費用 (絕對夠你用, 我自己測試使用起來很省)

沒有模型可以選(也不能切換), 就一種而已.

使用模型 Claude 3.7 Sonnet (如果尖峰可能會降成 3.5)

Donation

文章都是我自己研究內化後原創,如果有幫助到您,也想鼓勵我的話,歡迎請我喝一杯咖啡 :laughing:

綠界科技ECPAY ( 不需註冊會員 )

alt tag

贊助者付款

歐付寶 ( 需註冊會員 )

alt tag

贊助者付款

贊助名單

贊助名單

License

MIT license

Installation

TypingMind
{
  "mcpServers": {
    "mcp-vscode-cline": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp@latest"
      ]
    }
  }
}

Use 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mcp-vscode-cline": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) to help me with this task?
用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP)
Sure. I read it.
Here is what I found using 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP).

Frequently asked questions

What is the 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP server used for?

用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP to TypingMind?

用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP provide in TypingMind?

用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If 用 Cline 在 VSCode or Claude 玩转 Model Context Protocol (MCP) requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇