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

# Agent clients

> Configure Codex, Cursor, Claude Code, Claude Desktop, Antigravity, and generic MCP clients for Xerg.

Xerg has one canonical skill file and one hosted MCP endpoint. Client-specific differences are setup details, not separate skill files.

An **agent host** runs setup. An **audit source** is the data Xerg analyzes. Codex is a setup host, not a native audit source. QM can be both host and source, but an operator must perform one-shot collection outside Slack and provide an authorized sanitized snapshot to the private scope. A Codex user audits whichever source `xerg doctor` finds: OpenClaw, Hermes, Claude Code, a Cursor export, or an ingest payload.

## Install the skill (all clients)

For a terminal-capable agent, the universal cold-fetch prompt is:

```text theme={null}
set up https://xerg.ai/skill.md
```

The agent must ask before writing to a persistent or global skill directory. The deterministic alternative for Agent Skills clients is:

For any agent that supports the Agent Skills standard (Claude Code, Codex, Cursor, and others), install the skill with one command:

```bash theme={null}
npx skills add xergai/skills
```

Then ask your agent to audit your AI spend. The client-specific sections below cover manual skill paths and hosted MCP configuration.

## QM in Slack

The same cold-fetch prompt can tell QM what operator prerequisites are missing, but it cannot grant itself PostgreSQL privileges, persist an administrator skill pack, or ask you to paste secrets:

```text theme={null}
set up https://xerg.ai/skill.md
```

QM support requires an operator to create a sanitized snapshot through strict direct or Fly-contained collection. An administrator-only private QM scope may receive an authorized snapshot and use an exact CLI that the operator provisioned with explicit approval, run `doctor` before auditing it, interpret results, and ask before activation or push. Current Fly Sprites resume persistent runtimes without applying the configured sandbox OCI image, so operators must verify the CLI inside that private Sprite instead of assuming an image pin installed it. The Sprite receives no database URL, identity key, Fly token, or Xerg credential by default. The skill explains pricing and detector coverage plus QM's one-hour activity limit, refuses secrets and deployment-wide output, and does not claim it can initiate live database or Fly collection. Continuous follow capture, durable tool-history capture beyond QM's retention window, and live Slack-triggered collection are not currently supported.

QM uses the CLI rather than native Xerg hosted MCP to audit the authorized snapshot:

```bash theme={null}
xerg doctor --runtime qm --qm-snapshot <snapshot.jsonl>
xerg audit --runtime qm --qm-snapshot <snapshot.jsonl> --since 7d
```

An explicit approved push may then make only the pseudonymous summary available to the dashboard, Slack, Ask Xerg, and hosted MCP. See [secure QM setup](/docs/qm-secure-setup) and [QM limitations](/docs/qm-limitations).

## Public agent surfaces

* `https://github.com/xergai/skills` is the public skill repo (the `npx skills add` install source).
* `https://xerg.ai/skill.md` is the canonical public `SKILL.md` mirror.
* `https://xerg.ai/.well-known/agent-skills/index.json` is the v0.2.0 discovery index.
* `https://xerg.ai/.well-known/skills/index.json` is the legacy Hermes discovery index.
* `https://xerg.ai/llms.txt` is the short machine-readable site map.
* `https://xerg.ai/llms-full.txt` is the longer agent reference.
* `@xerg/cli` is the public npm CLI package.
* `@xerg/schemas` is the MIT-licensed public wire-contract package.

## Codex

Use `SKILL.md` for repeatable local audit workflows and hosted MCP for workspace data.

Install with `npx skills add xergai/skills`, or copy or link the bundled skill directory into a Codex skill search path manually:

```text theme={null}
node_modules/@xerg/cli/skills/xerg
```

For user-wide Codex installs, use:

```text theme={null}
~/.agents/skills/xerg
```

For repo-scoped Codex installs, use:

```text theme={null}
.agents/skills/xerg
```

Codex hosted MCP config in `~/.codex/config.toml`:

```toml theme={null}
[mcp_servers.xerg]
enabled = true
url = "https://mcp.xerg.ai/mcp"

[mcp_servers.xerg.http_headers]
Authorization = "Bearer <XERG_API_KEY>"
```

Use a workspace API key from the hosted dashboard. Restart Codex after editing `~/.codex/config.toml`.

## Cursor

Run the guided setup:

```bash theme={null}
npx @xerg/cli@latest mcp-setup
```

For project config, use Cursor's remote MCP shape with the Xerg hosted endpoint and a Bearer token:

```json theme={null}
{
  "mcpServers": {
    "xerg": {
      "type": "http",
      "url": "https://mcp.xerg.ai/mcp",
      "headers": {
        "Authorization": "Bearer <XERG_API_KEY>"
      }
    }
  }
}
```

## Claude Code and Claude Desktop

Use the standard remote MCP JSON shape:

```json theme={null}
{
  "mcpServers": {
    "xerg": {
      "type": "http",
      "url": "https://mcp.xerg.ai/mcp",
      "headers": {
        "Authorization": "Bearer <XERG_API_KEY>"
      }
    }
  }
}
```

## Antigravity

Use the generic streamable HTTP MCP settings if your Antigravity install supports remote MCP servers with Bearer headers.

Xerg does not publish Antigravity-specific setup steps yet because the product-specific import/config format still needs to be verified against official Antigravity documentation.

## Generic MCP

Use this server endpoint:

```text theme={null}
https://mcp.xerg.ai/mcp
```

Use this auth header:

```text theme={null}
Authorization: Bearer <XERG_API_KEY>
```

Metadata endpoint:

```text theme={null}
https://mcp.xerg.ai/server.json
```

## Local CLI for agents

Agents can run local audits without hosted auth:

```bash theme={null}
npx @xerg/cli@latest audit --json
npx @xerg/cli@latest audit --compare
npx @xerg/cli@latest audit --fail-above-waste-rate 0.30
```

Hosted push and hosted MCP require an active workspace credential. To create a free workspace first, start at [Get Started](https://xerg.ai/dashboard/get-started). Normal CLI setup uses `npx @xerg/cli@latest activate`; hosted MCP clients still use an API key from Settings.
