{"_id":"@anchord/mcp-server","_rev":"3-f309fd17e9563d62b685f2646c119469","name":"@anchord/mcp-server","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@anchord/mcp-server","version":"1.0.0","keywords":["mcp","mcp-server","model-context-protocol","anchord","anchorid","identity-resolution","crm","ai-agents","salesforce","hubspot","stripe","guard","deduplication","read-only"],"author":{"url":"https://www.anchord.ai","name":"Anchord","email":"support@anchord.ai"},"license":"MIT","_id":"@anchord/mcp-server@1.0.0","maintainers":[{"name":"anchord_npm","email":"integrations@anchord.ai"}],"homepage":"https://www.anchord.ai","bugs":{"url":"https://github.com/nolenation04/anchord-mcp/issues"},"bin":{"anchord-mcp":"dist/index.js"},"dist":{"shasum":"b1033f08279f9b4015392607095456549ff82c82","tarball":"https://registry.npmjs.org/@anchord/mcp-server/-/mcp-server-1.0.0.tgz","fileCount":15,"integrity":"sha512-PTGpHx0QEGqqAidx2QvIm1x7sMlyGFMjT7Jy3p1QHBX07AXyXnciCONbKDZclKsiNGVpRZ1qP1jTKRHS8ljbdw==","signatures":[{"sig":"MEYCIQD2h4tcTVXhKV/tDf3c+ubf+sLQSsvD3Ub6bbT69TZdvQIhAPJe+Pghf6Z76jIxJjWVVtrvh5hGmKh0QhWPnYeECPA9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50573},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"1a2d22010865347792745dca11b9a4743bbca8ff","mcpName":"io.github.nolenation04/anchord","scripts":{"dev":"tsx src/index.ts","test":"node --import tsx/esm --test src/__tests__/*.test.ts","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"anchord_npm","email":"integrations@anchord.ai"},"repository":{"url":"git+https://github.com/nolenation04/anchord-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Anchord — identity resolution and pre-write safety checks for AI agents. Read-only. Backed by the hosted Anchord API.","directories":{},"_nodeVersion":"24.11.1","dependencies":{"zod":"^3.25.0","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_1.0.0_1775250708657_0.2710953728831953","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@anchord/mcp-server","version":"1.1.0","keywords":["mcp","mcp-server","model-context-protocol","anchord","anchorid","identity-resolution","crm","ai-agents","salesforce","hubspot","stripe","guard","deduplication","read-only"],"author":{"url":"https://www.anchord.ai","name":"Anchord","email":"support@anchord.ai"},"license":"MIT","_id":"@anchord/mcp-server@1.1.0","maintainers":[{"name":"anchord_npm","email":"integrations@anchord.ai"}],"homepage":"https://www.anchord.ai","bugs":{"url":"https://github.com/nolenation04/anchord-mcp/issues"},"bin":{"anchord-mcp":"dist/index.js"},"dist":{"shasum":"6d1f268b2a05eb35e9d170451ef384db6b7048ee","tarball":"https://registry.npmjs.org/@anchord/mcp-server/-/mcp-server-1.1.0.tgz","fileCount":27,"integrity":"sha512-2eXxJ4GYLRvPAQh5bG7vbGO0DRzarm67M4SXAju0+mG5+PRynzKI7by6B5xlOPzO6bMlnCokbTREcqa7HhTqAg==","signatures":[{"sig":"MEYCIQCfZjuCY1I0hgFJQUSDQ4foATBRiBoT03IYYTTvL9v60wIhAIfASuJPQBGFRjmXI73smJ4/OecG8jgXzUqkQxfabzyq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68922},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"5311c7071d1e05ca1eeefc3535986e65eeaf07c8","mcpName":"io.github.nolenation04/anchord","scripts":{"dev":"tsx src/index.ts","test":"node --import tsx/esm --test src/__tests__/*.test.ts","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"anchord_npm","email":"integrations@anchord.ai"},"repository":{"url":"git+https://github.com/nolenation04/anchord-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Anchord — identity resolution and pre-write safety checks for AI agents. Read-only. Backed by the hosted Anchord API.","directories":{},"_nodeVersion":"24.11.1","dependencies":{"zod":"^3.25.0","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_1.1.0_1775347465411_0.45525243258850945","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@anchord/mcp-server","version":"1.1.1","description":"MCP server for Anchord — identity resolution and pre-write safety checks for AI agents. Read-only. Backed by the hosted Anchord API.","type":"module","main":"dist/index.js","bin":{"anchord-mcp":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsx src/index.ts","test":"node --import tsx/esm --test src/__tests__/*.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"keywords":["mcp","mcp-server","model-context-protocol","anchord","anchorid","identity-resolution","crm","ai-agents","salesforce","hubspot","stripe","guard","deduplication","read-only"],"mcpName":"io.github.nolenation04/anchord","repository":{"type":"git","url":"git+https://github.com/nolenation04/anchord-mcp.git"},"homepage":"https://www.anchord.ai","bugs":{"url":"https://github.com/nolenation04/anchord-mcp/issues"},"license":"MIT","author":{"name":"Anchord","email":"support@anchord.ai","url":"https://www.anchord.ai"},"dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","zod":"^3.25.0"},"devDependencies":{"@types/node":"^22.0.0","tsx":"^4.19.0","typescript":"^5.7.0"},"engines":{"node":">=20.0.0"},"gitHead":"41c2f4e157dcc4267e8cafa390881f2f34ca1caa","types":"./dist/index.d.ts","_id":"@anchord/mcp-server@1.1.1","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-8Er0PB7TYUtRp5VD8+KXYRya68LI6y6iJEekJuNnd1Ly4TK7AYAC+s8bPaWMakTMW6hgM0fVjumJID1L9/w2/w==","shasum":"83eae9a67b01a84865c9b395b73e1cb8f161e61a","tarball":"https://registry.npmjs.org/@anchord/mcp-server/-/mcp-server-1.1.1.tgz","fileCount":31,"unpackedSize":69569,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCyl0ai25eYq+BqQHdjlMs222F1hIEiIT/AcT4V4pZ8twIhAN/5qL9mqjuhhN84PG7i0HBW2Jer77sNTkLPJI/ZeE4I"}]},"_npmUser":{"name":"anchord_npm","email":"integrations@anchord.ai"},"directories":{},"maintainers":[{"name":"anchord_npm","email":"integrations@anchord.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_1.1.1_1775492372536_0.06415468868952501"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-03T21:11:48.519Z","modified":"2026-04-06T16:19:32.830Z","1.0.0":"2026-04-03T21:11:48.822Z","1.1.0":"2026-04-05T00:04:25.564Z","1.1.1":"2026-04-06T16:19:32.692Z"},"bugs":{"url":"https://github.com/nolenation04/anchord-mcp/issues"},"author":{"name":"Anchord","email":"support@anchord.ai","url":"https://www.anchord.ai"},"license":"MIT","homepage":"https://www.anchord.ai","keywords":["mcp","mcp-server","model-context-protocol","anchord","anchorid","identity-resolution","crm","ai-agents","salesforce","hubspot","stripe","guard","deduplication","read-only"],"repository":{"type":"git","url":"git+https://github.com/nolenation04/anchord-mcp.git"},"description":"MCP server for Anchord — identity resolution and pre-write safety checks for AI agents. Read-only. Backed by the hosted Anchord API.","maintainers":[{"name":"anchord_npm","email":"integrations@anchord.ai"}],"readme":"# 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","readmeFilename":"README.md"}