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
- A portal with at least one access group
- An API key from Affinity for each person, or one for a shared connection
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in method
| Method | Type | What a person provides |
|---|---|---|
| API Key | API token | token |
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:
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
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.
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 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. NeedslistId.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. NeedsorganizationId.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. NeedsfieldId.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. NeedspersonId.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. NeedsopportunityId.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. NeedsexternalId.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. NeedsfieldId,entityIdandvalue.add_list_entry: Add a person or organization to an Affinity list. NeedslistIdandentityId.update_reminder: Update an existing reminder in Affinity. NeedsreminderId.create_reminder: Create a new reminder in Affinity, attached to a person, organization, or opportunity. Needscontent,ownerIdanddueDate.update_opportunity: Update an existing opportunity (deal) in Affinity. NeedsopportunityId.update_field_value: Update an existing field value in Affinity. NeedsfieldValueIdandvalue.create_opportunity: Create a new opportunity (deal) in Affinity. NeedsnameandlistId.create_note: Create a new note in Affinity and associate it with one or more persons, organizations, or opportunities. Needscontent.create_person: Create a new person record in Affinity. NeedsfirstNameandlastName.update_organization: Update an existing organization record in Affinity. NeedsorganizationId.create_organization: Create a new organization record in Affinity. Needsname.update_person: Update an existing person record in Affinity. NeedspersonId.update_note: Update the content of an existing note in Affinity. NeedsnoteIdandcontent.
Destructive tools (7)
delete_field_value: Delete a field value from an entity in Affinity. NeedsfieldValueId.delete_reminder: Permanently delete a reminder from Affinity. NeedsreminderId.delete_organization: Permanently delete an organization record from Affinity. NeedsorganizationId.delete_opportunity: Permanently delete an opportunity (deal) from Affinity. NeedsopportunityId.remove_list_entry: Remove a list entry. NeedslistIdandlistEntryId.delete_person: Permanently delete a person record from Affinity. NeedspersonId.delete_note: Permanently delete a note from Affinity. NeedsnoteId.
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
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Affinity there
- Tool permissions: tool filters and what employees see
- Affinity on metorial.com: the integration overview