KosmoKrator

crm

Affinity MCP, CLI, and Lua Integration for AI Agents

Affinity integration docs for AI agents: MCP gateway setup, Affinity CLI commands, Lua API reference, credentials, and function schemas.

8 functions 6 read 2 write API key auth

Affinity for agents

Credentials can be configured manually in web or CLI hosts.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Machine-Readable Metadata
integration_slug
affinity
route_slug
affinity
package
affinity
auth_strategy
api_key API key
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
true

Quick Links

Affinity MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Affinity.

Affinity CLI Matrix

Use these pages for direct Affinity CLI workflows in scripts, CI, cron, and agent wrappers.

Function Catalog

FunctionTypeParametersDescription
affinity.affinity_list_contacts Read read 2 List contacts from Affinity CRM. Returns contact names, emails, phone numbers, and associated organizations. Use pagination to retrieve large result sets.
affinity.affinity_get_contact Read read 1 Get details for a specific contact in Affinity by its ID. Returns the contact's full profile including name, emails, phone numbers, organization, and custom fields.
affinity.affinity_create_contact Write write 4 Create a new contact in Affinity CRM. Provide at least a first name or last name. Optionally include email addresses.
affinity.affinity_list_organizations Read read 2 List organizations from Affinity CRM. Returns organization names, domains, and details. Use pagination to retrieve large result sets.
affinity.affinity_get_organization Read read 1 Get details for a specific organization in Affinity by its ID. Returns the organization's full profile including name, domain, people, and custom fields.
affinity.affinity_create_organization Write write 2 Create a new organization in Affinity CRM. Provide a name (required) and optionally a domain.
affinity.affinity_list_lists Read read 0 List all lists in Affinity CRM. Returns list names, types (contact or organization), and ownership details.
affinity.affinity_get_current_user Read read 0 Get the currently authenticated Affinity user's profile. Useful for verifying API credentials and identifying the active account.