Documentation Index
Fetch the complete documentation index at: https://developer.affinity.co/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- An Affinity account with API access (Scale, Advanced, or Enterprise)
- An MCP-compatible AI assistant (e.g., Claude Desktop, GitHub Copilot, Gemini CLI)
The hosted MCP server is available at https://mcp.affinity.co/mcp. Depending on your client,
you can connect using your Affinity API key or via OAuth.
Already using the local MCP server? Remove the existing affinity-mcp configuration from your
AI client (consult your client’s documentation for steps), then follow this guide to connect to
the hosted server.
OAuth Setup
The following clients support OAuth for a seamless connection to the Affinity hosted MCP server.
For more details on how OAuth works and how to manage access, see the Authentication page.
Claude (Desktop & Web)
Claude Code
Notion
ChatGPT
Custom connectors via remote MCP are available on Free, Pro, Max, Team, and Enterprise plans.
Free users are limited to one custom connector. On Team and Enterprise plans, only Owners can
add custom connectors to the organization. Once added, individual users can authenticate and use the connector.
Team or Enterprise Plan — Workspace Owner Setup
- Navigate to Organization settings → Connectors → Add (top right) → Custom → Web.
- In the Add custom connector module, enter:
- Name: Affinity
- Remote MCP server URL:
https://mcp.affinity.co/mcp
- Leave Advanced settings blank.
- Click Add. The connector is now available to all plan users. Proceed to the Connecting to the MCP Server section below to authenticate.
Individual Plans (Free, Pro, Max)
- Navigate to Settings → Connectors → Add custom connector.
- In the Add custom connector module, enter:
- Name: Affinity
- Remote MCP server URL:
https://mcp.affinity.co/mcp
- Leave Advanced settings blank.
- Click Add. Proceed to the Connecting to the MCP Server section below to authenticate.
Connecting to the MCP Server
- Navigate to Settings → Connectors and find the Affinity connector.
- Click the three dots on the right → Disconnect.
- Click Connect to initiate the OAuth flow.
- Once authenticated, Affinity data is accessible from your Claude conversations.
- Run the following command to register the hosted MCP server:
claude mcp add --transport http affinity-mcp https://mcp.affinity.co/mcp
- Open Claude Code and run
/mcp.
- Press Enter on the
affinity-mcp server entry.
- Select Re-authenticate to initiate the OAuth flow and authorize Affinity in your browser.
- Once authenticated, you can use the
affinity-mcp server in your Claude Code conversations.
MCP connections for Notion Custom Agents are available on Business and Enterprise plans only.
Workspace Owner SetupWorkspace Owners must first enable custom MCP servers:
- Navigate to Settings → Notion AI → AI Connectors.
- Under MCP Connections, enable the toggle for Enable custom MCP servers.
- Optionally, navigate to Settings → Notion AI → Agents and update the Control who can create agents to
restrict agent creation to certain users.
Creating an Agent
- In the left sidebar, find the Agents section and click New Agent.
- In the module that appears, click Create blank in the top right.
- In the Tools and access section, click Add connection.
- In the Add connection module, click Add custom MCP in the bottom left.
- Enter the following configuration:
- MCP server URL:
https://mcp.affinity.co/mcp
- Name: Affinity
- Authentication: OAuth
- Click Connect to initiate the OAuth flow. Once authorized, click Save in the top right.
- The agent appears under the Agents section. Click on it to start chatting and using the MCP server
This setup is only available in ChatGPT Plus plan and above. On Enterprise plans, admins can enable developer mode for all users in the organization. On all other plans, developer mode can only be enabled by admins for their own account - non-admin users cannot use this setup. See
Who can enable developer mode?
- In ChatGPT, open Settings → Apps → Advanced Settings and enable Developer mode.
- Click Create app button at the top of the modal.
- Enter the following configurations:
- Name: Affinity
- MCP Server URL:
https://mcp.affinity.co/mcp
- Authentication: OAuth
- Advanced OAuth settings → OAuth Client ID:
chatgpt
- Click Create. ChatGPT will redirect you to Affinity to complete the OAuth authorization.
- Once authorized, Affinity data will be accessible from your ChatGPT conversations.
API Key Setup
The following clients connect to the Affinity hosted MCP server using your Affinity API key —
see the Authentication page for help obtaining one.
Claude Code
ChatGPT
Gemini CLI
Copilot
Notion
Other
Run the following command with your API key filled in:claude mcp add --transport http affinity-mcp https://mcp.affinity.co/mcp \
--header "Authorization: Bearer your_api_key_here"
This setup is only available in ChatGPT Business plan and above. For other plans, use the OAuth setup above. On Enterprise plans, admins can enable developer mode for all users in the organization. On all other plans, developer mode can only be enabled by admins for their own account - non-admin users cannot use this setup. See
Who can enable developer mode?
- In ChatGPT, open Settings → Apps → Advanced Settings and enable Developer mode.
- Click Create app button at the top of the modal.
- Enter the following configurations:
- Name: Affinity
- MCP Server URL:
https://mcp.affinity.co/mcp
- Authentication: Access token / API key
- Header scheme: Bearer
- Click Create. In the list of apps, click on the newly created app and press the Connect button.
- In the text box that appears, enter your API key and press Connect Affinity.
- Click the Refresh button next to the Information header to populate the list of available actions.
- Once authorized, Affinity data will be accessible from your ChatGPT conversations.
Run the following command with your API key filled in:gemini mcp add --transport http \
--header "Authorization: Bearer your_api_key_here" \
affinity-mcp https://mcp.affinity.co/mcp
Copilot Studio
- In Copilot Studio, open your agent and go to the Tools page.
- Select Add a tool → New tool → Model Context Protocol. The MCP onboarding wizard appears.
- Fill in the server details. Copilot Studio’s agent orchestrator uses the description to decide when to route requests to Affinity, so be specific about what the server provides:
- Server name: Affinity
- Server description: Use this server to search, read, create, and update records in the user’s Affinity CRM, including companies, people, opportunities, lists, fields, notes, meetings, meeting transcripts, and reminders.
- Server URL:
https://mcp.affinity.co/mcp
- For Authentication, select API key and configure:
- Type: Header
- Header name:
Authorization
- Select Create, then on the Add tool dialog select Create a new connection.
- When prompted for the API key value, enter the full bearer token, including the
Bearer prefix:
- Select Add to agent to finish.
Copilot CLI
- Once Copilot is started, run /mcp add and enter the configuration below:
- Server Name:
affinity-mcp
- Server Type: HTTP (option 3)
- Remote server URL:
https://mcp.affinity.co/mcp
- HTTP Headers:
{"Authorization": "Bearer your_api_key_here"}
- Tools:
*
- Press CTRL + S to save. Running /mcp show should show the newly added MCP server.
Copilot (VS Code)
- Open the Command Palette (CMD/CTRL + Shift + P) and select MCP: Add Server.
- When prompted for type, select HTTP (HTTP or Server-Sent Events).
- When prompted for a URL, enter
https://mcp.affinity.co/mcp.
- When prompted for the name of the server, enter
affinity-mcp.
- Open
mcp.json and add a headers section with your API key:
{
"servers": {
"affinity-mcp": {
"url": "https://mcp.affinity.co/mcp",
"type": "http",
"headers": {
"Authorization": "Bearer your_api_key_here"
}
}
},
"inputs": []
}
MCP connections for Notion Custom Agents are available on Business and Enterprise plans only.
Workspace Owner SetupWorkspace Owners must first enable custom MCP servers:
- Navigate to Settings → Notion AI → AI Connectors.
- Under MCP Connections, enable the toggle for Enable custom MCP servers.
- Optionally, navigate to Settings → Notion AI → Agents to control who can create agents.
Creating an Agent
- In the left sidebar, find the Agents section and click New Agent.
- In the module that appears, click Create blank in the top right.
- In the Tools and access section, click Add connection.
- In the Add connection module, click Add custom MCP in the bottom left.
- Enter the following configuration:
- MCP server URL:
https://mcp.affinity.co/mcp
- Name: Affinity
- Authentication: Bearer — set the Token field to your API key
- Click Connect. The MCP server will appear with its available tools.
- Click Save in the top right. The agent appears under the Agents section — click on it to start chatting and using Affinity data.
Any MCP client that supports custom headers can connect to the Affinity hosted MCP server using an API key. Configure your client with:
- Server URL:
https://mcp.affinity.co/mcp
- Headers:
Authorization: Bearer your_api_key_here
The Authorization header must use the Bearer scheme followed by a single space and your Affinity API key. For example:Authorization: Bearer a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
Affinity validates the API key on every request and authorizes MCP tool calls using the permissions of the user who issued it. See the Authentication page for help generating an API key.
Other Clients
See MCP Clients for a full list of compatible clients.