Agent Quickstart

Everything an AI agent or builder needs to integrate Anchord — MCP setup, working examples, and what to do when things need human review.

Anchord is read-only by design. It resolves identities and evaluates writes but never writes back to external systems. guard_write returns a decision; the caller executes any actual write.
Need to set up the console too? The Full Quickstart covers integrations, data exploration, duplicate management, and team setup.

1. Install the MCP server

Prerequisites

  • Node.js >= 20
  • An Anchord API key (get one at signup)

Run with npx (no install)

ANCHORD_API_KEY=your-key npx -y @anchord/mcp-server

The server starts over stdio and is ready for MCP clients. No clone or build step needed.

Cursor

Add to .cursor/mcp.json (workspace) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "anchord": {
      "command": "npx",
      "args": ["-y", "@anchord/mcp-server"],
      "env": {
        "ANCHORD_API_KEY": "<your-api-key>"
      }
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "anchord": {
      "command": "npx",
      "args": ["-y", "@anchord/mcp-server"],
      "env": {
        "ANCHORD_API_KEY": "<your-api-key>"
      }
    }
  }
}

2. Required environment variables

VariableRequiredDefaultDescription
ANCHORD_API_KEYYesBearer token from signup
ANCHORD_API_BASE_URLNohttps://api.anchord.aiProduction API. Use http://localhost:8000 for local development only.

3. Smoke test

Verify your connection with two calls:

Ping

curl -s https://api.anchord.ai/api/ping \
  -H "Authorization: Bearer <your-key>"

Expected: {"status":"ok","tenant_id":"...","request_id":"..."}

Resolve one company

MCP tool call:

{
  "tool": "resolve_company",
  "arguments": { "domain": "acme.com" }
}

Or via curl:

curl -s -X POST https://api.anchord.ai/api/v1/resolve/company \
  -H "Authorization: Bearer <your-key>" \
  -H "Content-Type: application/json" \
  -d '{"domain": "acme.com"}'

If you get {"status":"ok"} from ping and a response from resolve, you're connected.

4. Examples

A. Resolve a company by domain

Use when you have a company domain and need a stable AnchorID entity:

{
  "tool": "resolve_company",
  "arguments": { "domain": "stripe.com" }
}

Response (key fields):

{
  "status": "resolved",
  "entity_id": "ent_abc123",
  "confidence": 0.95,
  "safe_to_write": true,
  "reasons": ["DOMAIN_EXACT_MATCH"],
  "conflicts": [],
  "candidates": [],
  "attempt_id": "att_..."
  // match, targets, coverage omitted for brevity
}
StatusMeaningWhat to do
resolvedHigh-confidence match foundUse entity_id as the canonical identity
not_foundNo match in existing recordsSafe to create a new record in the target system
needs_reviewAmbiguous — multiple candidatesSee section 5 below

B. Get an entity and link a source record

Fetch full entity details including all linked source records:

{
  "tool": "get_entity",
  "arguments": {
    "entity_id": "ent_abc123",
    "include": "source_records"
  }
}

Link a source record from another system to this entity:

{
  "tool": "link_source_record",
  "arguments": {
    "entity_id": "ent_abc123",
    "source_record_id": "sr_xyz789"
  }
}

C. Guard a write before executing it

Before your agent writes to an external system (CRM, database, etc.), ask Anchord to evaluate:

{
  "tool": "guard_write",
  "arguments": {
    "entity_id": "ent_abc123"
  }
}

Response:

{
  "allowed": true,
  "blocks": [],
  "entity_id": "ent_abc123",
  "confidence": 0.95,
  "active_links": 3,
  "audit_id": "aud_xyz789"
}
ResultMeaningAgent action
allowed: trueSafe to writeProceed with the write
allowed: falseConflicts detectedDo not write; check blocks array for details

5. What to do when needs_review

resolve_* can return needs_review when Anchord finds multiple plausible matches and cannot auto-resolve with confidence. guard_write returns allowed: true/false with a blocks array instead.

Recommended agent pattern

  1. Do not write. The data is ambiguous; writing could create duplicates or corrupt records.
  2. Surface the candidates to the user. The response includes a candidates array with entity IDs and match scores.
  3. Direct the user to the Review Queue. Link them to https://app.anchord.ai/app/queues/needs-review.
  4. Retry later. Once a human resolves the ambiguity, subsequent resolve calls for the same record will return resolved.
"I tried to resolve 'Acme Corp' but Anchord found multiple possible matches (confidence too low to auto-resolve). A human needs to review this in the Review Queue. I'll retry after it's resolved."

6. Available MCP tools

ToolWhat it does
resolve_companyMatch a company to a canonical AnchorID entity
resolve_company_batchBatch company resolution (max 200)
resolve_personMatch a person to a canonical AnchorID entity
resolve_person_batchBatch person resolution (max 200)
get_entityFetch an AnchorID entity + linked source records
get_entity_exportExport the golden record for an AnchorID
link_source_recordLink a source record to an entity
unlink_source_recordSoft-delete a source record link
guard_writePre-write safety check (evaluation-only)
guard_write_batchBatch pre-write safety check (max 200)
ingest_recordIngest a source record into Anchord

7. Rate limits & quotas

  • API rate limit: 120 requests/min per tenant
  • Signup: 10/hour per IP, 3/day per email. Disposable email domains blocked.
  • Login: 20 attempts per 15 minutes per IP
  • Ingest: Up to 100 records per batch call
  • Resolve batch: Up to 200 items per batch call
  • Plan quotas enforce monthly/daily caps (see plan entitlements)
Staging environment (staging.api.anchord.ai): Available for testing. Data may be reset at any time. Use https://api.anchord.ai for production.

8. Recipes

Short, copy-paste flows for common agent patterns:

Further reading