Back to blog
    AI 機構客戶工作流程的 MCP 工具:以工具而非檔案交付模型
    mcpagencyclient-deliverytoolsfine-tuningsegment:agency

    AI 機構客戶工作流程的 MCP 工具:以工具而非檔案交付模型

    AI 機構通常交付一個模型檔案。有了 MCP,你可以交付客戶每天使用的 Claude Desktop 或 Cursor 工具——每日產生的價值足以支撐每月服務費。

    EErtas Team·

    大多數 AI 機構交付一個模型。他們遞交一個 GGUF 檔案、一份部署指南、一個 Ollama 命令。客戶執行模型,在幾週內獲得價值,然後模型閒置,因為將其整合到日常工作流程中需要客戶未預算的工作量。

    MCP 改變了交付模式。與其遞交模型檔案,不如遞交一個 Claude Desktop 或 Cursor 工具——一個你的客戶在 5 分鐘內安裝並每天作為其現有 AI 工作流程的自然延伸使用的已配置 MCP 伺服器。

    模型在你的基礎設施上執行。你對存取收費。價值每天交付。服務費自我驗證。

    機構交付的轉變

    舊的交付方式: 訓練模型 → 匯出 GGUF → 撰寫部署指南 → 客戶自行弄清楚如何執行它

    新的交付方式: 訓練模型 → 在你的 VPS 上部署 → 構建 MCP 伺服器 → 給客戶一個配置片段 → 客戶將其添加到 Claude Desktop → 完成

    客戶的設置是 4 行 JSON 和重啟 Claude Desktop。其餘的是你要維護的基礎設施。

    構建客戶就緒的 MCP 工具

    架構:

    客戶的 Claude Desktop / Cursor
        ↓ MCP 協議
    你的 MCP 伺服器(託管在你的 VPS 上)
        ↓ HTTP
    你的 Ollama 實例(託管客戶的微調模型)
    

    MCP 伺服器處理身份驗證(客戶的 API 金鑰)、路由(根據客戶身份呼叫哪個模型)和特定於此客戶用例的工具定義。

    多客戶 MCP 伺服器範本:

    // agency-mcp-server.mjs
    import { Server } from '@modelcontextprotocol/sdk/server/index.js';
    import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
    import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
    
    // 客戶登錄——將 API 金鑰映射到模型名稱和工具配置
    const CLIENT_CONFIG = {
      'client-a-key-xxxx': {
        modelName: 'real-estate-client-a-v3',
        tools: ['generate_listing', 'draft_followup', 'score_lead'],
        clientName: 'Sunrise Realty'
      },
      'client-b-key-yyyy': {
        modelName: 'ecommerce-client-b-v2',
        tools: ['product_description', 'support_response', 'classify_ticket'],
        clientName: 'BlueLine Commerce'
      }
    };
    
    const TOOL_DEFINITIONS = {
      generate_listing: {
        name: 'generate_listing',
        description: '以我們仲介公司的語調為 Sunrise Realty 產生房產房源描述。',
        inputSchema: {
          type: 'object',
          properties: {
            property_details: { type: 'string', description: '臥室數、浴室數、面積、功能、地段' }
          },
          required: ['property_details']
        }
      },
      draft_followup: {
        name: 'draft_followup',
        description: '起草給房地產聯繫人的個性化跟進訊息。',
        inputSchema: {
          type: 'object',
          properties: {
            contact_context: { type: 'string', description: '這是誰,關係,上次互動,任何新聞' },
            goal: { type: 'string', description: '你想用這條訊息達成什麼' }
          },
          required: ['contact_context']
        }
      },
      // ... 其他工具
    };
    
    // API 金鑰透過 Claude Desktop 配置中的環境變數傳遞
    const API_KEY = process.env.AGENCY_API_KEY;
    const client = CLIENT_CONFIG[API_KEY];
    
    if (!client) {
      process.stderr.write('Invalid API key\n');
      process.exit(1);
    }
    
    const server = new Server(
      { name: `agency-tools-${client.clientName}`, version: '1.0.0' },
      { capabilities: { tools: {} } }
    );
    
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: client.tools.map(toolName => TOOL_DEFINITIONS[toolName])
    }));
    
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      if (!client.tools.includes(name)) {
        throw new Error(`Tool ${name} not available for your account`);
      }
    
      const prompt = buildPrompt(name, args);
    
      const response = await fetch('http://localhost:11434/api/chat', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          model: client.modelName,
          messages: [{ role: 'user', content: prompt }],
          stream: false
        })
      });
    
      const data = await response.json();
      return { content: [{ type: 'text', text: data.message.content }] };
    });
    
    function buildPrompt(toolName, args) {
      const prompts = {
        generate_listing: `撰寫以下房產的房源描述:\n${args.property_details}`,
        draft_followup: `起草跟進訊息。\n上下文:${args.contact_context}\n目標:${args.goal || '維護關係'}`,
        // ... 其他提示構建器
      };
      return prompts[toolName] || JSON.stringify(args);
    }
    
    const transport = new StdioServerTransport();
    await server.connect(transport);

    客戶端設置(你傳送給客戶的內容)

    // claude_desktop_config.json 片段——你提供這個給客戶
    {
      "mcpServers": {
        "agency-tools": {
          "command": "node",
          "args": ["/path/to/agency-mcp-client.mjs"],
          "env": {
            "AGENCY_API_KEY": "client-a-key-xxxx",
            "AGENCY_SERVER_URL": "https://mcp.youragency.com"
          }
        }
      }
    }

    或者如果你將其打包為 npm 二進位以使設置更簡單:

    {
      "mcpServers": {
        "your-agency-name": {
          "command": "npx",
          "args": ["@youragency/mcp-client"],
          "env": {
            "API_KEY": "client-a-key-xxxx"
          }
        }
      }
    }

    客戶執行一次 npx @youragency/mcp-client(或透過 npx 自動安裝),添加配置,重啟 Claude Desktop。完成。

    服務費的正當理由

    沒有 MCP: 客戶有一個 GGUF 檔案。他們偶爾執行它。價值是偶發的。服務費感覺像是在為他們每天不使用的東西付費。

    有了 MCP: 客戶每次打開 Claude Desktop 時都使用你的工具。他們產生的每個房源、起草的每封跟進信、分類的每張票——你的機構工具都在工作流程中。價值是每日可見的。

    按工具存取的服務費層級:

    • 基本($400/月):2 個工具,每季度重新訓練,電子郵件支援
    • 標準($700/月):5 個工具,每月重新訓練,Slack 支援
    • 高級($1,200/月):無限工具,每週模型更新,優先支援

    「工具」框架比「模型維護」框架對客戶更直觀。他們在為每天使用的工具存取付費。


    Ship AI that runs on your users' devices.

    Ertas early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.

    延伸閱讀

    Ship AI that runs on your users' devices.

    Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.

    Keep reading