Black Friday: Get 40% off Craft for Life!

用 Craft 創想

如何使用 MCP 將 Craft 連接到Windsurf

您可以為 Craft 文件啟用 MCP 伺服器,允許Windsurf直接與您的內容互動。本指南將引導您使用 MCP 設定 Craft 文件與Windsurf之間的連線。

Craft
Windsurf

Enabling MCP for Documents

First, you have to enable MCP in order for Craft to setup an MCP server for your documents. Then, you use the MCP URL to connect to the server from Windsurf.

Click the “Imagine” tab in the sidebar

步驟1

Open the “Imagine” tab
Click “Create Your First MCP Connection” button

步驟2

Click “Create Your First MCP Connection”
Configure MCP connection settings

步驟3

Configure your MCP connection with a name.
Click “Add Document” button

步驟4

Click “Add Document” to select which documents this MCP connection has access to.
MCP URL displayed at the top

步驟5

The MCP URL that will be used to interact with your document is now displayed at the top.

在Windsurf中新增 MCP 連接器

在Windsurf中建立一個新的連接器,並使用 Craft 文件中的 MCP URL 連接這兩個服務。

Windsurf 目前尚不支援受保護的 MCP 伺服器。請停用 MCP 伺服器的密碼保護,以便在 Windsurf 中使用。
Open Windsurf 的 MCP 設定

步驟1

Windsurf 的右側側邊欄中,按一下 MCP 圖標,然後按一下設定圖標。此時將開啟一個設定檔。

步驟2

複製以下 MCP 設定並將其貼上到 Windsurf 的 MCP 設定檔中。
替換 MCP 伺服器的名稱

步驟3

craft 替換為您的 MCP 伺服器的描述性名稱。 ' <'MCP_URL> 替換為 Craft 中的 MCP URL。儲存文件。
重新載入 MCP 伺服器

步驟4

點擊側邊欄中的「重新載入」圖標,刷新 MCP 伺服器清單。

現在您可以向Windsurf詢問有關 Craft 文件的問題,甚至可以要求更新文件。您可以從下面的例子開始:

點擊範例即可將提示複製到剪貼簿

一些入門建議

瀏覽範例