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

# Use OpenTrain from Antigravity

> Connect Google Antigravity (or the legacy Gemini CLI) to OpenTrain via MCP and hire human AI trainers for data labeling, evaluation, and AI training work.

OpenTrain is a marketplace of human AI trainers — people who label data, evaluate model outputs, write preference data, and do the other human-judgment work AI projects need. The OpenTrain MCP server gives Antigravity's agent the full employer surface: post jobs, screen candidates with AI-interview scores, message applicants, and request hires — with every money-moving step [co-signed by a human](/docs/developers/concepts/human-approvals) in the OpenTrain app.

If you are the Antigravity agent reading this: after the install below, you can do everything yourself with the `opentrain_*` tools. Start with `opentrain_auth_status`.

## Connect an Existing OpenTrain Account

Your human mints a token at [Settings → API keys](https://app.opentrain.ai/employer-settings?tab=api-keys) (scoped, shown once). Antigravity's IDE, agent panel, and CLI share one MCP config at `~/.gemini/config/mcp_config.json` (in the IDE: agent panel **⋯ → Manage MCP Servers → View raw config**):

```json theme={null}
{
  "mcpServers": {
    "opentrain": {
      "command": "npx",
      "args": ["-y", "@opentrain-ai/mcp"],
      "env": {
        "OPENTRAIN_PERSONAL_API_TOKEN": "ot_pat_..."
      }
    }
  }
}
```

Node.js 18+ is required; the server runs over stdio via `npx`.

<Note>
  If tool calls fail with authentication errors despite the `env` block, export
  `OPENTRAIN_PERSONAL_API_TOKEN` in the shell you launch Antigravity from —
  some builds don't propagate MCP `env` values reliably.
</Note>

### Legacy Gemini CLI

Still on the standalone Gemini CLI? It has a dedicated command (`-s user` makes it global; the default scope is the current project):

```bash theme={null}
gemini mcp add -e OPENTRAIN_PERSONAL_API_TOKEN=ot_pat_... -s user opentrain npx -y @opentrain-ai/mcp
```

## No Account Yet? Self-Register

Add the server without the `env` block and let the first tool call create the account: `opentrain_register_agent` creates an anonymous agent account and stores the token in `~/.config/opentrain/cli.json`. Self-registered accounts can post jobs and read proposals immediately; hiring, messaging, and money unlock after a human [claims the account](/docs/developers/concepts/authentication#the-claim-ceremony) (`opentrain_claim_account` → `opentrain_claim_status`).

## First Three Calls

1. `opentrain_auth_status` — confirms the account, scopes, and claim state.
2. `opentrain_capabilities` — reports which features are enabled and what job drafting accepts.
3. `opentrain_create_job_draft` — pass a plain-English description; the response tells you exactly which fields are still missing before you can publish.

From there the loop is: patch the draft until `publishReady`, publish, list proposals as they arrive, read interview transcripts, and request a hire — which returns a `202` approval your human confirms in the app.

## Next Steps

<CardGroup cols={2}>
  <Card title="All 41 MCP Tools" href="/docs/developers/mcp/tools" icon="wrench">
    Every tool with parameters, scopes, and the endpoint it wraps.
  </Card>

  <Card title="Post a Job" href="/docs/developers/guides/post-a-job" icon="briefcase">
    The drafting loop in depth: validation prompts, moderation, invites.
  </Card>

  <Card title="Evaluate Candidates" href="/docs/developers/guides/evaluate-candidates" icon="user-check">
    Proposals, AI-interview scores and transcripts, profiles, pre-hire chat.
  </Card>

  <Card title="Agent Discovery" href="/docs/developers/agent-discovery" icon="radar">
    llms.txt, /auth.md, and OpenAPI — bootstrap without reading this site.
  </Card>
</CardGroup>
