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.
guard_write returns a
decision; the caller executes any actual write.
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
| Variable | Required | Default | Description |
|---|---|---|---|
| ANCHORD_API_KEY | Yes | — | Bearer token from signup |
| ANCHORD_API_BASE_URL | No | https://api.anchord.ai | Production 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
} | Status | Meaning | What to do |
|---|---|---|
| resolved | High-confidence match found | Use entity_id as the canonical identity |
| not_found | No match in existing records | Safe to create a new record in the target system |
| needs_review | Ambiguous — multiple candidates | See 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"
} | Result | Meaning | Agent action |
|---|---|---|
| allowed: true | Safe to write | Proceed with the write |
| allowed: false | Conflicts detected | Do 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
- Do not write. The data is ambiguous; writing could create duplicates or corrupt records.
- Surface the candidates to the user. The response includes a
candidatesarray with entity IDs and match scores. - Direct the user to the Review Queue. Link them to https://app.anchord.ai/app/queues/needs-review.
- Retry later. Once a human resolves the ambiguity, subsequent resolve calls for the same record will return
resolved.
6. Available MCP tools
| Tool | What it does |
|---|---|
| resolve_company | Match a company to a canonical AnchorID entity |
| resolve_company_batch | Batch company resolution (max 200) |
| resolve_person | Match a person to a canonical AnchorID entity |
| resolve_person_batch | Batch person resolution (max 200) |
| get_entity | Fetch an AnchorID entity + linked source records |
| get_entity_export | Export the golden record for an AnchorID |
| link_source_record | Link a source record to an entity |
| unlink_source_record | Soft-delete a source record link |
| guard_write | Pre-write safety check (evaluation-only) |
| guard_write_batch | Batch pre-write safety check (max 200) |
| ingest_record | Ingest 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.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:
- Resolve Before Write — ingest → resolve → guard → write (end-to-end)
- Guard Before CRM Update — guard-check before touching the CRM
- Needs-Review Escalation — detect ambiguity, queue for human review, retry
Further reading
- Quickstart — full onboarding including console setup
- Integrations guide — Salesforce, HubSpot, Stripe
- Interactive API docs — Swagger UI