ChatGPT Custom Connector 連接設定
CatDesk 在本機跑好 MCP 伺服器之後,最後一步是讓 ChatGPT 網頁版連上它。Custom Connector (自訂連接器) 是 ChatGPT Plus 與 Pro 訂閱者的功能。本文記錄完整的設定步驟、權限選擇,以及幾個常見的疑難排解。
前置條件:CatDesk TUI 已顯示 MCP Server URL。
連接步驟
1. 開啟 Connector 設定頁面
chatgpt.com/plugins#settings/Connectors?create-connector=true
2. 填寫 Connector 表單
| 欄位 | 填法 |
|---|---|
| Name | CatDesk 或任何你喜歡的名字 |
| MCP Server URL | 貼上 CatDesk TUI 顯示的完整 URL |
| Authentication | None |
3. 建立並連接
- 點 I understand and want to continue
- 點 Create
- 點 Connect
4. 選擇權限等級
| 權限 | 行為 |
|---|---|
| Allow read actions(預設) | 只允許唯讀操作,安全但功能有限 |
| Allow all actions(建議) | 相當於 Codex 的 --yolo 模式,CatDesk 完整可用。請謹慎使用 |
5. 加入 Custom Instructions
在 ChatGPT 的 Custom instructions (自訂指令) 中貼上這段,讓 ChatGPT 知道何時該用 CatDesk:
CatDesk is a coding tool and a custom connector. Always use CatDesk if the user wants to do anything related to file operations. Always call `catdesk_instruction` after `list_resources`, and follow the instructions it contains.
使用小技巧
- 讓 ChatGPT 自動選擇 Connector。手動用
/或@指定 Connector 會停用web.search與web.open,網頁工具和自訂 Connector 無法同時使用。 - 每個小功能開新 session。超過 50 次以上工具呼叫後,ChatGPT 網頁版會變得非常卡(觀察到 3.9 GB 記憶體用量)。若需要上下文,請 ChatGPT 產生一份 handoff note (交接筆記) 再貼進新 session。
修改 MCP 設定之後
若你變更了 MCP 相關設定(工具模式 tool mode 或 widget 開關):
- 開新的 chat
- 在 ChatGPT 設定中重新整理 CatDesk
最可靠的做法:移除並重新安裝 Connector(重跑上面步驟 2 到 3)。
疑難排解
Connector 一直要求重新 Connect
ChatGPT 有時會沒來由地再次跳出 Connect 要求,沒有明顯規律,與工具呼叫次數無關。這是上游 bug,已修復。遇到就再點一次 Connect。
Widget 空白
- 重新整理頁面並重新連接 Connector
- 若還是不行,停止目前的回應,重新發送訊息
這是 ChatGPT 端的 bug(約 4 月 15 日引入),不是 CatDesk 的問題。
移除紅色 CSP 按鈕
打開 Advanced connector settings,開啟 Enforce CSP in developer mode,紅色按鈕就會消失。CatDesk 會自動把目前的 ngrok domain 加入 widget 的 CSP (Content Security Policy) 白名單。