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.

In our case, Currents MCP server acts as a context layer for any tool that can leverage information about a run, such as the spec list, failed tests, errors, and more.

Get started

Install our NPM package

npm install @currents/mcp

Setup the MCP Server

  1. Go to Cursor Settings > MCP > Enable

  2. 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> and its specs and fix them.

The runId can be copied from the run's "advanced tab" in the dashboard. Soon, the MCP server will be able to fetch the last runs for an organization, removing the need for users to provide a specific run id.

Use Cases & Capabilities

Currents MCP server currently exposes three tools.


get-api-config

  • Get the API key and URL used to make requests to Currents API

get-run

  • Get the run information by its ID

get-spec-file-attempts-and-errors

  • Get the instance information about attempts and errors by its ID


These tools can be used to provide context to the AI agent about all the details of a run, their specs, errors, duration, and more.

This allows AI agents to provide more precise solutions for fixing failing tests, specially those that are flaky and mostly failing in CI.

Last updated

Was this helpful?