> For the complete documentation index, see [llms.txt](https://docs.currents.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.currents.dev/ai/connect.md).

# Connect your agent

Connect Claude, Cursor, Codex, ChatGPT, your editor or any other MCP client to Currents, and pick the setup that fits where you work

Currents hosts an MCP server at `https://mcp.currents.dev/mcp`. A connected agent reads your runs, test results, failure evidence and analytics, and acts on them, for example to quarantine a flaky test or open a Jira issue. There is nothing to install.

## Pick your agent

| Agent                                                 | Where you use it                                    | Setup                                           |
| ----------------------------------------------------- | --------------------------------------------------- | ----------------------------------------------- |
| [Claude Code](/ai/connect/claude-code.md)             | Terminal, VS Code, JetBrains                        | `claude mcp add`, then sign in                  |
| [Cursor](/ai/connect/cursor.md)                       | Cursor                                              | Open the install link, then sign in             |
| [Claude Desktop and Claude.ai](/ai/connect/claude.md) | Claude Desktop, Claude.ai, Claude mobile app        | Connect from the Claude directory, then sign in |
| [Codex](/ai/connect/codex.md)                         | Codex CLI, Codex IDE extension, ChatGPT desktop app | `codex mcp add`, then `codex mcp login`         |
| [ChatGPT](/ai/connect/chatgpt.md)                     | Chatgpt.com                                         | Create a developer mode app, then sign in       |

Other ways to connect:

* [IDE Extension](/ai/connect/ide-extension.md): shows Currents results in VS Code, Cursor and compatible editors, and adds the MCP server for the editor's agent.
* [Any MCP client](/ai/connect/remote.md): enter the server URL, then sign in or add an API key.
* [Local MCP Server](/ai/connect/local.md): runs the server on your machine with an API key, for clients that can only start local servers.

## Try it

Ask about your own projects:

* "Which tests in `<project>` were flakiest on main this week, and why?"
* "What broke in the last failed `<project>` run on main? Open a Jira issue for it."
* "Is this pull request safe to merge? Compare its runs with main."
* "Which spec files got slowest over the last 30 days?"

The agent picks the tools. [MCP tools and permissions](/ai/reference/mcp-server.md) lists them. Keep your agent set to ask before it calls a write tool: `currents-delete-run` deletes a run permanently, and Currents does not ask for confirmation.

## Sign in once

The first time an agent calls Currents, a browser window opens:

1. Sign in to Currents. SSO works as it does for the dashboard.
2. Choose the organization. The agent works in that organization only. To use two organizations, connect twice.
3. Approve the permissions the agent asks for. Your role sets which ones you can approve: for example, a Guest can approve reading projects and results only.

The agent renews its access after that. [OAuth](/authentication/oauth.md) explains each screen and permission.

A client that cannot complete this sign-in can send an [API key](/ai/connect/remote.md#connect-with-an-api-key) instead. A key acts as the organization, not as you.

## Revoke a connection

**Account → Connected Applications** lists every agent you authorized, what it can read and write, and when it was last used. Remove one to end its access on every machine. An admin sees everyone's connections under **Manage Organization → Connected Applications**. See [Reviewing and revoking access](/authentication/oauth.md#reviewing-and-revoking-access).

A connection made with an API key is not listed there. To end it, an admin revokes the key under **Organization → API Keys**.

## Troubleshooting

| What you see                     | What to do                                                                                                                                    |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| A tool you expect is missing     | Your grant or your role does not include its permission. See [the role sets the ceiling](/authentication/oauth.md#the-role-sets-the-ceiling). |
| The wrong organization's data    | Each connection reaches one organization. Revoke it, connect again, and choose the other one.                                                 |
| `403` `organization_not_enabled` | Contact <support@currents.dev>.                                                                                                               |

Each agent's page lists the errors specific to that agent. For HTTP errors from the server, see [Connect any MCP client](/ai/connect/remote.md#troubleshooting).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.currents.dev/ai/connect.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
