Affinity MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AFFINITY_API_KEY | Yes | Your Affinity API key |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| affinity_whoamiA | Verify authentication and get current user info, organization details, and API key permissions. Use this to confirm your API key is working and see what you have access to. Returns (JSON): { "user": { "id": number, // User ID "email": string, // Email address "name": string // Full name }, "tenant": { "id": number, // Organization ID "name": string, // Organization name "subdomain": string // Affinity subdomain }, "permissions": string[], // API permissions granted "summary": string // Human-readable summary } Example usage:
|
| affinity_list_companiesA | List companies (organizations) from Affinity CRM. Returns company records with optional field data. Without fieldTypes parameter, returns only basic info (id, name, domain, domains, isGlobal). Field Types:
Important Notes:
Returns (JSON): { "data": [ { "id": number, // Company ID "name": string, // Company name "domain": string, // Primary domain "domains": string[], // All domains "isGlobal": boolean, // Is shared record "fields": [...] // Field data (if requested) } ], "count": number, // Items in response "hasMore": boolean, // More results available "nextCursor": string|null, // Pagination cursor "summary": string // Human-readable summary } Example enriched fields returned:
|
| affinity_get_companyA | Get a single company by ID from Affinity CRM. Returns company details with optional field data. Without fieldTypes/fieldIds, returns only basic info (id, name, domain, domains, isGlobal). Field Types:
Returns (JSON): { "id": number, // Company ID "name": string, // Company name "domain": string, // Primary domain "domains": string[], // All domains "isGlobal": boolean, // Is shared record "fields": [ // Field data (if requested) { "id": string, // Field ID "type": string, // "enriched" or "global" "name": string, // Field name "value": { "type": string, // Value type "data": any // Field value } } ] } Example field IDs you can request:
|
| affinity_search_companiesA | Search for companies (organizations) in Affinity by name or domain. This is a V1 API endpoint - search is NOT available in V2. Use this tool to:
Search Behavior:
Global vs Custom Organizations:
Parameters:
Returns (JSON): { "organizations": [ { "id": number, // Use with V2 affinity_get_company "name": string, "domain": string | null, "domains": string[], "global": boolean, // true=shared, false=custom "interaction_dates": {} // if requested } ], "next_page_token": string | null, "count": number, "hasMore": boolean } Example use cases:
|
| affinity_create_companyA | Create a new company (organization) in Affinity. This is a V1 API endpoint - creation is NOT available in V2. Required fields:
Optional fields:
Important:
Returns (JSON): { "id": number, // Use this ID with other tools "name": string, "domain": string | null, "domains": string[], "global": false // Always false for created companies } Example workflow:
|
| affinity_list_personsA | List persons (contacts) from Affinity CRM. Returns person records with optional field data. Without fieldTypes parameter, returns only basic info (id, firstName, lastName, primaryEmailAddress, emailAddresses, type). Field Types:
Important Notes:
Returns (JSON): { "data": [ { "id": number, // Person ID "firstName": string, // First name "lastName": string, // Last name "primaryEmailAddress": string, // Main email "emailAddresses": string[], // All emails "type": string, // "internal" or "external" "fields": [...] // Field data (if requested) } ], "count": number, // Items in response "hasMore": boolean, // More results available "nextCursor": string|null, // Pagination cursor "summary": string // Human-readable summary } Enriched fields (8):
Relationship Intelligence fields (9):
|
| affinity_get_personA | Get a single person by ID from Affinity CRM. Returns person details with optional field data. Without fieldTypes/fieldIds, returns only basic info (id, firstName, lastName, primaryEmailAddress, emailAddresses, type). Field Types:
Returns (JSON): { "id": number, // Person ID "firstName": string, // First name "lastName": string, // Last name "primaryEmailAddress": string, // Main email "emailAddresses": string[], // All emails "type": string, // "internal" or "external" "fields": [ // Field data (if requested) { "id": string, // Field ID "type": string, // "enriched", "global", or "relationship-intelligence" "name": string, // Field name "value": { "type": string, // Value type "data": any // Field value } } ] } Example field IDs you can request:
|
| affinity_search_personsA | Search for persons (contacts) in Affinity by email, first name, or last name. This is a V1 API endpoint - search is NOT available in V2. Use this tool to:
Search Behavior:
Parameters:
Returns (JSON): { "persons": [ { "id": number, "first_name": string, "last_name": string, "primary_email": string | null, "emails": string[], "type": number, // 0=external, 1=internal "interaction_dates": {}, // if requested "current_organization_ids": [] // if requested } ], "next_page_token": string | null, "count": number, "hasMore": boolean } Example use cases:
|
| affinity_create_personA | Create a new person (contact) in Affinity. This is a V1 API endpoint - creation is NOT available in V2. Required fields:
Optional fields:
Important:
Returns (JSON): { "id": number, // Use this ID with other tools "first_name": string, "last_name": string, "primary_email": string | null, "emails": string[], "type": 0 // 0 = external contact } Example workflow:
|
| affinity_list_listsA | Get all lists in Affinity CRM. Lists are spreadsheet-like collections containing companies, persons, or opportunities. Each list has custom fields for tracking deals, contacts, etc. Returns (JSON): { "data": [ { "id": number, // List ID (use for affinity_get_list_entries) "name": string, // List display name "type": string, // "company", "person", or "opportunity" "creatorId": number, // User who created the list "ownerId": number, // User who owns the list "isPublic": boolean // Whether visible to all users } ], "count": number, // Items in response "hasMore": boolean, // More results available "nextCursor": string|null, // Pagination cursor "summary": string // Human-readable summary } Note: To get list fields/columns, use GET /v2/lists/{listId}/fields (not yet implemented). To get list entries (rows), use affinity_get_list_entries with the list ID. |
| affinity_get_list_entriesA | Get entries (rows) from a specific Affinity list. Each entry represents a company, person, or opportunity on the list with its field values. Returns (JSON): { "data": [ { "id": number, // Entry ID (unique within this list) "listId": number, // The list this entry belongs to "creatorId": number, // User who added the entry "type": string, // "company", "person", or "opportunity" "createdAt": string, // When entry was added (ISO timestamp) "entity": { "id": number, // Company/Person/Opportunity ID "name": string, // Entity name "domain": string, // Domain (for companies) "isGlobal": boolean, // Is shared record "fields": [ // Field values (if requested) { "id": string, "type": string, "name": string, "value": { "type": string, "data": any } } ] } } ], "count": number, // Items in response "hasMore": boolean, // More results available "nextCursor": string|null, // Pagination cursor "summary": string // Human-readable summary } Field Types:
Important: Fields are nested inside entity.fields, not at the entry level. |
| affinity_list_opportunitiesA | List opportunities from Affinity CRM. Opportunities represent deals, fundraising leads, or other tracked items that belong to opportunity-type lists. Returns (JSON): { "data": [ { "id": number, // Opportunity ID "name": string, // Opportunity name "listId": number // The list this opportunity belongs to } ], "count": number, // Items in response "hasMore": boolean, // More results available "nextCursor": string|null, // Pagination cursor "summary": string // Human-readable summary } Important Notes:
Example workflow:
|
| affinity_get_opportunityA | Get a single opportunity by ID from Affinity CRM. Returns basic opportunity info only (id, name, listId). Returns (JSON): { "id": number, // Opportunity ID "name": string, // Opportunity name "listId": number // The list this opportunity belongs to } Important: To get field data (Status, Amount, Owners, etc.), use affinity_get_list_entries with the opportunity's listId and fieldTypes: ["list"]. |
| affinity_list_company_notesA | List all notes attached to a specific company in Affinity. This is a V2 BETA endpoint - API may change. Returns notes with HTML content, creator information, and timestamps. Parameters:
Returns (JSON): { "notes": [ { "id": number, "content": { "html": string }, "creator": { "id": number, "firstName": string, "lastName": string, "primaryEmailAddress": string }, "createdAt": string, // ISO 8601 "type": "entities" | "interaction" } ], "count": number, "hasMore": boolean, "nextCursor": string | null } Note Types:
Example: Get notes for Sure Valley Ventures (ID: 223449211) |
| affinity_add_noteA | Create a new note attached to companies, persons, or opportunities in Affinity. This is a V1 API endpoint. IMPORTANT: Notes are add-only. Edit and delete are not supported by this MCP. Required:
Optional:
HTML Content Examples:
Returns (JSON): { "success": true, "note": { "id": number, // New note ID "content": string, "creator_id": number, "organization_ids": number[], "person_ids": number[], "opportunity_ids": number[], "created_at": string // ISO 8601 } } Example - Add note with link to company: { "content": "Received pitch deck: View Deck", "companyIds": [223449211], "contentType": "html" } Use Cases:
|
| affinity_get_listA | Get metadata for a single Affinity list (deal pipeline). Returns basic list information: name, type, visibility, owner. Parameters:
Returns (JSON): { "id": number, "name": string, // e.g., "SVV Deal Funnel" "type": string, // "company", "person", or "opportunity" "isPublic": boolean, "creatorId": number, "ownerId": number } List Types:
Next Steps:
|
| affinity_get_list_fieldsA | Get field definitions for an Affinity list. Returns all fields available on a list, including:
Parameters:
Returns (JSON): { "fields": [ { "id": "field-1022243", "name": "Status", "type": "list", // "list", "global", or "enriched" "valueType": "ranked-dropdown", "allowedValues": [ // Only for dropdown fields { "text": "Lead", "rank": 0, "color": "none" }, { "text": "Portfolio", "rank": 7, "color": "purple" } ] } ], "count": number, "hasMore": boolean } Field Types:
Value Types:
|
| affinity_get_swimlanesA | Get pipeline stages (swimlanes) for an Affinity list. Swimlanes are the columns in a deal pipeline view (e.g., Lead, Meeting, Portfolio). They come from the Status field which is a ranked-dropdown. Parameters:
Returns (JSON): { "listId": number, "listName": string, "statusFieldId": string, // Use this to filter entries "swimlanes": [ { "id": number, // dropdownOptionId - use for filtering "text": "Lead", // Display name "rank": 0, // Sort order (0 = first) "color": "none" // Visual indicator }, { "id": number, "text": "Portfolio", "rank": 7, "color": "purple" } ], "count": number } Use Cases:
Note: If no Status field exists, returns error. Not all lists have swimlanes. |
| affinity_get_companies_in_swimlaneA | Get all companies at a specific pipeline stage (swimlane). Returns companies filtered by their Status field value in a list. Important: This tool performs client-side filtering since the Affinity API doesn't support server-side filtering by status. For large lists (>100 entries), use pagination parameters. Parameters:
Returns (JSON): { "companies": [ { "id": number, "name": string, "domain": string, "isGlobal": boolean, "status": { "text": "Portfolio", "rank": 7, "color": "purple", "dropdownOptionId": number }, "listEntryId": number, "createdAt": string } ], "count": number, "swimlaneText": string, "listName": string, "hasMore": boolean } Workflow:
Use Cases:
|
| affinity_get_company_listsA | Get all lists where a specific company appears. Returns list metadata for each list containing this company. Useful for discovering which deal pipelines track a specific company. Parameters:
Returns (JSON): { "lists": [ { "id": number, "name": string, // e.g., "SVV Deal Funnel" "type": string, // "company", "person", or "opportunity" "isPublic": boolean, "creatorId": number, "ownerId": number } ], "count": number, "hasMore": boolean, "nextCursor": string | null } Note: Returns empty array if company not on any lists (very common). Use Cases:
Next Steps:
|
| affinity_get_company_list_entriesA | Get all list entries for a company across ALL lists with full field data. Returns complete list entry data including:
Parameters:
Returns (JSON): { "entries": [ { "id": number, // List entry ID "listId": number, // Which list this entry is on "creatorId": number, "createdAt": string, // ISO 8601 "fields": [ { "id": "field-1022243", "name": "Status", "type": "list", // "list", "global", "enriched", "relationship-intelligence" "value": { "type": "ranked-dropdown", "data": { "text": "Portfolio", "rank": 7, "color": "purple" } } } ] } ], "count": number, "hasMore": boolean, "nextCursor": string | null, "summary": { "totalEntries": number, "listsWithEntries": number, "fieldsPerEntry": number } } Note: Returns empty array if company not on any lists (very common). Use Cases:
Field Types Included:
|
| affinity_list_person_notesA | List all notes attached to a specific person in Affinity. This is a V2 BETA endpoint - API may change. Returns notes with HTML content, creator information, and timestamps. Includes notes attached to meetings/emails if interaction info is present. Parameters:
Returns (JSON): { "notes": [ { "id": number, "content": { "html": string }, "creator": { "id": number, "firstName": string, "lastName": string, "primaryEmailAddress": string }, "createdAt": string, // ISO 8601 "type": "entities" | "interaction", "interaction": { // Only if type === "interaction" "id": number, "type": "meeting" | "email" } } ], "count": number, "hasMore": boolean, "nextCursor": string | null } Note Types:
Example: Get notes for Barry Downes (ID: 66880587) |
| affinity_list_opportunity_notesA | List all notes attached to a specific opportunity in Affinity. This is a V2 BETA endpoint - API may change. Returns notes with HTML content, creator information, and timestamps. Parameters:
Returns (JSON): { "notes": [ { "id": number, "content": { "html": string }, "creator": { "id": number, "firstName": string, "lastName": string, "primaryEmailAddress": string }, "createdAt": string, // ISO 8601 "type": "entities" | "interaction" } ], "count": number, "hasMore": boolean, "nextCursor": string | null } Note Types:
Use Cases:
|
| affinity_get_field_valuesA | Retrieve all field values for a specific entity (person, organization, opportunity, or list entry). This is a V1 API endpoint - field values GET is NOT available in V2. Returns complete custom field data for an entity including:
Use Cases:
Important: Exactly ONE Entity Parameter Required The API enforces that you must specify exactly one of:
Providing zero parameters or multiple parameters will result in a 422 error. Field Types: Field values include a value_type that indicates the data type:
Global vs List-Specific Fields:
Field Name Resolution: Field values only contain field_id. To get field names:
Parameters: Choose exactly ONE:
Returns (JSON): { "fieldValues": [ { "id": number, // Field value ID "field_id": number, // Field definition ID (resolve with GET /fields) "entity_id": number, // Entity this value belongs to "entity_type": number, // 0=person, 1=organization, 2=opportunity "list_entry_id": number | null, // null=global, number=list-specific "value": any, // The actual value (type varies) "value_type": number, // 0-9 (see types above) "value_type_name": string, // Human-readable type name "created_at": string, // ISO timestamp "updated_at": string | null // ISO timestamp or null } ], "count": number, "entity_type": string, // "Person", "Organization", "Opportunity" "summary": string } Example Use Cases:
Error Handling:
|
| affinity_get_field_value_changesA | Retrieve change history for a specific field, showing who changed what and when. This is a V1 API endpoint - field value changes GET is NOT available in V2. Returns complete audit trail for field modifications including:
CRITICAL: Not All Fields Support Change Tracking The API only supports change tracking for SOME fields. Common patterns:
If a field doesn't support tracking, the API returns 422 error: "Tracking changes for this entity attribute is not yet supported" Use Cases:
Required Parameter:
Optional Filters:
Action Type Enum (INTEGER values):
Returns (JSON): { "changes": [ { "id": number, // Change record ID "field_id": number, // Field that changed "field_value_id": number|null, // Field value record "changer": { "id": number, "first_name": string, "last_name": string, "primary_email": string|null }, "changed_at": string, // ISO timestamp "action_type": number, // 0, 1, or 2 "action_type_name": string, // "Create", "Update", "Delete" "value": any, // New value "previous_value": any // Old value (if update) } ], "count": number, "field_id": number, "action_type_distribution": { // Summary stats "create": number, "update": number, "delete": number }, "unique_changers": number, "summary": string } Example Use Cases:
Important Notes:
Error Handling:
|
| affinity_get_persons_fieldsA | Retrieve all global (account-wide) field definitions for persons. This is a V1 API endpoint - persons fields GET is NOT available in V2. Returns complete schema information for person fields including:
Use Cases:
No Parameters Required: This is a simple GET request with no parameters. Returns all global person fields. Returns (JSON): { "fields": [ { "id": number, // Field identifier "name": string, // Field display name "value_type": number, // 0-9 enum (see types below) "value_type_name": string, // Human-readable type "allows_multiple": boolean, // Can have multiple values "dropdown_options": [...], // Available choices (if dropdown) "enrichment_source": string // e.g., "affinity-data", "crunchbase" } ], "count": number, "by_type": { // Distribution by field type "Dropdown": number, "Text": number, ... }, "by_source": { // Distribution by data source "affinity-data": number, "none": number, ... }, "summary": string } Field Value Types:
Enrichment Sources:
Example Use Cases:
Response Format: Use responseFormat parameter to get either:
|
| affinity_get_organizations_fieldsA | Retrieve all global (account-wide) field definitions for organizations/companies. This is a V1 API endpoint - organizations fields GET is NOT available in V2. Returns complete schema information for organization fields including:
Use Cases:
No Parameters Required: This is a simple GET request with no parameters. Returns all global organization fields. Returns (JSON): { "fields": [ { "id": number, // Field identifier "name": string, // Field display name "value_type": number, // 0-9 enum (see types below) "value_type_name": string, // Human-readable type "allows_multiple": boolean, // Can have multiple values "dropdown_options": [...], // Available choices (if dropdown) "enrichment_source": string // e.g., "crunchbase", "dealroom" } ], "count": number, "by_type": { // Distribution by field type "Dropdown": number, "Text": number, "Number": number, ... }, "by_source": { // Distribution by data source "crunchbase": number, "dealroom": number, "affinity-data": number, "none": number }, "custom_fields": number, // Count of non-enriched fields "enriched_fields": number, // Count of enriched fields "summary": string } Field Value Types:
Enrichment Sources:
Example Use Cases:
Response Format: Use responseFormat parameter to get either:
|
| affinity_get_relationship_strengthsA | Find who on your team has the strongest connections to an external contact. This is a V1 API endpoint - NOT available in V2. Essential for warm introductions - discover hidden network connections between your team and prospects. Use Case: "Who should make the introduction to this prospect?" Required Parameter:
Optional Parameters:
Returns: Array of relationships with strength scores (0.0-1.0):
Important Limitations:
Example: Query: external_id=123456 Result: Shows Alice (92% strength), Bob (65% strength) know this person Action: Ask Alice to make the warm introduction |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alludium/affinity-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server