> ## Documentation Index
> Fetch the complete documentation index at: https://onetest.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Connectivity

> Connect AI coding assistants to OneTest services via Model Context Protocol

OneTest exposes MCP (Model Context Protocol) endpoints so AI coding assistants — such as Cursor, Windsurf, Claude Code, or any MCP-compatible tool — can interact with OneTest services directly from your editor.

## Available Endpoints

Each OneTest service has its own MCP endpoint at `/mcp/{service-name}`:

| Service | Endpoint |
| - | - |
| Test Management | `https://tms.onetest.ai/mcp/test-management` |
| Artifacts | `https://tms.onetest.ai/mcp/artifacts` |
| Membership | `https://tms.onetest.ai/mcp/membership` |
| Metering | `https://tms.onetest.ai/mcp/metering` |
| Credential Pool | `https://tms.onetest.ai/mcp/credpool` |

## Authentication

All MCP endpoints authenticate via API key using a Bearer token. Include your OneTest API key in the `Authorization` header:

```
Authorization: Bearer ak_YOUR_API_KEY
```

To get an API key, go to **Settings** > **API Keys**.

## Setup

### Option 1: Automatic (Recommended)

Run the QA Agent init command and follow the browser-connect flow. It detects your editor, authenticates you, and writes the MCP configuration automatically:

```bash theme={null}
npx github:onetest-ai/qa-agent init
```

### Option 2: Manual `.mcp.json`

Add OneTest endpoints directly to your `.mcp.json` configuration file. The example below connects to the Test Management service:

```json theme={null}
{
  "mcpServers": {
    "onetest": {
      "url": "https://tms.onetest.ai/mcp/test-management",
      "headers": {
        "Authorization": "Bearer ak_YOUR_API_KEY"
      }
    }
  }
}
```

Add additional entries for other services (artifacts, credpool, etc.) as needed.

> [!TIP]
>
> The `npx github:onetest-ai/qa-agent init` flow is the easiest way to get started — it handles authentication and writes the correct `.mcp.json` entries for all services.

## What's Next?

> [card] [AI Assistant](https://onetest.ai/ai/overview.md)
>
> Use the AI with your connected tools

> [card] [LLM Configuration](https://onetest.ai/settings/llm-configuration.md)
>
> Configure the AI provider powering the assistant


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.