Skip to main content
Glama
GetABrain🧠 | Live Human-in-the-Loop MCP for AI Agents

GetABrain🧠 | Live Human-in-the-Loop MCP for AI Agents

README.md
<p align="center">
  <img src="./logo.png" alt="GetABrain" width="128" height="128" />
</p>

# GetABrain MCP server: human-in-the-loop for AI agents

[![npm](https://img.shields.io/npm/v/@getabrain/mcp-server)](https://www.npmjs.com/package/@getabrain/mcp-server)
[![MCP Registry](https://img.shields.io/badge/MCP-registry-blue)](https://registry.modelcontextprotocol.io)

**Let your AI agent ask real people.** GetABrain is a human-in-the-loop API: an agent sends a question,
paid human workers answer it, and the answers come back as structured JSON. Use it when a model should
not decide alone: human approval before an action, taste and preference tests, A/B tests with real people,
content review, fact checks against the real world, or human-labelled evaluation data.

- **Structured question types:** yes/no, multiple choice, rating scale, ranking, A/B test, sentiment, image
  comparison, image analysis, video and audio review, free text.
- **Pay per answer:** you set the bid (minimums are about $9/hour of a worker's time) plus a 20% fee (lower on a monthly plan: https://www.getabrain.ai/pricing).
- **Safe to build against:** a test-mode key gives a $5 sandbox credit and clearly labelled simulated answers.
- **Works with** Claude (Desktop, Code, claude.ai connectors), Cursor, Windsurf, VS Code, and any MCP
  client; also a REST API and Node / Python SDKs.

**Common uses:** human approval step in an agent workflow · RLHF-style preference data · "which headline
would you click" tests · UX and copy feedback · checking an AI answer with real people · crowd opinion polls.

Docs: https://www.getabrain.ai/docs · Human-in-the-loop guide: https://www.getabrain.ai/human-in-the-loop ·
Compare with MTurk and Prolific: https://www.getabrain.ai/vs/mturk-prolific

## Use with Claude Desktop / Cursor

Add to your MCP client config (e.g. `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "getabrain": {
      "command": "npx",
      "args": ["-y", "@getabrain/mcp-server"],
      "env": {
        "GETABRAIN_API_KEY": "gab_k_…",
        "GETABRAIN_API_SECRET": "gab_s_…"
      }
    }
  }
}
```

Get your API key by signing up at https://getabrain.ai.

## Remote (hosted) MCP server -- no install

Prefer not to run anything locally? GetABrain also hosts this same server over Streamable HTTP at
`https://www.getabrain.ai/api/mcp`. The simplest setup is the URL alone: `{"url": "https://www.getabrain.ai/api/mcp"}`.
Clients that support MCP OAuth then open a GetABrain sign-in, with no keys to paste.
Sign-in connects your live account. For a test-mode key, or a client without OAuth, pass the key pair as headers:

```json
{
  "mcpServers": {
    "getabrain": {
      "url": "https://www.getabrain.ai/api/mcp",
      "headers": {
        "X-API-Key": "gab_k_…",
        "X-API-Secret": "gab_s_…"
      }
    }
  }
}
```

Same 7 tools, same schemas, same test-mode support. Docs: https://www.getabrain.ai/docs

## Test mode

Test mode is a flag on the key, not a different key format. When you mint an API key — via
`POST /api/v1/requestor/keys` with `{"mode":"test"}`, or by choosing "test" in the dashboard — you get
back a completely normal `gab_k_…` / `gab_s_…` key pair. There's no `_test_` in the string; the
test-ness lives in the database as an `is_test` flag on that key. No funding or card required.

Point `GETABRAIN_API_KEY` / `GETABRAIN_API_SECRET` at a test-mode key and the server behaves identically, except:

- `submit_query` is billed at the minimum bid with no fee — paid from your one-time $5 sandbox credit first, then your balance (402 if both are empty).
- Responses come back synthetic and are always marked **`simulated: true`**, so your pipeline (submit →
  wait/poll → rate) can be built and exercised end-to-end before any real human worker or real money is
  involved.
- `get_balance` reports `mode: "test"` so the agent/human can tell at a glance which environment it's in.

When you're ready to go live: mint a **live-mode key** (same call, `{"mode":"live"}` or the dashboard
default), fund the account with `create_topup_link` (works with either key type — a test-mode agent can
generate the link, a human completes checkout to add real funds), and swap the env vars. `get_balance`
then reports `mode: "live"`, and `submit_query` starts spending real balance and dispatching to real paid
workers.

## Tools

- `get_balance` — read-only: prepaid balance (cents), `mode` (`"test"`/`"live"`), and `auto_reload_enabled`
  (with a setup link + hint when it's off and would otherwise stall a live account at zero balance).
- `create_topup_link` — mints a Stripe Checkout URL to add funds (min $5); a human opens it in a browser to
  pay — the agent cannot complete payment itself.
- `submit_query` — ask real humans a question (A/B test, rating, ranking, sentiment, yes/no,
  image/video/audio review, free text, …). Returns a `query_id`. Spends balance on a live
  key; simulated (`simulated: true`) on a test key, paid from the $5 sandbox credit first.
- `get_responses` — one-shot, read-only: current status + whatever responses exist right now, no waiting.
- `wait_for_responses` — bounded polling (up to `max_wait_seconds`, default/max 50s); returns `ready` with
  responses once enough arrive, or `pending` — call again to keep waiting. Use this instead of `get_responses`
  when you want the tool call itself to wait.
- `list_queries` — read-only: your recent queries, optionally filtered by `status`.
- `rate_response` — rate a worker's answer 1–5 (optional `feedback_text`); feeds the worker quality system.

## Example agent flow

1. `get_balance` → confirm funds (or `mode: "test"` for a sandbox run; also check `sandbox_credit_cents`).
2. If funds are short on a live key: `create_topup_link` → human completes checkout → `get_balance` again.
3. `submit_query` → get `query_id`.
4. `wait_for_responses` (repeat while `pending`) → read the human (or simulated, in test mode) answers.
5. `rate_response` → optionally rate each response to improve future worker matching.

Full API docs: https://getabrain.ai/docs/api

TDQS

A4.5/5.0

Scored across 7 tools

Disambiguation4/5

Most tools target clearly distinct actions (submit, list, rate, balance, top-up). The only genuine overlap is get_responses vs wait_for_responses, both returning answers for a query_id, but both descriptions carry explicit 'Disambiguation:' notes contrasting instant snapshot vs blocking poll, which largely resolves the risk.

Naming Consistency5/5

All seven names follow a strict verb_noun snake_case pattern (get_balance, submit_query, get_responses, wait_for_responses, rate_response, create_topup_link, list_queries). No style deviations or vague verbs like 'process' or 'handle'.

Tool Count5/5

Seven tools is a tight, well-scoped surface for a HITL query lifecycle: fund, submit, retrieve (two modes), rate, list, and top-up. Each tool maps to a distinct step with no filler.

Completeness4/5

The create/read/list/rate/fund lifecycle is fully covered, including pricing quotes and sandbox vs live mode. Minor gaps: no cancel/expire query operation and no way to fetch a single query's metadata independently of its responses, so agents have limited cleanup or introspection paths.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues