Examples
Scripts the tests actually run.
These four shell scripts run in the repository test suite against the API. They default to the public hosts. Set RECRUITMCP_BASE and RECRUITMCP_MCP to point them at another server.
Four scripts
#!/usr/bin/env bash
set -euo pipefail
DOMAIN="${RECRUITMCP_DOMAIN:-recruitmcp.com}"
BASE="${RECRUITMCP_BASE:-https://api.${DOMAIN}}"
MCP="${RECRUITMCP_MCP:-https://mcp.${DOMAIN}/mcp}"
WS=$(curl -fsS -X POST "$BASE/v1/workspaces" \
-H 'content-type: application/json' \
-d '{"name":"Northwind Search","email":"ada@northwind.example"}')
KEY=$(node -e 'const j=JSON.parse(process.argv[1]); if(!String(j.api_key||"").startsWith("rmcp_live_")) process.exit(1); process.stdout.write(j.api_key)' "$WS")
PLACES=$(curl -fsS "$BASE/v1/lookups/locations?q=Gent,%20Belgium&prefer_area=true" \
-H "authorization: Bearer $KEY")
node -e 'const j=JSON.parse(process.argv[1]); if(!/^[0-9]+$/.test(j.data?.[0]?.geo_id||"")) { console.error(j); process.exit(1); }' "$PLACES"
PLAN=$(curl -fsS -X POST "$BASE/v1/search-plans" \
-H "authorization: Bearer $KEY" \
-H 'content-type: application/json' \
-d '{"job_description":"Senior backend engineer in Gent, Belgium. Go, 5+ years.","target":40}')
node -e 'const j=JSON.parse(process.argv[1]); if(j.estimate?.requires_confirm!==true||typeof j.estimate.credits_min!=="number"||!j.tiers?.[0]?.id||!j.tiers[0].label||!j.summary){console.error(j); process.exit(1)}' "$PLAN"
PID=$(node -e 'process.stdout.write(JSON.parse(process.argv[1]).id)' "$PLAN")
DRY=$(curl -fsS -X POST "$BASE/v1/runs?dry_run=true" \
-H "authorization: Bearer $KEY" \
-H 'content-type: application/json' \
-d "$(node -e 'process.stdout.write(JSON.stringify({plan_id:process.argv[1]}))' "$PID")")
node -e 'const j=JSON.parse(process.argv[1]); if(j.estimate?.requires_confirm!==true||j.run){console.error(j); process.exit(1)}' "$DRY"
echo "$PLAN"
The enroll script needs a connected outreach account, so it stays in the docs with the reply-triage notes.