將你的 MCP 封裝為 DXT,供非技術用戶使用
何時使用: 你不想要求用戶編輯 JSON 設定檔。
前置條件
- 可運作的 MCP 伺服器 — 先使用 mcp-python-sdk 或 mcp-go 建構
步驟
-
初始化清單Use DXT skill. Run
dxt initin my MCP repo. Walk me through the manifest fields.✓ 已複製→ manifest.json 已建立框架 -
宣告設定提示My MCP needs an API_KEY. Add it as a user-prompt config field in the manifest.✓ 已複製→ 帶描述的用戶提示欄位
-
建置並測試Run
dxt pack. Install in Claude Desktop. Verify config prompts appear.✓ 已複製→ .dxt 檔案安裝順利;提示正確渲染
結果: 你的 MCP 可以讓任何有 Claude Desktop 的人兩次點擊即可安裝。
注意事項
- 捆綁大小超過 100MB — 精簡依賴;使用 --node-version 避免捆綁龐大的 node 模組
搭配使用: mcp-python-sdk · mcp-go-mark3labs