MCP Server
Connect AI Agents to Currents
What is MCP
MCP stands for Model Context Protocol. It's an open pattern, introduced by Anthropic, that provides a consistent way for systems to expose tools and resources that can be used by AI models.
Currents MCP server is a context layer for AI tools that leverage information about Playwright test results, such as failed tests, errors, and more.
Get started
Install our NPM package
npm install @currents/mcp
Setup the MCP Server
Go to Cursor Settings > MCP > Enable
Add the following to your
mcp.json
{
"mcpServers": {
"currents": {
"command": "npx",
"args": [
"-y",
"@currents/mcp"
],
"env": {
"CURRENTS_API_KEY": "your-api-key"
}
}
}
}
Example Prompt
@folder Tests are failing in CI. Get all the details from the run
<runId>
fix the failures
Get the runId
from the run's "Advanced" tab in the dashboard. Soon, the MCP server will be able to fetch the latest runs for an organization, removing the need for users to provide a specific run id.
Use Cases & Capabilities
Currents MCP server exposes a variety of tools.
currents-get-projects
Retrieves a list of all projects available.
currents-get-run-details
Retrieves details of a specific test run.
currents-get-spec-instances
Retrieves execution results of a spec file.
currents-get-spec-files-performance
Retrieves spec file historical performance metrics for a specific project.
currents-get-tests-performance
Retrieves test historical performance metrics for a specific project.
currents-get-tests-signatures
Returns Test Signature (filtered by spec file name and test name). Allows an agent to find test results of a specific test.
currents-get-test-results
Retrieves test results of a test, filtered by Test Signature.
These tools can be used to provide context to the AI agent about all the details of a run, tests executions, and specs, including historical data like error rate, debugging logs, duration, flakiness, and more.
Here are some examples of AI prompts:
"Please fix this test"
"What were the top flaky tests in the last 30 days?
"What were the slowest specs in the last 7 days?"
"Please fix all my flaky tests"
Last updated
Was this helpful?