{
  "markdown": "# Anchord MCP Server\n\n**Identity resolution and pre-write safety checks for AI agents.**\n\n[![npm](https://img.shields.io/npm/v/@anchord/mcp-server)](https://www.npmjs.com/package/@anchord/mcp-server)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nAn [MCP](https://modelcontextprotocol.io) server that gives AI agents access\nto the [Anchord](https://www.anchord.ai) identity resolution API. Resolve\ncompanies and people to canonical AnchorIDs, run pre-write safety checks,\nand export golden records — through the standard MCP tool interface.\n\n**Hosted API-backed.** This MCP server is a thin proxy to the Anchord SaaS\nplatform. All scoring, matching, validation, and data persistence happen\nserver-side. No business logic runs locally.\n\n**Read-only by design.** Anchord never writes to your external systems\n(CRMs, databases, etc.). `guard_write` evaluates a proposed write and\nreturns allowed/blocked — the caller decides whether to proceed.\n\n---\n\n## Quick start\n\n### 1. Get an API key\n\nSign up at [app.anchord.ai/signup](https://app.anchord.ai/signup) and\ncreate an API key in **Settings > API Keys**.\n\n### 2. Run with npx (no install)\n\n```bash\nANCHORD_API_KEY=<YOUR_ANCHORD_API_KEY> npx -y @anchord/mcp-server\n```\n\nThat's it. The server starts over stdio and is ready for MCP clients.\n\n### 3. Or connect to the hosted remote (zero install)\n\nNo local install needed. Point any MCP client that supports remote HTTP\ntransport at the hosted endpoint:\n\n```json\n{\n  \"mcpServers\": {\n    \"anchord\": {\n      \"url\": \"https://mcp.anchord.ai/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer <YOUR_ANCHORD_API_KEY>\"\n      }\n    }\n  }\n}\n```\n\nSee [docs/remote.md](docs/remote.md) for full details, client\ncompatibility notes, and a local fallback if your client does not yet\nsupport remote MCP.\n\n---\n\n## MCP client setup\n\n### Cursor (local stdio)\n\nAdd to `.cursor/mcp.json` (workspace) or `~/.cursor/mcp.json` (global):\n\n```json\n{\n  \"mcpServers\": {\n    \"anchord\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anchord/mcp-server\"],\n      \"env\": {\n        \"ANCHORD_API_KEY\": \"<YOUR_ANCHORD_API_KEY>\"\n      }\n    }\n  }\n}\n```\n\nSee [examples/cursor-mcp.json](examples/cursor-mcp.json).\n\n### Claude Desktop\n\nAdd to your Claude Desktop config\n(`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS,\n`%APPDATA%\\Claude\\claude_desktop_config.json` on Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"anchord\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anchord/mcp-server\"],\n      \"env\": {\n        \"ANCHORD_API_KEY\": \"<YOUR_ANCHORD_API_KEY>\"\n      }\n    }\n  }\n}\n```\n\nSee [examples/claude-desktop-config.json](examples/claude-desktop-config.json).\n\n### Remote MCP (for clients that support HTTP transport)\n\nFor zero-install remote access, use the hosted endpoint instead of a\nlocal stdio process. This works with any MCP client that supports the\n`url` + `headers` configuration format:\n\n```json\n{\n  \"mcpServers\": {\n    \"anchord\": {\n      \"url\": \"https://mcp.anchord.ai/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer <YOUR_ANCHORD_API_KEY>\"\n      }\n    }\n  }\n}\n```\n\nNo Node.js, no npx, no Docker required. If your client does not yet\nsupport remote MCP, use the local stdio setup above.\nSee [docs/remote.md](docs/remote.md) for full details.\n\n### Docker\n\n```bash\ndocker build -t anchord-mcp .\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",...}' | \\\n  docker run --rm -i -e ANCHORD_API_KEY=<YOUR_ANCHORD_API_KEY> anchord-mcp\n```\n\nOr use the compose file for local testing:\n\n```bash\ncp examples/env.example .env\n# Edit .env with your API key\ndocker compose up\n```\n\n---\n\n## Environment variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `ANCHORD_API_KEY` | Yes | — | Your Anchord API key (Bearer token) |\n| `ANCHORD_API_BASE_URL` | No | `https://api.anchord.ai` | API base URL |\n\nSee [docs/auth.md](docs/auth.md) for details on authentication and tenant\nscoping.\n\n---\n\n## Available tools\n\n| Tool | Description |\n|------|-------------|\n| `resolve_company` | Resolve a company to a canonical AnchorID |\n| `resolve_company_batch` | Batch company resolution (max 200) |\n| `resolve_person` | Resolve a person to a canonical AnchorID |\n| `resolve_person_batch` | Batch person resolution (max 200) |\n| `get_entity` | Fetch an AnchorID with optional linked records |\n| `get_entity_export` | Export the golden record for an AnchorID |\n| `link_source_record` | Link a source record to an AnchorID |\n| `unlink_source_record` | Soft-delete a source record link |\n| `guard_write` | Pre-write safety check (evaluation-only) |\n| `guard_write_batch` | Batch pre-write safety check (max 200) |\n| `ingest_record` | Ingest a source record into Anchord |\n\nFull parameter reference: [docs/tools.md](docs/tools.md)\n\n---\n\n## Safe agent workflow\n\nThe recommended sequence for agents writing to external systems:\n\n```\n1. ingest_record        Push the source record into Anchord\n                        (optional if using OAuth integrations)\n\n2. resolve_company      Match to a canonical AnchorID\n   or resolve_person    → status: resolved | not_found | needs_review\n\n3. IF needs_review      STOP. Do not write.\n                        Surface candidates to the user.\n                        Direct them to the Review Queue.\n\n4. guard_write          Evaluate the proposed write\n                        → allowed: true | false (with block codes)\n\n5. IF allowed           The agent performs the external write.\n                        Anchord never writes.\n\n6. Log request_id       Every response includes a request_id\n                        for audit trail and debugging.\n```\n\nUse `get_entity` or `get_entity_export` at any point to inspect AnchorID\ndetails or retrieve the merged golden record.\n\n---\n\n## Handling `needs_review`\n\nOnly `resolve_*` returns `needs_review`. It means Anchord found multiple\nplausible matches and cannot auto-resolve with confidence.\n\n**For agents:**\n\n1. **Do not write.** The data is ambiguous.\n2. **Surface the candidates** to the user — the response includes entity IDs\n   and match scores.\n3. **Direct the user to the Review Queue:**\n   `https://app.anchord.ai/app/queues/needs-review`\n4. **Retry later.** Once a human resolves the ambiguity, subsequent resolve\n   calls return `resolved`.\n\n**Example agent message:**\n\n> I tried to resolve \"Acme Corp\" but Anchord found multiple possible matches.\n> A human needs to review this in the\n> [Review Queue](https://app.anchord.ai/app/queues/needs-review).\n> I'll retry after it's resolved.\n\n---\n\n## Error handling\n\nWhen the API returns 4xx/5xx, the MCP tool response is marked `isError: true`\nwith a structured payload:\n\n```json\n{\n  \"error\": \"[422] BATCH_TOO_LARGE: Batch size must not exceed 100 records. (request_id: req_01ABC123)\",\n  \"status_code\": 422,\n  \"request_id\": \"req_01ABC123\",\n  \"details\": { \"records\": [\"Too many records.\"] }\n}\n```\n\n- `request_id` is always present — from the API response body, `x-request-id`\n  header, or a client-generated UUID.\n- `details` contains validation errors when available (null for non-JSON errors).\n- API keys are never included in error messages.\n\n---\n\n## Architecture\n\n### Local (stdio)\n\n```\nMCP Client (Cursor / Claude Desktop / etc.)\n    │  stdio (JSON-RPC)\n    ▼\n┌──────────────┐\n│  MCP Server  │  Node.js + TypeScript\n│  (this pkg)  │  Zod schemas · no business logic\n└──────┬───────┘\n       │  HTTPS + Bearer auth\n       ▼\n┌──────────────┐\n│  Anchord API │  Hosted SaaS — scoring, matching,\n│              │  persistence, tenant isolation\n└──────────────┘\n```\n\n### Hosted remote (HTTP)\n\n```\nMCP Client\n    │  HTTPS POST + Bearer token\n    ▼\n┌────────────────────────┐\n│  mcp.anchord.ai        │  CloudFront (TLS, routing)\n└───────────┬────────────┘\n            ▼\n┌────────────────────────┐\n│  Lambda (stateless)    │  Per-request MCP server\n│  Bearer → ApiClient    │  No stored secrets\n└───────────┬────────────┘\n            │  HTTPS + Bearer auth\n            ▼\n┌────────────────────────┐\n│  Anchord API           │  Same hosted SaaS backend\n└────────────────────────┘\n```\n\nBoth paths expose the same 11 MCP tools and connect to the same API.\n\n---\n\n## FAQ\n\n### Is Anchord self-hosted?\n\nNo. Anchord is a hosted SaaS platform. This MCP server is a thin client\nthat calls the Anchord API. You need an API key from\n[app.anchord.ai/signup](https://app.anchord.ai/signup).\n\n### Does Anchord write to my CRMs?\n\nNo. Anchord is strictly read-only. It reads data from connected systems\n(Salesforce, HubSpot, Stripe) to build identity graphs, but never writes\nback. `guard_write` returns a decision — the caller performs any actual write.\n\n### What systems does Anchord work with?\n\nAnchord has OAuth integrations for **Salesforce**, **HubSpot**, and\n**Stripe**. You can also push records from any system via the `ingest_record`\ntool or the REST API.\n\n### What happens when there's ambiguity?\n\nWhen `resolve_*` returns `needs_review`, it means multiple candidate\nAnchorIDs matched with similar confidence. The agent should stop, surface\nthe candidates to a human, and direct them to the Anchord Review Queue.\nOnce resolved, subsequent calls return `resolved`.\n\n### What are the rate limits?\n\n120 requests/minute per tenant. Batch endpoints accept up to 200 items\n(resolve, guard) or 100 records (ingest). Plan-level monthly and daily\nquotas apply. See [docs/auth.md](docs/auth.md).\n\n---\n\n## Links\n\n- [Anchord website](https://www.anchord.ai)\n- [Sign up](https://app.anchord.ai/signup)\n- [API docs (Swagger)](https://api.anchord.ai/docs)\n- [Agent quickstart](https://www.anchord.ai/docs/agent-quickstart)\n- [Tool reference](docs/tools.md)\n- [Authentication](docs/auth.md)\n\n---\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 9710,
  "sha": "9782fe60a7c7965ca5ddadbf2d72763dc690101d64af8b8e9119f993a6a1c967",
  "repo_slug": "nolenation04/anchord-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_nolenation04_anchord_025564f9/readme"
}