<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MCP on YennJ12 Engineering Blog</title><link>https://yennj12.js.org/yennj12_blog_V4/tags/mcp/</link><description>Recent content in MCP on YennJ12 Engineering Blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 04 Jul 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://yennj12.js.org/yennj12_blog_V4/tags/mcp/feed.xml" rel="self" type="application/rss+xml"/><item><title>Building MCP Servers for Claude Code Development - Part 1</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/building-mcp-servers-claude-code-development-part1/</link><pubDate>Sat, 27 Sep 2025 10:00:00 +0000</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/building-mcp-servers-claude-code-development-part1/</guid><description>Complete guide to setting up Model Control Protocol (MCP) servers for Claude Code, from basic configuration to building custom tools that enhance your AI-powered development workflow.</description></item><item><title>FDE 面試準備指南（二）：Agent System Design</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part2-agent-zh/</link><pubDate>Sat, 30 May 2026 10:30:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part2-agent-zh/</guid><description>RAG 是知識，Agent 是行動。
FDE 的工作常常是兩者都要。
Agent 面試的考點不是「你能不能架起來」，
而是「你知不知道它什麼時候會出問題，以及出了問題你怎麼設計讓它不失控」。
面試情境 面試官：「請設計一個 AI 客服系統，能夠查詢訂單狀態、回答 FAQ、在必要時轉接人工客服。然後告訴我：你的 Agent 如果陷入無限循環，你的架構怎麼防止它失控？」
一、Agent 的本質：LLM + Tools + Loop 用一句話說：
Agent = LLM + Tools + Loop
LLM 負責決策，Tools 負責執行，Loop 讓它反覆思考直到完成任務。
最主流的 Loop 模式叫 ReAct（Reasoning + Acting）：
用戶：「我的訂單 #456 到了嗎？」 │ ▼ Thought：「我需要查 CRM 確認訂單狀態」 │ ▼ Action：call_tool(&amp;#34;get_order&amp;#34;, order_id=&amp;#34;456&amp;#34;) │ ▼ Observation：「訂單 #456 狀態：出貨中，預計明天到達」 │ ▼ Thought：「我已經有答案了，可以回覆用戶」 │ ▼ Action：final_answer(&amp;#34;您的訂單 #456 目前正在出貨，預計明天到達&amp;#34;) Reason → Act → Observe → 再 Reason，這個循環一直跑到任務完成或觸發終止條件。</description></item><item><title>AI Forward Deployed Engineer 必備技能指南（二）：多智慧體系統與框架實戰</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/ai-fde-essential-guide-part2-zh/</link><pubDate>Tue, 26 May 2026 16:55:10 +0900</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/ai-fde-essential-guide-part2-zh/</guid><description>前言 多智慧體系統是現代 AI 應用的重要發展方向，能夠處理複雜的企業級任務。作為 AI FDE，掌握多智慧體框架的設計與實作是核心技能之一。本文將深入探討 LangGraph、CrewAI 等主流框架，以及 Model Context Protocol (MCP) 的實際應用。
1. 多智慧體系統核心概念 基礎架構原理 Agent 核心組件：
感知器 (Perception)：接收與理解環境信息 決策器 (Decision Making)：基於目標與狀態規劃行動 執行器 (Action)：與環境互動執行任務 記憶體 (Memory)：儲存狀態、經驗與知識 協作模式：
1from enum import Enum 2from dataclasses import dataclass 3from typing import List, Dict, Any 4 5class CoordinationPattern(Enum): 6 SEQUENTIAL = &amp;#34;sequential&amp;#34; # 順序執行 7 PARALLEL = &amp;#34;parallel&amp;#34; # 並行執行 8 HIERARCHICAL = &amp;#34;hierarchical&amp;#34; # 階層式管理 9 COLLABORATIVE = &amp;#34;collaborative&amp;#34; # 協作式決策 10 11@dataclass 12class AgentTask: 13 task_id: str 14 description: str 15 agent_id: str 16 dependencies: List[str] 17 priority: int 18 metadata: Dict[str, Any] 19 20class MultiAgentOrchestrator: 21 def __init__(self, coordination_pattern: CoordinationPattern): 22 self.</description></item><item><title>Advanced MCP Server Development with Database Integration - Part 2</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/building-advanced-mcp-servers-claude-code-part2/</link><pubDate>Sat, 27 Sep 2025 10:00:00 +0000</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/building-advanced-mcp-servers-claude-code-part2/</guid><description>Advanced MCP server development covering database integration, REST API connectors, real-time data processing, and production deployment strategies for Claude Code development workflows.</description></item><item><title>FDE 面試準備指南（十七）：RKK 實戰——MCP 伺服器、Tool-Calling 安全與 OAuth 授權</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part17-mcp-tool-oauth-zh/</link><pubDate>Thu, 04 Jun 2026 10:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part17-mcp-tool-oauth-zh/</guid><description>MCP 不只是「讓 Agent 能呼叫更多工具」。
它是一個標準化的工具暴露協定，解決的核心問題是：
怎麼讓 Agent 在有授權控制的情況下，安全地代表用戶執行企業內部操作。
面試情境 面試官： 「JD 提到了 MCP。客戶希望 Agent 透過 MCP Server 調用 Salesforce 與 ERP 系統。某些 Tool-calling 需要特定員工的 OAuth 權限。你如何在 Agent 工作流中處理這個個人身分授權？如果發生憑證過期或 Tool Injection，你如何防禦？」
一、核心問題：為什麼 Tool-Calling 的授權比想像中複雜 傳統 API 呼叫的授權模型： User → Frontend → Backend (with service account key) ↑ 一個 key，所有人共用 問題：無法追蹤是誰做了什麼操作 Agent Tool-Calling 的授權需求： User A → Agent → Salesforce API ↑ 必須用 User A 的身分操作 原因： ├── Salesforce 的記錄所有者是 User A ├── 操作日誌要顯示 User A 做了什麼 └── User A 可能沒有修改某些欄位的權限 三個具體的授權挑戰：</description></item><item><title>AI 工程從零開始｜Phase 13 Part 1：MCP 與 API 整合 — AI 與真實世界的介面</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/ai-eng-from-scratch-phase13-part1-mcp-apis-zh/</link><pubDate>Sun, 21 Jun 2026 21:30:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/ai-eng-from-scratch-phase13-part1-mcp-apis-zh/</guid><description>大多數人把 LLM 接上 API，然後祈禱模型不要亂呼叫。 正確做法是：設計工具邊界，讓模型只能做它該做的事。 差別不在「能不能呼叫」，而在「呼叫錯了有沒有圍欄」。 工具整合的本質，是在 LLM 的智能與外部世界的副作用之間建立可審計的閘門。
面試情境：你正在設計一個 AI 客服代理，需要讀取訂單資料庫、發送退款請求、查詢物流狀態。系統每日處理 5 萬通查詢，P99 回應要在 3 秒內。你怎麼設計工具層的架構，同時確保安全性與可觀測性？
一、核心問題：LLM 如何安全地操作外部世界 純語言模型是無狀態的文字轉換器，它不知道今天幾號，不知道訂單狀態，也無法真正寄出一封信。但產品需求要求 AI 能夠「做事」，不只是「說話」。
這個落差催生了工具使用（Tool Use）這個範式。但工具使用帶來的不只是能力擴展，更帶來三個深層工程挑戰：
挑戰一：副作用不可逆性 模型呼叫 send_email() 後，信就出去了。模型呼叫 delete_record() 後，資料就消失了。不像純 LLM 呼叫可以重試，帶有副作用的工具呼叫必須有 idempotency 保護和操作審計。
挑戰二：工具定義爆炸 一個企業 AI 代理可能需要整合 30+ 個內外部 API。每個工具的參數 Schema 、認證方式、錯誤處理各不相同。沒有標準化協議，工具層會變成難以維護的義大利麵程式碼。
挑戰三：提示注入攻擊 當工具的輸出結果（如網頁內容、資料庫紀錄）重新進入 LLM 上下文時，惡意內容可以偽裝成工具結果，誘導模型執行非預期的指令——這是 AI 系統特有的 injection 攻擊面。
MCP（Model Context Protocol）的出現，正是為了系統性地解決這三個問題。
二、三個演進階段 Phase 1：POC（&amp;lt; 5K 用戶，單一工具） ╔══════════════════════════════════════════╗ ║ Phase 1：直接呼叫 API（POC 階段） ║ ╚══════════════════════════════════════════╝ 用戶輸入 │ ▼ ┌────────────┐ Function ┌──────────────────┐ │ LLM API │─────Calling────▶│ 直接呼叫外部 API │ │ (GPT-4o) │◀────結果────────│ (requests 庫) │ └────────────┘ └──────────────────┘ │ ▼ 回應輸出 特徵： - 工具定義寫死在 system prompt - 無認證管理，API key 硬編碼 - 無錯誤重試，失敗直接拋例外 - 無日誌，難以除錯 適合場景：內部 Demo、單一 API 的 Chatbot</description></item><item><title>Anthropic Financial Services 入門 Part 2 — Agent、Skill、Command、Connector 是怎麼組成一個系統的</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/anthropic-financial-services-intro-part2-concepts-zh/</link><pubDate>Sat, 04 Jul 2026 10:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/anthropic-financial-services-intro-part2-concepts-zh/</guid><description>大部分「AI Agent 框架」的第一個問題是:互動模式(chat)和自動化模式(headless)得寫兩套邏輯。 financial-services 的做法是:同一份 system prompt、同一組 skill,兩邊共用,只是包裝層不同。 這篇講清楚它是怎麼切出 Agent / Skill / Command / Connector 四層,讓這件事成立的。
一、核心問題:一份系統提示,兩種跑法 Claude Cowork 是互動式的,人全程在迴圈裡,隨時可以插話。Claude Managed Agents API 是 headless 的,接到你自己的批次工作流引擎裡跑,沒有人盯著。
如果這兩種模式各寫一套 prompt 和邏輯,維護成本會隨 Agent 數量線性爆炸——改一個 skill,要同步改兩個地方,遲早會漂移。
錯誤做法(兩套維護) ───────────────────────────── Cowork prompt.md ──╮ ├─ 各自維護,容易漂移 Managed prompt.md ──╯ financial-services 做法(一份來源) ───────────────────────────── agents/&amp;lt;slug&amp;gt;.md + skills/ │ ├──▶ Cowork 直接讀這個目錄 └──▶ managed-agent-cookbooks/&amp;lt;slug&amp;gt;/ 引用同一份檔案 scripts/sync-agent-skills.py 和 scripts/check.py 的存在就是為了守住這個「單一事實來源」——後者會在 CI 檢查任何 Agent 綁定的 skill 有沒有跟 vertical 裡的原始版本「漂移」。
二、五層架構總覽 ┌───────────────────────────────────────────────────────────┐ │ Agents(命名的端到端工作流,如 Pitch Agent、GL Reconciler)│ │ plugins/agent-plugins/&amp;lt;slug&amp;gt;/ │ │ ── 自包含:把它用到的 skill 都打包進來 │ └───────────────────┬───────────────────────────────────────┘ │ 綁定/呼叫 ▼ ┌───────────────────────────────────────────────────────────┐ │ Skills(領域知識與步驟方法,Claude 自動判斷何時使用) │ │ plugins/vertical-plugins/&amp;lt;vertical&amp;gt;/skills/ ← 原始來源 │ │ plugins/agent-plugins/&amp;lt;slug&amp;gt;/skills/ ← 同步副本 │ └───────────────────┬───────────────────────────────────────┘ │ 部分 skill 對應 ▼ ┌───────────────────────────────────────────────────────────┐ │ Commands(手動觸發的 slash action,如 /comps、/dcf) │ │ plugins/vertical-plugins/&amp;lt;vertical&amp;gt;/commands/ │ └───────────────────┬───────────────────────────────────────┘ │ 讀寫外部資料 ▼ ┌───────────────────────────────────────────────────────────┐ │ Connectors(MCP Server,接資料商:FactSet、Moody&amp;#39;s.</description></item><item><title>Anthropic Financial Services 入門 Part 1 — 怎麼安裝、怎麼用</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/anthropic-financial-services-intro-part1-usage-zh/</link><pubDate>Sat, 04 Jul 2026 09:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/anthropic-financial-services-intro-part1-usage-zh/</guid><description>大部分團隊想用 LLM 做財務分析,第一步是自己從零寫 prompt、兜資料源、堆流程。 正確的起手式是:先看有沒有人已經把這套流程做成可重複使用的 Agent。 anthropics/financial-services 就是 Anthropic 官方把「投銀、研究、私募、財管」最常見工作流程包好的參考實作。 裝上去、調參數,比從空白 prompt 開始快得多。
一、這個套件解決什麼問題 金融業的分析工作有一個共通結構:輸入一堆非結構化資料(財報、CIM、GP 報告、KYC 文件),經過固定的分析步驟,產出一份要給人審核的工作成果(模型、備忘錄、對帳表)。
典型金融分析工作流程 ───────────────────────────────────────── 財報 / 文件 / 資料源 │ ▼ 固定分析步驟(comps、DCF、對帳、KYC 規則) │ ▼ 工作成果草稿(memo / model / deck) │ ▼ 人工審核與簽核 ← 必要,不可跳過 這個流程本身重複性很高,但每個環節都需要領域知識(怎麼抓可比公司、怎麼算 WACC、怎麼追帳目斷點)。financial-services 這個 repo 就是把這些領域知識寫成 Claude 的 Skill 和 Slash Command,再包成 Agent。
[!IMPORTANT] 這些 Agent 產出的是分析師工作草稿——模型、備忘錄、對帳結果——供合格專業人員審核。它們不做投資建議、不執行交易、不核准開戶,每一份輸出都停在「待人工簽核」這一步。
二、兩種部署方式,同一套系統 這是這個 repo 最重要的設計決定:同一份 system prompt、同一組 skill,可以用兩種方式跑。
┌─────────────────────────┐ ┌─────────────────────────┐ │ Claude Cowork │ │ Claude Managed Agents │ │ (互動式,人在迴圈中) │ │ API(headless,接你自己 │ │ │ │ 的工作流引擎) │ └────────────┬─────────────┘ └────────────┬─────────────┘ │ │ └──────────────┬───────────────────────┘ ▼ plugins/agent-plugins/&amp;lt;slug&amp;gt;/ 同一份 agents/&amp;lt;slug&amp;gt;.</description></item><item><title>SpotifyMCP2: Control Spotify with Claude via the Model Context Protocol</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/spotifymcp2-claude-spotify-mcp-server/</link><pubDate>Tue, 24 Feb 2026 11:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/spotifymcp2-claude-spotify-mcp-server/</guid><description>SpotifyMCP2 is a TypeScript MCP server that gives Claude direct control over Spotify — search tracks, manage playback, browse playlists, and queue songs through natural language. Built with full OAuth2, automatic token refresh, and 95%+ test coverage.</description></item><item><title>InvestSkill: Professional Investment Analysis Plugin for Claude Code</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/investskill-claude-code-financial-analysis-plugin/</link><pubDate>Tue, 17 Feb 2026 10:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/investskill-claude-code-financial-analysis-plugin/</guid><description>Discover InvestSkill, a comprehensive Claude Code plugin marketplace that brings professional investment analysis and stock evaluation capabilities directly into your AI development workflow. From fundamental analysis to technical indicators, transform Claude into your personal financial analyst.</description></item><item><title>Everything Claude Code: The Ultimate Production-Ready Plugin Collection Guide</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/everything-claude-code-setup-best-practices/</link><pubDate>Sat, 24 Jan 2026 16:30:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/everything-claude-code-setup-best-practices/</guid><description>Master the everything-claude-code repository: a comprehensive collection of production-ready agents, skills, hooks, and MCP configurations evolved over 10+ months of intensive use. Learn setup, best practices, and advanced techniques to supercharge your Claude Code workflow.</description></item><item><title>深入理解 Claude Code 架構：Plugin、Skill、Sub-agent 與 MCP 完整指南</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/claude-code-architecture-explained-zh/</link><pubDate>Sat, 17 Jan 2026 10:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/claude-code-architecture-explained-zh/</guid><description>完整解析 Claude Code 的核心架構元件：從底層的 MCP 協議到高層的 Sub-agent，了解 Plugin、Skill、Sub-agent 與 MCP 的運作原理、使用時機與層級關係。</description></item></channel></rss>