Currents

dev.currentsv1.0.0更新于 Oct 2, 2026

Self-healing CI tests and proof of work for AI agents

概览

AI 生成的概览

将 AI 编程代理连接到 Currents 的 CI 测试数据,用于查看运行记录、诊断不稳定或失败的测试并管理隔离规则。

功能
Currents MCP 服务器把 Currents 仪表盘中的 CI 测试数据开放给助手。相关工具可以列出并查看运行、spec 文件、单个测试结果、错误趋势和性能指标,并获取失败上下文、证据产物和可分享的 trace 链接。它还能管理项目设置,例如操作规则(隔离、跳过、打标签)、webhook,以及创建和关联 Jira 问题。以 MCP 资源形式发布的技能描述了修复失败测试和收集证据的多步工作流。
适用场景
当助手需要依据真实的执行数据而非猜测来诊断或修复 CI 中失败的测试时适用,也适合让代理读取 Currents 中的测试证据、错误趋势和运行历史。团队若希望在编辑器内管理隔离规则、webhook 或 Jira 问题,也可以使用。
运行要求
需要 Currents 账号和 API 密钥。托管端点 要求在 Authorization 请求头中以 Bearer 令牌传入密钥;本地 stdio 方式通过 npx 运行 npm 包 @currents/mcp,并设置 CURRENTS_API_KEY。VS Code 使用 Currents 登录而非 API 密钥。自托管需要 Node.js 或 Docker。
安装前请注意
该服务器会让所连接的 AI 工具访问你的 API 密钥、测试结果和 CI 元数据,且托管端点自身不做身份验证,Bearer 令牌会直接透传给 Currents API。多个工具会写入或删除数据,包括创建、更新、禁用和归档操作规则,创建和删除 webhook,取消、重置或删除运行,以及创建 Jira 问题。分享链接和证据链接会在过期前向任何持有 URL 的人暴露测试结果和产物。请审查你所连接的代理或服务。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Currents,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://mcp.currents.dev/mcp"
    }
  }
}

README

Currents MCP Server

[Unit Tests]

Give your AI coding agents full visibility into your CI test results. The Currents MCP Server connects tools like Cursor and Claude directly to your Currents dashboard, so agents can diagnose flaky tests, pinpoint failures, and act on real execution data -- without leaving your editor.

  • Query runs, spec files, and individual test results from CI
  • Surface error trends and performance metrics across your test suite
  • Manage quarantine rules, webhooks, and project settings programmatically
  • Let agents fix what's broken using actual test output, not guesswork

[Install MCP Server]

Tools

ToolDescription
currents-list-actionsList all actions for a project with optional filtering.
currents-create-actionCreate a new action for a project.
currents-get-actionGet a single action by ID.
currents-update-actionUpdate an existing action.
currents-delete-actionDelete (archive) an action.
currents-enable-actionEnable a disabled action.
currents-disable-actionDisable an active action.
currents-list-affected-testsList tests affected by actions (quarantine, skip, tag) for a project within a date range.
currents-get-affected-test-executionsKeyed on a test: lists the executions of one test that an action applied to, within a date range, with the run, branch and commit of each.
currents-get-action-executionsKeyed on an action: lists the test executions one rule was applied to, across every test it touched, within a date range.
currents-get-projectsRetrieves projects available in the Currents platform.
currents-get-projectGet a single project by ID.
currents-get-project-insightsGet aggregated run and test metrics for a project within a date range.
currents-list-pull-requestsList pull-request cards for a project (runs grouped by meta.pr.id).
currents-list-project-termsList cursor-paginated project terms for one type (tag, branch, authorName, etc.).
currents-create-jira-issueCreate a Jira issue from a run test using the organization Jira integration.
currents-link-jira-issueLink an existing Jira issue to a run test using the organization Jira integration.
currents-list-jira-projectsList Jira projects available for the organization integration.
currents-list-jira-issue-typesList Jira issue types and custom fields for a Jira project.
currents-get-runsRetrieves a list of runs for a specific project with optional filtering.
currents-get-run-detailsRetrieves a run: its status, commit, branch, groups and spec files, each with its instanceId.
currents-find-runFind a run by query parameters.
currents-cancel-runCancel a run in progress.
currents-reset-runReset failed spec files in a run to allow re-execution.
currents-delete-runDelete a run and all associated data.
currents-cancel-run-github-ciCancel a run by GitHub Actions workflow run ID and attempt number.
currents-get-spec-instanceRetrieves the raw result of one spec file execution by instanceId: each test's state and attempts, and the artifact URLs.
currents-get-spec-files-performanceRetrieves spec files performance metrics for a specific project within a date range.
currents-get-tests-performanceRetrieves aggregated test metrics for a specific project within a date range.
currents-get-tests-signaturesGenerates a unique test signature based on project, spec file path, and test title.
currents-get-test-resultsRetrieves historical test execution results for a specific test signature.
currents-get-contextCall this first to find out why tests failed in CI, or to fix them: returns the errors, steps and files of the failed tests of a run, a spec file (instance) or one test — the same content as Fix in the Currents dashboard.
currents-get-errors-explorerGet aggregated error metrics for a project within a date range.
currents-get-test-evidenceCollect evidence artifacts (screenshots, videos, traces, attachments) produced by tests in a CI run, with signed download URLs grouped per test.
currents-create-evidence-linksCreate a shareable link to a test attempt's evidence, served from its Playwright trace, and the URLs onto it: a markdown digest of what the attempt did and what failed, a filmstrip, an animated screencast, DOM snapshots, network requests and attachments.
currents-create-sessionRecord a browser session you drove as a Currents run, so its evidence can be read and shared like a CI run's.
currents-list-webhooksList all webhooks for a project.
currents-create-share-linkCreate a public link to test results that anyone can open without signing in, until it expires. purpose "fix" is the failure context, for an agent that will fix the tests — the same content as currents-get-context, with flaky tests included and marked flaky. purpose "report" lists every test with its attempts and files, for a person.
currents-create-webhookCreate a new webhook for a project.
currents-get-webhookGet a single webhook by ID.
currents-update-webhookUpdate an existing webhook.
currents-delete-webhookDelete a webhook.

Skills

Agent skills that teach AI agents multi-step Currents workflows.

SkillDescription
browser-evidenceExperimental.
collect-evidenceShow that work you implemented actually works, or demo it, from tests that ran in CI via Currents — a trace link whose digest, filmstrip and accessibility snapshots read inside a comment, plus screenshots, attachments and videos.
fix-failing-testsFix tests that failed in CI, using the results Currents recorded — errors, steps, traces, screenshots and console output.

The server publishes every skill as an MCP resource, so a connected agent can list and read them without a local copy:

text
skill://currents/collect-evidence/SKILL.mdskill://currents/collect-evidence/references/instrumentation.md

Agents that load skills only from disk still need a copy — put the skill directory in the agent's skills location (e.g. .claude/skills/ for Claude Code).

Setup

API Key

Get a Currents API key by following the instructions here.

Usage with Cursor

  1. Go to Cursor Settings > MCP > Enable
  2. Add the following to your mcp.json.
json
{  "mcpServers": {    "currents": {      "command": "npx",      "args": ["-y", "@currents/mcp"],      "env": {        "CURRENTS_API_KEY": "your-api-key"      }    }  }}

Claude

Run this command to add Currents MCP to Claude Code

bash
claude mcp add --transport stdio currents --env CURRENTS_API_KEY=<KEY> -- npx -y @currents/mcp

Add the following to enable Currents MCP on Claude Desktop (edit claude_desktop_config.json file):

json
{  "mcpServers": {    "currents": {      "command": "npx",      "args": ["-y", "@currents/mcp"],      "env": {        "CURRENTS_API_KEY": "your-api-key"      }    }  }}

VS Code and GitHub Copilot

Install in VS Code adds the hosted server. VS Code opens a Currents sign-in page the first time it connects; there is no API key to enter.

To install the plugin, which adds the skills as well as the server:

  • VS Code: open vscode://chat-plugin/install?source=currents-dev/currents-mcp

  • Copilot CLI:

    bash
    copilot plugin marketplace add currents-dev/currents-mcpcopilot plugin install currents@currents

To add only the server to Copilot CLI:

bash
copilot mcp add --transport http currents https://mcp.currents.dev/mcp

Remote (hosted) MCP endpoint

In addition to the local stdio transport above, the same server can run as a hosted Streamable HTTP endpoint (e.g. https://mcp.currents.dev/mcp) for use with remote connectors such as the Claude web/mobile apps.

The hosted server performs no authentication of its own. Each request must carry your Currents API key as a Bearer token, which is passed through to the Currents API:

Authorization: Bearer <your-currents-api-key>

Example client config (remote connector):

json
{  "mcpServers": {    "currents": {      "url": "https://mcp.currents.dev/mcp",      "headers": {        "Authorization": "Bearer your-api-key"      }    }  }}

Running the HTTP server yourself:

bash
# from the mcp-server packagenpm run build && PORT=3000 npm run start:http# or via Docker (serves /mcp, exposes the configured PORT)docker build -t currents-mcp . && docker run -p 3000:3000 currents-mcp

The Node server speaks plain HTTP; TLS and the public domain terminate at the reverse proxy / load balancer in front of the container. A GET /healthz endpoint is provided for liveness checks.

⚠️ Notice

By connecting AI tools (e.g., via MCP) to Currents, you are granting them access to your API key, test results and CI metadata. It is your responsibility to vet any AI agents or services you use, and to ensure they handle your data securely.

References

来源:README.md,提交 0035419

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.0.0最新Oct 2, 2026