Prerequisites Before you begin, create an account and get your API Key.

Getting started

Connect to Affinity CRM to manage relationships, track deals, and organize contacts through AI agents.
1

Install the SDKs (optional)

pip install klavis
2

Create a server instance

from klavis import Klavis
from klavis.types import McpServerName

klavis_client = Klavis(api_key="YOUR_API_KEY")

# Create an Affinity MCP server instance
affinity_server = klavis_client.mcp_server.create_strata_server(
    servers=[McpServerName.AFFINITY],
    user_id="user123"
)

API Reference

Full Strata API endpoints
3

Authenticate

import webbrowser

# Open OAuth authorization page
webbrowser.open(affinity_server.oauth_url)
🎉 Your Affinity MCP Server is ready! Once authentication is complete, you can use your MCP server URL with any MCP-compatible client.

Available Tools

Tool NameDescription
affinity_get_current_userGet current user information from Affinity
affinity_get_all_list_entries_on_a_listGet all List Entries on a List
affinity_get_metadata_on_all_listsGet metadata on all Lists
affinity_get_metadata_on_a_single_listGet metadata on a single List
affinity_get_metadata_on_a_single_list_fieldsGet metadata on a single List’s Fields
affinity_get_a_single_list_entry_on_a_listGet a single List Entry on a List
affinity_get_all_personsGet all Persons in Affinity
affinity_get_single_personGet a single Person by ID
affinity_get_person_fields_metadataGet metadata on Person Fields
affinity_get_person_listsGet a Person’s Lists
affinity_get_person_list_entriesGet a Person’s List Entries
affinity_get_all_companiesGet all Companies in Affinity with basic information and field data
affinity_get_single_companyGet a single Company by ID with basic information and field data
affinity_get_company_fields_metadataGet metadata on Company Fields
affinity_get_company_listsGet all Lists that contain the specified Company
affinity_get_company_list_entriesGet List Entries for a Company across all Lists with field data
affinity_get_all_opportunitiesGet all Opportunities in Affinity
affinity_get_single_opportunityGet a single Opportunity by ID
affinity_search_personsSearch for persons in Affinity. Search term can be part of an email address, first name, or last name
affinity_search_organizationsSearch for organizations / companies in Affinity. Search term can be part of organization name or domain
affinity_search_opportunitiesSearch for opportunities in Affinity. Search term can be part of opportunity name
affinity_get_all_notesGet all Notes in Affinity
affinity_get_specific_noteGet a specific note by ID
For more details about tool input schema, use the get_tools API.

Next Steps