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

# Connect your AI tools

`testvibe mcp` starts a stdio [MCP](https://modelcontextprotocol.io) server exposing all 19 operations as tools, so an AI assistant can manage features, generate tests, run them, and read results on your behalf.

First install the CLI and create an [API key](/testvibe-api/getting-started/authentication.md). Then connect your client:

{% tabs %}
{% tab title="Claude Code" %}

```bash
claude mcp add testvibe \
  -e TESTVIBE_SERVER=https://YOUR-TESTVIBE-SERVER \
  -e TESTVIBE_API_KEY=tvb_XXXXXXXX… \
  -- testvibe mcp
```

{% endtab %}

{% tab title="Claude Desktop" %}
Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "testvibe": {
      "command": "testvibe",
      "args": ["mcp"],
      "env": {
        "TESTVIBE_SERVER": "https://YOUR-TESTVIBE-SERVER",
        "TESTVIBE_API_KEY": "tvb_XXXXXXXX…"
      }
    }
  }
}
```

{% endtab %}

{% tab title="Codex" %}
Add to `~/.codex/config.toml`:

```toml
[mcp_servers.testvibe]
command = "testvibe"
args = ["mcp"]
env = { TESTVIBE_SERVER = "https://YOUR-TESTVIBE-SERVER", TESTVIBE_API_KEY = "tvb_XXXXXXXX…" }
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The Settings → **CLI & API keys** panel in the app generates these snippets for you, pre-filled with your server URL.
{% endhint %}

## Try it

Ask your assistant something like:

> List my TestVibe projects, then run the "Login Functionality" feature on Acme Shop and tell me which tests failed.

The assistant will chain `list_projects` → `run_feature` → `wait_for_run` → `get_run` and summarize the digest.

## Default project

Most tools are project-scoped. Set a default with `testvibe use <project>` (or `TESTVIBE_PROJECT` / `.testvibe.json`) so the assistant doesn't need to pass `project` on every call — an explicit `project` argument always wins. See [The TestVibe MCP server](/testvibe-api/mcp-server/mcp.md) for the full tool list.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.testvibe.com/testvibe-api/getting-started/connect-ai-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
