01 / DECIDE
架構決策
適合連接受治理的外部能力或資料,不必把每個整合重寫成 custom function。
啟用前盤點 server identity、transport、authentication、exposed tools、returned data、approval 與 failure behavior。 先把 input、output、state 與 side effect 畫成一條可觀察路徑,再決定 把 MCP server 當成外部 principal 要放在哪一層。
02 / BUILD
三步實作
- 01
框定合約
先寫下 caller、資料分類、成功條件、timeout、取消與 ownership。適合連接受治理的外部能力或資料,不必把每個整合重寫成 custom function。
- 02
建立單一路徑
只實作一條 end-to-end path,保留 request correlation、typed state 與可逆 failure handling。啟用前盤點 server identity、transport、authentication、exposed tools、returned data、approval 與 failure behavior。
- 03
證明結果
把驗收寫成可重跑的 fixture、contract test 或 browser test。Negative test 證明 untrusted server、changed schema、expired credential 與 injected content 都能安全失敗。
03 / BOUND
Production 邊界
只連接可信 server、縮小 tool 清單、驗證 returned content,並讓高影響 call 維持 approval。
04 / PROVE
驗收證據
Negative test 證明 untrusted server、changed schema、expired credential 與 injected content 都能安全失敗。
SOURCE / HTTP
可重現來源探針
curl -fsSI 'https://developers.openai.com/api/docs/guides/tools-connectors-mcp' | sed -n '1,5p'