<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Landice Fu on Medium]]></title>
        <description><![CDATA[Stories by Landice Fu on Medium]]></description>
        <link>https://medium.com/@landicefu?source=rss-6c05e81fd29d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WjmK__HMeKppIMeTPTcU9w.jpeg</url>
            <title>Stories by Landice Fu on Medium</title>
            <link>https://medium.com/@landicefu?source=rss-6c05e81fd29d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 04:02:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@landicefu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Model Context Protocol (MCP): Practical Guide and Experience Sharing]]></title>
            <link>https://medium.com/@landicefu/what-exactly-is-model-context-protocol-mcp-809c22b09139?source=rss-6c05e81fd29d------2</link>
            <guid isPermaLink="false">https://medium.com/p/809c22b09139</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-coding]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <dc:creator><![CDATA[Landice Fu]]></dc:creator>
            <pubDate>Wed, 05 Mar 2025 15:33:26 GMT</pubDate>
            <atom:updated>2025-03-06T04:55:57.023Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>This is my first Medium article, and I plan to write a series sharing my experiences using <strong>agentic AI coding tools</strong> in daily development. This is not just simple sharing but also a way to organize my thoughts and help me document how development methods evolve over time.</p><p>These articles won’t be organized as tutorials but will be written based on the most needed content at the time. Recently, I’ve shared various AI tools and techniques within my company multiple times, discussing how to make AI-assisted development more efficient and stable. During exchanges with different people, I often need to repeatedly explain the same concepts, which is the main reason I decided to start writing these articles — so people can read and share them with others.</p><p>According to my current development process, most of the code is generated by AI, and documents and articles are no exception. Of course, this article is no exception — much of the content is AI-generated. However, the main content still comes from my real experiences, and I carefully proofread and edit it. If you find any errors, please feel free to point them out, and I will correct them immediately to avoid misleading others.</p><p>My technical articles will be published in <strong>both English and Chinese</strong> (at least this series will be). The main reason is that my company is an American company operating in Taiwan, so some colleagues only read English.</p><p>Finally, I would like to thank my company <strong>Cardinal Blue Software (PicCollage)</strong> for allowing us to freely use various AI tools without worrying about additional costs (I often use tokens worth over $40 per day). If you’re interested in our company, feel free to visit our website, and you might find a position that suits you!</p><h3>What is MCP?</h3><p>Looking at the name, Model Context Protocol (MCP) is not intuitive. It has existed for some time, but the initial explanations were often confusing. Honestly, I think the name isn’t very good because it doesn’t intuitively connect to known concepts.</p><p>This article won’t delve into the background information of MCP, except that it’s a technology developed by Anthropic (Claude’s company). I will only explain what it can be used for from a purely technical perspective and based on my understanding.</p><h3>Core Concepts of MCP</h3><p>Simply put, <strong>MCP turns your tools or scripts into tools that AI can directly call</strong>. Of course, you might ask:</p><blockquote><em>“Why not just let AI use those scripts directly?”</em></blockquote><p>This is a question I’ve been asked frequently recently. Interestingly, when I first encountered MCP, I didn’t even think about this question. I just wanted to test its feasibility, so I directly had AI write an MCP Server in Roo Code that I would use in daily development. After using it extensively, I immediately discovered that the advantages were far more than I had imagined.</p><h3>Practical Use Case</h3><p>Before diving into the benefits of MCP Server, let me give a practical use case:</p><blockquote><strong><em>Please help me read a prompt for analyzing startup software ideas from my prompt book, follow its instructions to analyze the software concept in the current </em></strong><strong><em>README.md, then send the analysis results to the company Slack channel </em></strong><strong><em>#new-idea, and tag John.</em></strong></blockquote><p>What steps are included in this request?</p><ol><li><strong>Read the appropriate analysis prompt from the prompt book</strong> and ensure AI follows the instructions.</li><li><strong>Read </strong><strong>README.md</strong> and extract the idea.</li><li><strong>Analyze the </strong><strong>README.md content according to the prompt and write the results</strong>.</li><li><strong>Send the analysis results to Slack and tag John</strong>.</li></ol><p>Almost all of these actions can be completed through scripts, with the only variable being the LLM (Claude) responsible for analyzing the content. Now, if we use scripts to execute this, the prompt might become:</p><blockquote><strong><em>Please run </em></strong><strong><em>read_from_notion_prompt_database.py to search for prompts related to startup ideas, then follow the prompt to analyze the idea in </em></strong><strong><em>README.md. After analysis, use </em></strong><strong><em>send_slack_message.py to send the results to </em></strong><strong><em>#new-idea and tag John.</em></strong></blockquote><p>This doesn’t seem too different, but do you know how Claude would handle it? It would start reading the code of these scripts, trying to understand their <strong>inputs</strong> and <strong>outputs</strong>, and then treat the content of these scripts as context to read. Instantly, your token usage would surge, leading to increased costs.</p><p>Let me give another extreme example: if you have a script that executes ffmpeg commands. If it prints all stdio results, the LLM will receive a large amount of garbage information when the task is completed. All this output will occupy the context window. Worse, you’ll have to pay for this garbage information.</p><p>In the end, the task might still be completed, but would you prefer to manually execute these scripts yourself, or let AI help you execute them once and spend $1? At this point, the question becomes: is this method really efficient?</p><h3>Problems with Traditional Script Methods</h3><p>Now, let’s think more carefully about what other problems exist with traditional methods:</p><h3>1. Context Window Limitations</h3><p>Having agents use scripts rapidly increases token usage, leading to <strong>higher costs</strong>.</p><h3>2. Low Execution Efficiency</h3><p>Every time AI needs to use these tools, it has to re-read the scripts, unless it’s in the same conversation session, otherwise it can’t remember the content of the scripts.</p><h3>3. Tool Management Burden</h3><p>Should these scripts be placed in the repository or in the PATH as executables? But then tools wouldn’t be able to read the script content to ensure correct execution, as that would pose security issues, so most tools don’t allow this. In that case, do you need to copy these scripts into every project? Is this management approach really easier?</p><h3>4. Stability Issues</h3><p>Claude might misunderstand script parameters, causing some scripts to fail. For example, if send_slack_message.py requires a JSON-formatted Slack Webhook request, Claude might misinterpret the format, causing the request to fail.</p><p>In my experience, using MCP Servers for this is basically zero-failure. You can complete very complex tasks with <strong>very few tokens</strong> in a <strong>short time</strong> and <strong>almost never make mistakes</strong>.</p><h3>Advantages of MCP</h3><p>The reason MCP can solve the problems of traditional script methods lies in its design. MCP provides the LLM agent with only descriptions of each tool, the parameters needed, and parameter specifications. This design allows AI to efficiently understand how to use these tools without parsing the entire script content, further improving execution efficiency.</p><h3>1. Reduced Token Consumption, Fewer Context Limitations</h3><p>In traditional methods, every time AI needs to use a script, it needs to first “read” the script’s content to understand its input and output, which occupies a large amount of context window space and increases token costs. MCP provides a more efficient method.</p><p>MCP allows AI to directly use predefined tools without having to re-read the script content each time. For example, when AI needs to send a Slack message, it only needs to execute the send_slack_message command defined in MCP, without analyzing the script&#39;s code.</p><p>This approach allows AI to execute commands faster and more precisely, without consuming a large number of tokens to interpret the script’s logic, thereby reducing costs.</p><h3>2. Improved Execution Efficiency</h3><p>Under the MCP architecture, AI only needs to send one request, and the MCP Server will handle the entire execution process, without requiring AI to re-read and understand the script’s logic.</p><p>The implementation behind these tools is completely controllable code, the same as the original scripts. After the LLM sends an execution request, everything that happens until the result returns is irrelevant to the AI.</p><h3>3. Reduced Tool Management Burden</h3><p>MCP Servers and their tools come with descriptions, so once simple setup is completed, the LLM can basically fully understand what tools are available and how to use them through the list_tool function. If necessary information is missing, it will even actively request it to ensure smooth execution. This is a huge advantage, making AI more intuitive and stable when using MCP.</p><p>Traditional script methods require storing scripts within the project and ensuring environment variables or PATH settings are correct, which increases maintenance costs. MCP allows you to centrally manage all tools and provide an API interface through the MCP Server, making it easy for AI or other developers to access these tools.</p><p>MCP makes tools function like API services, operating through standard input and output formats. For example, your MCP Server can expose an /read_prompt endpoint, and AI only needs to send an API request without dealing with script details.</p><p>The same tool can be used in different software, and more and more software supports MCP, such as:</p><ul><li>Claude desktop application</li><li>Cline</li><li>Roo Code</li><li>Cursor</li></ul><p>You can design useful tools, set them up for colleagues, and bring tremendous help even if they’re not developers.</p><p>Additionally, providing various tools to the LLM allows it to combine them based on prompts to achieve goals, which was almost impossible in the past. Now, many complex workflows can increasingly be automated by LLMs.</p><h3>4. Improved Stability, Reduced Error Rate</h3><p>LLMs like Claude may misunderstand script parameters when executing traditional script methods. For example, some scripts require JSON-formatted input, but AI might generate incorrect formats, causing execution failures.</p><p>MCP standardizes tool inputs and outputs, so AI only needs to provide clear parameters without parsing script content. For example:</p><pre>call_tool(&quot;send_slack_message&quot;, {&quot;channel&quot;: &quot;#new-idea&quot;, &quot;message&quot;: &quot;Analysis results&quot;, &quot;mention&quot;: &quot;John&quot;})</pre><p>This way, AI only needs to provide parameters, and the MCP Server handles all the details, avoiding LLM parsing errors.</p><h3>Practical Applications of MCP in Development</h3><p>Based on these advantages, I have deeply integrated MCP Servers into my daily development workflow. Whenever there’s a part of the development process that can be written once and reused, I immediately convert it into an MCP tool. Here are some practical application cases:</p><h3>1. Managing Complex Prompts</h3><p>In some existing projects, especially those with extensive context or legacy issues, it’s not easy to have AI successfully complete tasks with brief prompts. Sometimes, to prevent AI from choosing incorrect reference files on its own, I need to guide it through more complex prompts.</p><p>In the past, I would manage a Notion database to store these prompts and manually copy and paste them. Now, I only need to let the LLM search for appropriate prompts in my prompt book and then execute the relevant instructions on its own, with the entire process requiring no manual operation.</p><h3>2. ADB Operations (Open Source Project)</h3><p>ADB (Android Debug Bridge) is a powerful command-line tool that allows developers to communicate with Android devices, such as installing applications, reading logs, simulating inputs, etc. As an Android engineer, I frequently need to operate devices through ADB and want AI to use these commands stably.</p><p>Although AI can directly use ADB commands, it might fail due to incorrect parameters. For example, when asking AI to open an application via ADB, it might provide an incorrect package name, making the command invalid. Therefore, I created an MCP Server that provides common ADB operations as tools, allowing LLM to execute them accurately with almost no errors.</p><p>In addition to these MCP Servers, I’ve set up many other tools, such as:</p><ul><li>Web search</li><li>Reading web content</li><li>Operating ClickUp (project management)</li><li>Managing Notion documents</li></ul><h3>When is MCP Server Not Suitable?</h3><p>Not all tools are suitable for conversion to MCP Servers. Here are some unsuitable situations:</p><ol><li><strong>Project-specific scripts</strong>: If a script is only applicable to a single project and cannot be generalized to other environments, it usually doesn’t need to be converted to an MCP Server.</li><li><strong>Fixed process tasks</strong>: When your requirements and processes are completely fixed, you should write this process as a script and execute it yourself, rather than wasting tokens asking LLM to execute it. Because the output of this script will also be read by the LLM, but often this information is not important, and it will almost certainly succeed.</li><li><strong>Tasks requiring creative thinking</strong>: Some things are actually more suitable as prompts, allowing LLM to have the opportunity to be creative, rather than writing it as a tool that reduces flexibility. You should focus more on the quality of prompts. You can use something like the prompt book server I made to efficiently provide complex prompts to greatly reduce your manual parts.</li></ol><h3>Conclusion</h3><p>MCP is not a completely new concept, but it provides a more efficient, low-cost way to integrate AI and tools. Through MCP, developers can more easily have AI perform various tasks without worrying about script management, context limitations, or parsing errors.</p><p>The main advantages of MCP include:</p><ul><li>Reduced token consumption</li><li>Improved execution efficiency</li><li>Reduced tool management burden</li><li>Improved stability, reduced error rate</li></ul><p>However, not all processes and tools are suitable for conversion to MCP Servers, and the best solution should be evaluated based on requirements.</p><p>In subsequent articles, I will explore the technical implementation of MCP in more depth and share the design of MCP Servers. If you’re interested in this technology, feel free to follow my articles and share your thoughts in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=809c22b09139" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Model Context Protocol (MCP) — 我的使用經驗 (1)]]></title>
            <link>https://medium.com/@landicefu/model-context-protocol-mcp-%E6%88%91%E7%9A%84%E4%BD%BF%E7%94%A8%E7%B6%93%E9%A9%97-1-c9d8147de937?source=rss-6c05e81fd29d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9d8147de937</guid>
            <category><![CDATA[ai-coding]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <dc:creator><![CDATA[Landice Fu]]></dc:creator>
            <pubDate>Wed, 05 Mar 2025 15:25:48 GMT</pubDate>
            <atom:updated>2025-03-06T04:55:04.178Z</atom:updated>
            <content:encoded><![CDATA[<h3>Model Context Protocol (MCP): 實用指南與經驗分享</h3><h3>前言</h3><p>這是我第一篇 Medium 文章，計劃寫一系列分享我在日常開發中使用 <strong>Agentic AI coding tools</strong> 的經驗。這不僅是單純的分享，也是整理思緒的方式，幫助我記錄開發方法隨時間的演變。</p><p>這些文章不會按照教學的方式來組織，而是根據當下最需要的內容來撰寫。最近，我在公司內部多次分享了各種 AI 工具和技巧，討論如何讓 AI 輔助的開發更加高效與穩定。在與不同人的交流中，我經常需要反覆解釋相同的概念，這也是我決定開始寫這些文章的主要原因 — 讓人們能夠閱讀並分享給其他人。</p><p>根據我目前的開發流程，大部分的程式碼都是由 AI 產生的，文件和文章也不例外。當然這篇文章也不例外 — 許多內容是 AI 生成的。然而，文章的主要內容仍然來自我的真實經驗，我也會細心校對與編輯。如果你發現任何錯誤，請隨時指正，我會立即修正，以免誤導其他人。</p><p>我的技術文章都會以<strong>一篇英文、一篇中文</strong>的方式發布（至少這個系列會如此）。主要原因是我的公司是一家在台灣營運的美商公司，因此有些同事只閱讀英文。</p><p>最後，我想感謝我的公司 <strong>Cardinal Blue Software（拼貼趣）</strong>，讓我們能夠自由使用各種 AI 工具，而不必擔心額外的費用（我常常一天用掉的token就需要40美金以上）。如果你對我們的公司感興趣，歡迎造訪我們的網站，說不定你會發現適合你的職缺！</p><h3>MCP 是什麼？</h3><p>從名字來看，Model Context Protocol (MCP) 這個名稱並不直觀。它已經存在一段時間了，但剛開始的解釋總讓人一頭霧水。老實說，我覺得這個名字取得不太好，因為它並不能讓人直覺地聯想到已知的概念。</p><p>這篇文章不會深入介紹 MCP 的背景資訊，除了它是 Anthropic（Claude 的公司）開發的技術之外。我只會純粹從技術角度，以及我對它的理解，來說明它可以拿來做什麼。</p><h3>MCP 的核心概念</h3><p>簡單來說，<strong>MCP 就是把你的工具或 script 變成 AI 可直接調用的工具</strong>。當然，這時候你可能會問：</p><blockquote><em>「為什麼不直接讓 AI 使用那些 script，不就好了？」</em></blockquote><p>這是我最近經常被問到的問題。但有趣的是，當我一開始接觸 MCP 時，我根本沒想過這個問題。我當時只是想測試它的可行性，於是直接在 Roo Code 讓 AI 幫我寫了一個日常開發會用到的 MCP Server。結果在深入使用後，我立刻發現這樣做的優勢遠比我想像的多。</p><h3>實際使用案例</h3><p>在深入探討 MCP Server 的好處之前，我先舉一個實際的使用案例：</p><blockquote><strong><em>請幫我從我的 prompt book 讀取一個分析新創軟體 idea 用的 prompt，按照其中的指示，分析目前 </em></strong><strong><em>README.md 中的軟體概念，然後將分析結果發送到公司 Slack 頻道 </em></strong><strong><em>#new-idea，並標註 John。</em></strong></blockquote><p>這個請求中包含哪些步驟？</p><ol><li><strong>從 prompt book 讀取適合的分析 prompt</strong>，並確保 AI 遵循指示。</li><li><strong>讀取 </strong><strong>README.md</strong>，提取其中的 idea。</li><li><strong>根據 prompt 分析 </strong><strong>README.md 內容，並撰寫結果</strong>。</li><li><strong>將分析結果發送到 Slack，並標註 John</strong>。</li></ol><p>這些動作幾乎都可以透過 script 來完成，唯一的變數是 LLM（Claude）負責分析內容。現在，如果我們改用 script 來執行，prompt 可能會變成這樣：</p><blockquote><strong><em>請執行 </em></strong><strong><em>read_from_notion_prompt_database.py 搜尋與 startup idea 相關的 prompt，接著依照讀到的 prompt，分析 </em></strong><strong><em>README.md 中的 idea。分析完成後，透過 </em></strong><strong><em>send_slack_message.py 將結果發送到 </em></strong><strong><em>#new-idea，並標註 John。</em></strong></blockquote><p>這樣看起來並沒有太大差別，但你知道 Claude 會怎麼處理嗎？它會開始讀取這些 script 的程式碼，試圖理解它們的 <strong>input</strong> 和 <strong>output</strong>，然後把這些 script 的內容都當作 context 來讀取。一瞬間，你的 token 使用量就會暴增，導致成本上升。</p><p>舉另外一個極端例子，如果你有一個script會執行ffmpeg命令。如果它會把所有stdio的結果都印出來，那在完成的時候LLM將收到大量的垃圾資訊。這些輸出全都會佔用context window。更糟糕的是，你還需要為這些垃圾資訊付費。</p><p>最後，任務或許還是能完成，但你會願意選擇自己手動執行這些 script，還是讓 AI 幫你執行一次，然後花費 $1 美金？這時，問題就變成：這樣的方式真的有效率嗎？</p><h3>傳統 script 方法的問題</h3><p>現在再仔細想一想，傳統方法還有哪些問題？</p><h3>1. 上下文 (context window) 限制</h3><p>讓 agent 使用 script 會迅速增加 token 使用量，導致<strong>成本變高</strong>。</p><h3>2. 執行效率低</h3><p>每次要讓 AI 使用這些工具，它都需要重新讀取 script，除非是同一個對話階段，否則它無法記住 script 中的內容。</p><h3>3. 工具管理的負擔</h3><p>這些 script 是要放在 repository 裡，還是 PATH 裡作為執行檔？但是這樣工具就讀不到script的內容來確保正確執行，因為那會有安全性的問題，所以大部分工具都不允許這樣做。這樣的話，你是否需要在每個專案都複製這些 script？這樣的管理方式，真的更輕鬆嗎？</p><h3>4. 穩定性問題</h3><p>Claude 可能會錯誤理解 script 的參數，導致某些 script 失敗。例如，假設 send_slack_message.py 需要一個 JSON 格式的 Slack Webhook request，Claude 可能會誤解格式，導致請求傳送失敗。</p><p>以我的經驗，我現在用MCP Servers來做這件事情，基本上是零失敗的。你可以用<strong>很少的token</strong>在<strong>短時間內</strong>完成非常複雜的事情，而<strong>幾乎不會出錯</strong>。</p><h3>MCP 的優勢</h3><p>MCP 之所以能夠解決傳統 script 方法的問題，關鍵在於它的設計方式。MCP 提供給 LLM agent 的僅僅是各個 tool 的描述、這些 tool 需要的參數，以及參數的規範。這樣的設計讓 AI 可以高效率地理解如何使用這些工具，而無需解析完整的 script 內容，進一步提升執行效率。</p><h3>1. 降低 Token 消耗，減少上下文限制</h3><p>在傳統方法中，每次 AI 需要使用 script 時，都需要先「閱讀」script 的內容，以理解它的 input 和 output，這會占用大量的上下文空間 (context window)，並且增加 token 成本。而 MCP 則提供了一個更高效的方法。</p><p>MCP 讓 AI 可以直接使用已經定義好的工具，而不需要每次都重新讀取 script 的內容。例如，當 AI 需要發送 Slack 訊息時，它只需要執行 MCP 中定義好的 send_slack_message 指令，而不需要分析 script 的程式碼。</p><p>這種方式讓 AI 能夠更快、更精確地執行指令，並且不會消耗大量的 token 來解讀 script 的邏輯，進而降低成本。</p><h3>2. 提高執行效率</h3><p>在 MCP 的架構下，AI 只需發送一個請求，MCP Server 便會處理整個執行流程，不需要 AI 重新讀取、理解 script 的邏輯。</p><p>這些 tool 背後的實作則完全是可控的程式，與原本的 script 相同。在 LLM 送出執行請求後，直到結果返回，中間發生的所有過程都與 AI 無關。</p><h3>3. 減少工具管理的負擔</h3><p>MCP Server 與它的 tools 自帶描述，因此一旦完成簡單的設定後，LLM 基本上就能透過 list_tool 功能完全了解有哪些工具可用，以及如何使用這些工具。如果缺少必要的資訊，它甚至會主動要求提供，以確保執行順利無誤。這是一個極大的優勢，使 AI 在使用 MCP 時更加直覺且穩定。</p><p>傳統 script 方法需要將 script 存放在專案內，並確保環境變數或 PATH 設定正確，這增加了維護成本。而 MCP 允許你將所有工具集中管理，並透過 MCP Server 提供 API 介面，讓 AI 或其他開發人員可以輕鬆存取這些工具。</p><p>MCP 讓工具變得像 API 服務一樣，透過標準的輸入輸出格式運作。例如，你的 MCP Server 可以暴露一個 /read_prompt 端點，AI 只需發送一個 API 請求，而不需要處理 script 的細節。</p><p>同一個工具可以被用在不同的軟體中，有越來越多軟體支援 MCP，例如：</p><ul><li>Claude 桌面應用</li><li>Cline</li><li>Roo Code</li><li>Cursor</li></ul><p>你可以設計一些實用的工具，幫同事設定好以後，就算他們不是開發人員，也能帶來巨大的幫助。</p><p>此外，提供各種不同的 tool 給 LLM，讓 LLM 可以根據 prompt 自行組合來完成目標，這在過去幾乎是不可能做到的。現在，許多複雜的工作流程越來越能夠交給 LLM 來自動化執行。</p><h3>4. 提升穩定性，降低錯誤率</h3><p>Claude 等 LLM 在執行傳統 script 方法時，可能會錯誤理解 script 的參數。例如，某些 script 需要 JSON 格式的輸入，但 AI 可能會產生錯誤的格式，導致執行失敗。</p><p>而 MCP 透過標準化工具的輸入與輸出，使得 AI 只需要提供明確的參數，而不需要解析 script 的內容。例如：</p><pre>call_tool(&quot;send_slack_message&quot;, {&quot;channel&quot;: &quot;#new-idea&quot;, &quot;message&quot;: &quot;分析結果&quot;, &quot;mention&quot;: &quot;John&quot;})</pre><p>這樣 AI 只需提供參數，而 MCP Server 負責處理所有細節，避免 LLM 解析錯誤的問題。</p><h3>MCP 在開發中的實際應用</h3><p>基於這些優勢，我目前已經將 MCP Server 深度整合到我的日常開發流程中。只要開發流程中有可以寫一次並重複使用的部分，我就會立即將其轉換為 MCP tool。以下是一些實際應用案例：</p><h3>1. 管理複雜的 prompt</h3><p>在某些現有專案，尤其是有大量上下文或 legacy 問題的專案中，使用簡短的 prompt 讓 AI 成功完成任務並不容易。有時，為了避免 AI 自行選擇錯誤的參考檔案，我需要透過更複雜的 prompt 引導它。</p><p>過去，我會管理一個 Notion 資料庫來存放這些 prompt，並手動複製貼上。而現在，我只需要讓 LLM 在我的 prompt book 內搜尋適當的 prompt，然後自行執行相關指示，整個過程完全無需手動操作。</p><h3>2. ADB 操作 (<a href="https://github.com/landicefu/android-adb-mcp-server">open source</a>)</h3><p>ADB（Android Debug Bridge）是一個強大的命令行工具，允許開發者與 Android 設備進行通訊，例如安裝應用程式、讀取日誌、模擬輸入等。作為 Android 工程師，我經常需要透過 ADB 操作設備，也希望 AI 能夠穩定地使用這些指令。</p><p>雖然 AI 可以直接使用 ADB 指令，但可能會因為錯誤的參數導致失敗。例如，當要求 AI 透過 ADB 開啟某個應用程式時，它可能會提供錯誤的 package name，導致指令無效。因此，我建立了一個 MCP Server，提供常見的 ADB 操作作為工具，使 LLM 可以準確執行，幾乎不會出錯。</p><p>這個server提供了一個tool可以直接複製手機螢幕畫面到我Mac的剪貼簿，過去要做這件事稍微有點麻煩，但現在只要跟agent簡單講就能叫他複製到剪貼簿或是把圖片存到某個path。</p><h3>3. 其他</h3><p>除了這些 MCP Server，我還設置了許多其他工具，例如：</p><ul><li>網路搜尋</li><li>讀取網頁內容</li><li>操作 ClickUp (專案管理)</li><li>管理 Notion 文件</li></ul><h3>什麼情況不適合使用 MCP Server？</h3><p>並非所有的工具都適合轉換為 MCP Server。以下是一些不適合的情況：</p><ol><li><strong>專案特定的 script</strong>：若某個 script 只適用於單一專案，且無法通用於其他環境，則通常不需要轉換為 MCP Server。</li><li><strong>固定流程的任務</strong>：當你的需求與流程完全是固定的時候，你完全應該把這個流程寫成script，並且親自執行，而不是浪費token叫LLM去執行它。因為這個script的輸出，也都會被LLM讀過，但常常這些資訊根本不重要，而且幾乎一定會成功。</li><li><strong>需要創意思考的任務</strong>：有些東西其實比較適合是prompt，讓LLM有機會去發揮，而不是把它寫成tool來讓彈性變低。你更應該專注在prompt的quality。可以利用像是我做的prompt book server，高效率的提供複雜prompt來讓你手動的部分大幅減少。</li></ol><h3>結論</h3><p>MCP 並不是一個全新的概念，但它提供了一種更高效、低成本的方式來整合 AI 和工具。透過 MCP，開發者可以更輕鬆地讓 AI 執行各種任務，而無需擔心 script 管理、上下文限制或錯誤解析問題。</p><p>MCP 的主要優勢包括：</p><ul><li>降低 token 消耗</li><li>提高執行效率</li><li>減少工具管理的負擔</li><li>提升穩定性，降低錯誤率</li></ul><p>然而，並非所有的流程與工具都適合轉換為 MCP Server，應根據需求評估最佳方案。</p><p>在後續文章中，我將更深入探討 MCP 的技術實作，並分享 MCP Server 的設計。如果你對這項技術有興趣，歡迎關注我的文章，並在留言區分享你的想法！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9d8147de937" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>