Skip to content

SDK v1.9.0

Choose a tag to compare

@github-actions github-actions released this 22 Mar 07:00
· 78 commits to main since this release

Highlights

Accessing a company or person that was merged now raises a dedicated MergedEntityError (or CompanyMergedError/PersonMergedError) instead of a generic ValidationError. The exception provides structured source_id and target_id attributes, so you can programmatically follow merges without regex-parsing error messages. The CLI also surfaces this as a distinct entity_merged error type with structured JSON details.

What's New

  • MergedEntityError, CompanyMergedError, PersonMergedError exception classes — raised on 422 responses indicating an entity was merged into another
  • CLI: entity_merged error type with sourceId, targetId, entityType in JSON error details (exit code 4)

Quick Install

SDK only:

pip install affinity-sdk

SDK + CLI:

pipx install "affinity-sdk[cli]"

MCP Server for Claude Desktop (easiest - MCPB bundle):

  1. Install CLI: pipx install "affinity-sdk[cli]"
  2. (Optional) Pre-configure API key: xaffinity config setup-key
    • If skipped, Claude Desktop will prompt for your API key during install
  3. Install xaffinity MCP in Claude Desktop (download and double-click)

Other MCP clients (Cursor, Windsurf, VS Code, etc.) require manual configuration - see MCP docs.

Full documentation | MCP Server docs