MetorialDocs

Set up Affinity in Metorial for Claude, ChatGPT and Cursor

Share Affinity with your team in Claude, ChatGPT and Cursor through Metorial: API key sign-in, 38 tools (18 read-only).

To give your team Affinity in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Affinity integration in a Metorial portal, and each person connects with an API key. Agents can manage Affinity people, organizations, opportunities, notes, reminders, list entries and field values. The integration has 38 tools, 18 read-only, 13 write and 7 destructive, plus 9 triggers.

What you'll learn

  • How an admin shares Affinity in a portal and how each person connects
  • What Affinity asks for when you connect, and where to find it
  • How to keep the 18 read-only tools and reject the other 20

Before you start

Sign-in method

MethodTypeWhat a person provides
API KeyAPI tokentoken

API Key

To connect, a person enters:

  • token: Affinity API key. Generate from Settings > API in the Affinity web app.

Admin: share Affinity in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Affinity. For how members connect, choose Each person connects so everyone enters their own API key, or Shared connection to enter one API key for everyone.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Affinity.

Choose who gets it

Add the access groups that should see Affinity. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Affinity integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search affinity

Employee: connect Affinity

In the portal

Open Affinity in the catalog

Sign in to your portal and open Affinity. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. In the setup window, enter your API key (token).

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search affinity
metorial setup <catalog-item-id>

catalog search prints the catalog item ID.

Add it to your AI client

metorial install adds your Affinity connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list affinity
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 18 read-only tools, such as get_lists and get_fields, and lose the 13 write tools, such as create_note or update_note, and the 7 destructive tools, such as delete_note or delete_person.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list affinity
metorial tools <integration-id>
metorial call <integration-id> get_lists -d '{}'

metorial tools lists the 38 tools, minus any you rejected. get_lists takes no input. It retrieves all lists in Affinity.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (18)

  • get_list_entries: Retrieve entries from a specific Affinity list. Needs listId.
  • search_opportunities: Search for opportunity records by name.
  • list_notes: Retrieve notes from Affinity, optionally filtered by person, organization, or opportunity.
  • search_organizations: Search for organization records in Affinity by name or domain.
  • get_organization: Retrieve a single organization record by ID, including its domains, person associations, and list memberships. Needs organizationId.
  • list_reminders: Retrieve reminders from Affinity, optionally filtered by entity or owner.
  • search_persons: Search for person records in Affinity by name or email.
  • get_field_value_changes: Retrieve the history of changes to a specific field in Affinity. Needs fieldId.
  • get_lists: Retrieve all lists in Affinity.
  • get_person: Retrieve a single person record by ID, including their emails, organization associations, and optionally interaction dates. Needs personId.
  • get_fields: Retrieve field definitions (custom columns) from Affinity.
  • get_entity_files: Retrieve files attached to a person, organization, or opportunity in Affinity.
  • get_opportunity: Retrieve a single opportunity (deal) record by ID, including its list membership, person associations, and organization associations. Needs opportunityId.
  • get_interactions: Retrieve interaction metadata from Affinity for one external person, organization or opportunity, one type and a date range of no more than one year.
  • get_relationship_strengths: Query relationship strength scores between internal team members and external contacts. Needs externalId.
  • get_field_values: Retrieve field values (custom data) for entities in Affinity.
  • download_entity_file: Download an accessible file attached to an Affinity person, organization or opportunity.
  • get_current_user: Identify the authenticated Affinity user, account and API grant without changing records.

Write tools (13)

  • set_field_value: Create a new field value for an entity in Affinity. Needs fieldId, entityId and value.
  • add_list_entry: Add a person or organization to an Affinity list. Needs listId and entityId.
  • update_reminder: Update an existing reminder in Affinity. Needs reminderId.
  • create_reminder: Create a new reminder in Affinity, attached to a person, organization, or opportunity. Needs content, ownerId and dueDate.
  • update_opportunity: Update an existing opportunity (deal) in Affinity. Needs opportunityId.
  • update_field_value: Update an existing field value in Affinity. Needs fieldValueId and value.
  • create_opportunity: Create a new opportunity (deal) in Affinity. Needs name and listId.
  • create_note: Create a new note in Affinity and associate it with one or more persons, organizations, or opportunities. Needs content.
  • create_person: Create a new person record in Affinity. Needs firstName and lastName.
  • update_organization: Update an existing organization record in Affinity. Needs organizationId.
  • create_organization: Create a new organization record in Affinity. Needs name.
  • update_person: Update an existing person record in Affinity. Needs personId.
  • update_note: Update the content of an existing note in Affinity. Needs noteId and content.

Destructive tools (7)

  • delete_field_value: Delete a field value from an entity in Affinity. Needs fieldValueId.
  • delete_reminder: Permanently delete a reminder from Affinity. Needs reminderId.
  • delete_organization: Permanently delete an organization record from Affinity. Needs organizationId.
  • delete_opportunity: Permanently delete an opportunity (deal) from Affinity. Needs opportunityId.
  • remove_list_entry: Remove a list entry. Needs listId and listEntryId.
  • delete_person: Permanently delete a person record from Affinity. Needs personId.
  • delete_note: Permanently delete a note from Affinity. Needs noteId.

Triggers

Affinity has 9 triggers, which fire on events in Affinity:

  • list_events: Triggers when a list is created, updated, or deleted in Affinity.
  • field_value_events: Triggers when a field value (custom data) is created, updated, or deleted on any entity in Affinity.
  • note_events: Triggers when a note is created, updated, or deleted in Affinity.
  • file_events: Triggers when a file is uploaded or deleted on an entity in Affinity.
  • person_events: Triggers when a person record is created, updated, or deleted in Affinity.
  • reminder_events: Triggers when a reminder is created, updated, or deleted in Affinity.
  • list_entry_events: Triggers when an entity is added to or removed from an Affinity list.
  • organization_events: Triggers when an organization record is created, updated, deleted, or merged in Affinity.
  • opportunity_events: Triggers when an opportunity (deal) is created, updated, or deleted in Affinity.

Next steps