Currents MCP Server
官方讓 AI 代理修復回報給 Currents 的 Playwright 測試失敗。
文件
Currents MCP Server
讓您的 AI 編碼代理完全掌握 CI 測試結果的可見性。Currents MCP Server 將 Cursor 和 Claude 等工具直接連接到您的 Currents 儀表板,讓代理能夠診斷不穩定的測試、精確定位失敗原因,並根據實際執行資料採取行動——完全無需離開編輯器。
- 從 CI 查詢執行、規格檔案和個別測試結果
- 在整個測試套件中呈現錯誤趨勢和效能指標
- 以程式化方式管理隔離規則、Webhook 和專案設定
- 讓代理根據實際測試輸出修復問題,而非憑空猜測
工具
| 工具 | 說明 |
|---|---|
currents-list-actions | 列出專案的所有動作,可選擇性篩選。 |
currents-create-action | 為專案建立新動作。 |
currents-get-action | 依 ID 取得單一動作。 |
currents-update-action | 更新現有動作。 |
currents-delete-action | 刪除(封存)動作。 |
currents-enable-action | 啟用已停用的動作。 |
currents-disable-action | 停用作用中的動作。 |
currents-list-affected-tests | 列出在日期範圍內,專案中受動作(隔離、跳過、標記)影響的測試。 |
currents-get-affected-test-executions | 取得在日期範圍內,特定受影響測試(依簽章)的執行詳細資料。 |
currents-get-affected-executions | 列出在日期範圍內,已套用特定動作/規則的測試執行。 |
currents-get-projects | 擷取 Currents 平台上可用的專案。 |
currents-get-project | 依 ID 取得單一專案。 |
currents-get-project-insights | 取得在日期範圍內,專案的彙總執行和測試指標。 |
currents-list-pull-requests | 列出專案的拉取請求卡片(依 meta.pr.id 分組的執行)。 |
currents-list-project-terms | 列出某類型(標籤、分支、作者名稱等)的遊標分頁專案術語。 |
currents-create-jira-issue | 使用組織的 Jira 整合,從執行測試建立 Jira 議題。 |
currents-link-jira-issue | 使用組織的 Jira 整合,將現有 Jira 議題連結至執行測試。 |
currents-list-jira-projects | 列出組織整合可用的 Jira 專案。 |
currents-list-jira-issue-types | 列出 Jira 專案的議題類型和自訂欄位。 |
currents-get-runs | 擷取特定專案的執行清單,可選擇性篩選。 |
currents-get-run-details | 擷取特定測試執行的詳細資料。 |
currents-find-run | 依查詢參數尋找執行。 |
currents-cancel-run | 取消進行中的執行。 |
currents-reset-run | 重設執行中失敗的規格檔案,以允許重新執行。 |
currents-delete-run | 刪除執行及其所有相關資料。 |
currents-cancel-run-github-ci | 依 GitHub Actions 工作流程執行 ID 和嘗試次數取消執行。 |
currents-get-spec-instance | 依 instanceId 從特定測試規格檔案執行中擷取除錯資料。 |
currents-get-spec-files-performance | 擷取在日期範圍內,特定專案的規格檔案效能指標。 |
currents-get-tests-performance | 擷取在日期範圍內,特定專案的彙總測試指標。 |
currents-get-tests-signatures | 根據專案、規格檔案路徑和測試標題產生唯一的測試簽章。 |
currents-get-test-results | 擷取特定測試簽章的歷史測試執行結果。 |
currents-get-context | 取得用於 AI 除錯的測試失敗脈絡,可在執行、實例或測試層級。 |
currents-get-errors-explorer | 取得在日期範圍內,專案的彙總錯誤指標。 |
currents-list-webhooks | 列出專案的所有 Webhook。 |
currents-create-webhook | 為專案建立新的 Webhook。 |
currents-get-webhook | 依 ID 取得單一 Webhook。 |
currents-update-webhook | 更新現有 Webhook。 |
currents-delete-webhook | 刪除 Webhook。 |
設定
API 金鑰
請依照此處的說明取得 Currents API 金鑰。
與 Cursor 搭配使用
- 前往 Cursor 設定 > MCP > 啟用
- 將以下內容新增至您的
mcp.json。
{
"mcpServers": {
"currents": {
"command": "npx",
"args": ["-y", "@currents/mcp"],
"env": {
"CURRENTS_API_KEY": "your-api-key"
}
}
}
}
Claude
執行此命令以將 Currents MCP 新增至 Claude Code
claude mcp add --transport stdio currents --env CURRENTS_API_KEY=<KEY> -- npx -y @currents/mcp
新增以下內容以在 Claude Desktop 上啟用 Currents MCP(編輯 claude_desktop_config.json 檔案):
{
"mcpServers": {
"currents": {
"command": "npx",
"args": ["-y", "@currents/mcp"],
"env": {
"CURRENTS_API_KEY": "your-api-key"
}
}
}
}
⚠️ 注意事項
將 AI 工具(例如透過 MCP)連接到 Currents,即表示您授予它們存取您的 API 金鑰、測試結果和 CI 中繼資料的權限。您有責任審查所使用的任何 AI 代理或服務,並確保它們安全地處理您的資料。