Documentation

Get started with specloop

Send a focused coding question with your app context, a human expert answers, and you get an agent-ready prompt back in your terminal or agent. Set up the CLI in a minute, then connect the MCP server to your tools.

Using an AI agent? Add these docs to its context as Markdown — point it at the file or paste the URL. Download docs.md llms.txt

Quickstart

Three steps: sign in, add credits, ask. You'll get a request id back; pull the answer once an expert replies.

terminalcopy
$ npm i -g @specloop/cli          # or call it with: npx @specloop/cli <command>
$ specloop login                   # GitHub device flow — opens a code to approve
$ specloop credits buy --pack starter   # prints a Stripe link (or redeem a voucher in the dashboard)

$ specloop ask \
    --query "What should I prompt my agent next for auth?" \
    --summary "B2B dashboard; added bearer middleware + /me route" \
    --tech "Next.js, Postgres, Cloudflare" \
    --tools "Stripe, GitHub OAuth"

$ specloop watch                   # desktop ping + clipboard when an expert answers
$ specloop get <request-id>        # the agent-ready prompt — paste it into your coding agent

Requires Node 18 or newer.

How it works

  1. You send a question plus app context (overview, tech stack, tools, an optional snippet or URL).
  2. A private, secret-stripped scratch pull request is created so a vetted human expert can review your context.
  3. An available expert claims the request and replies. Internal targets: claim within 10 minutes, reply within 20.
  4. Their guidance comes back as a synthesized, agent-ready prompt you paste straight into your coding agent.

Money-back guarantee. If no expert answers within 24 hours, your credits for that request are automatically refunded.

Install the CLI

Install globally, or skip the install and prefix any command with npx.

installcopy
$ npm i -g @specloop/cli       # global: enables the `specloop` command
$ npx @specloop/cli --help     # or no install — run on demand

Sign in once with GitHub. Your token is saved to ~/.ai-review/config.json and reused by every command (and by the MCP server).

sign incopy
$ specloop login               # opens a GitHub device-flow code to approve

Get credits

Each guidance request costs 100 credits (about one request). Get them in either of two ways:

  • Buy: specloop credits buy --pack starter prints a Stripe checkout link. Packs: starter (100), pro (500), team (1000).
  • Voucher: redeem a code in your dashboard → Billing & Usage. (Same GitHub account as the CLI, so the credits show up there too.)

Check your balance any time with specloop credits.

Connect via MCP

The specloop MCP server lets your coding agent submit requests and pull answers directly — no copy-paste. It runs locally over stdio and works in any tool that supports MCP servers (Claude Code, Claude Desktop, Codex, Cursor, Windsurf, VS Code).

Sign in first so the server can authenticate:

oncecopy
$ specloop login

About the token. After specloop login, the MCP server reuses your saved token automatically (CLI v0.1.6+) — no extra config. On older versions, add it as an env var on the server: "env": { "SPECLOOP_TOKEN": "air_…" } (your token is in ~/.ai-review/config.json).

Claude Code

claude codecopy
$ claude mcp add specloop -- npx -y @specloop/cli mcp

Claude Desktop

Add this to your claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude Desktop:

claude_desktop_config.jsoncopy
{
  "mcpServers": {
    "specloop": {
      "command": "npx",
      "args": ["-y", "@specloop/cli", "mcp"]
    }
  }
}

Codex

Add this to ~/.codex/config.toml:

~/.codex/config.tomlcopy
[mcp_servers.specloop]
command = "npx"
args = ["-y", "@specloop/cli", "mcp"]

Cursor

Settings → MCP → Add new global MCP server (or create ~/.cursor/mcp.json for all projects, or .cursor/mcp.json inside one project):

~/.cursor/mcp.jsoncopy
{
  "mcpServers": {
    "specloop": {
      "command": "npx",
      "args": ["-y", "@specloop/cli", "mcp"]
    }
  }
}

Toggle the server on in Settings → MCP, then in Agent/Composer the specloop tools are available.

Remote MCP (web platforms)

For web-based tools that connect to an MCP server by URL instead of a local command, there's a hosted endpoint (Streamable HTTP):

remote mcpcopy
URL:    https://specloop.dev/mcp
Header: Authorization: Bearer <your-token>

Add it wherever the platform lets you register a custom remote MCP server with an authorization header. Your token comes from specloop login (or your dashboard).

MCP tools

The server exposes these tools to your agent:

ToolWhat it does
submit_human_guidanceSubmit a request: query plus summary, techStack, tools, optional codeSnippet / githubUrl.
get_human_guidance_statusCheck a request's status and how many expert responses it has.
get_expert_commentsFetch the exact human-expert comments for a request.
get_agent_ready_promptFetch the synthesized prompt to paste back into your agent.

CLI command reference

CommandDescription
specloop loginSign in with GitHub (device flow).
specloop creditsShow your credit balance.
specloop credits buy --pack <pack>Buy credits — prints a Stripe checkout link.
specloop ask --query … --summary … --tech … --tools …Submit a guidance request.
specloop status [id]Check one request, or list your requests.
specloop comments <id>Show the exact expert comments.
specloop get <id>Print the agent-ready prompt.
specloop watchPing (desktop + clipboard) when an expert answers.
specloop mcpRun the MCP server (stdio) for your agent tools.

For experts

Want to answer requests? Apply in your dashboard → Become an expert. Applicants are vetted by recent GitHub activity and approved by an admin. Once approved:

CommandDescription
specloop expert:available onGo on duty (receive and claim requests). off to pause.
specloop inboxList open requests you can claim.
specloop expert:claim <id>Claim an open request (then you have 20 minutes to reply).
specloop answer <id> --comment "…"Answer. With no comment, your PR review is pulled in.
specloop watchPing when a new request is available to claim.