Skip to main content

Supported surfaces

The following surfaces do not currently support remote MCP servers:
  • Copilot chat on github.com and copilot.com
  • The GitHub mobile apps
Why are those surfaces unsupported? Remote MCP currently requires HTTP custom-header support, which Copilot chat on github.com / copilot.com and the GitHub mobile apps don’t yet expose. Microsoft / GitHub may add this later; check their changelog.
An Affinity Agent is coming to the Agent Store soon for a more streamlined setup.
UI rendering is not yet supported on Copilot surfaces. Copilot Studio, Copilot CLI, and Copilot in VS Code do not render UI components returned by MCP tools (such as interactive graphs, market maps, or visual outputs). Tool results that include rendered HTML or UI will be returned as plain text or raw data. Use a surface that supports full MCP rendering if your workflow depends on visual tool outputs.

Prerequisites

Affinity
  • Plan: Scale, Advanced, or Enterprise (required for API and MCP access).
  • Admin setup: None required by default. If an Affinity admin has disabled Copilot under Settings → Affinity MCP, ask them to re-enable it.
Microsoft Copilot Studio
  • Certified connector: The Affinity MCP connector is available in the Microsoft Learn connector reference. No manual installation is required — search for Affinity MCP directly in your Power Platform environment.
  • License: A Microsoft Copilot Studio license is required. MCP tools authored in Studio inherit the publisher’s licensing for end users.
  • Microsoft 365 admin access: Publishing the agent to Microsoft 365 surfaces (Copilot, Teams, Outlook) requires a Microsoft 365 admin to approve it in the Microsoft 365 admin center (Agents → All agents). If you aren’t an admin, ask one to approve it. See Approve the agent.
  • Classic experience required: Copilot Studio’s new authoring experience has a known bug with certified connectors — use the classic experience instead. See Step 1 in the OAuth setup below.
GitHub Copilot (CLI and VS Code)
  • An active GitHub Copilot subscription (Individual, Business, or Enterprise).
  • An Affinity API key. See Authentication.

The Affinity MCP connector is available as a certified connector in the Microsoft Power Platform catalog. OAuth authentication is handled via your Affinity account — no API key required. Setup is performed by the agent author. Once added, the tool is available to every user of the agent.

Step 1: Open Copilot Studio classic experience

Known limitation — use the classic experience. Copilot Studio’s new authoring experience has a bug with certified (shared) connectors: adding one returns OperationRequiresUserDefinedApi. This affects any certified connector, not just Affinity MCP. Until Microsoft fixes this, use the classic experience instead. To report or track the issue, search the Microsoft Copilot Studio Community or contact Microsoft Support.
  1. Go to Copilot Studio and open the … menu at the bottom of the left sidebar.
Copilot Studio sidebar ... menu showing Open classic experience option

The ... menu in Copilot Studio with Open classic experience highlighted.

  1. Select Open classic experience.
Copilot Studio classic experience showing What would you like to build?

The Copilot Studio classic experience home page.

Step 2: Create an agent

  1. Click Agents in the left sidebar.
Copilot Studio classic experience with Agents highlighted in the left sidebar

The Agents section in the Copilot Studio classic experience left sidebar.

  1. Click Create blank agent.
Agents page in Copilot Studio classic experience showing Create blank agent button

The Agents page with the Create blank agent button.

  1. Give the agent a name and description, then click Create. Suggested values:
    • Name: Affinity
    • Description: Custom agent that connects Affinity to Copilot
Copilot Studio classic experience agent overview showing Affinity - agent with status Ready

The agent overview page after creation, showing the agent is ready.

Step 3: Add the Affinity MCP tool

  1. Click the Tools tab in the top navigation.
Agent overview showing the Tools tab in the top navigation bar

The agent overview page with the Tools tab in the top navigation.

  1. Click + Add a tool.
Tools tab showing Create your first tool empty state with Add a tool button

The Tools tab empty state with the Add a tool button.

  1. In the tool catalog, search for Affinity MCP and select Invoke MCP Server under Model Context Protocol.
Add tool dialog showing Affinity MCP search results with Invoke MCP Server under Model Context Protocol

Searching for Affinity MCP in the tool catalog showing Invoke MCP Server under Model Context Protocol.

Step 4: Select your connection

A Select a connection dialog appears showing the Affinity MCP connector.
  1. If you already have an active Affinity connection, select it from the dropdown and skip to step 3.
  2. If not, click Create new connection. You will be redirected to Affinity — sign in with your Affinity credentials, review the requested permissions, and click Allow. See Authentication for details on the consent screen.
Add tool dialog in Copilot Studio showing Not connected state with Create new connection option

The Add tool dialog showing no existing connections and the Create new connection option.

  1. After authorizing, you are redirected back to Copilot Studio. The connection appears with a green checkmark. Click Add to attach the tool to your agent.
Add tool dialog showing Affinity - demo - connection with green checkmark and Add button

The Add tool dialog after a successful connection, ready to click Add.

Keep Credentials set to End user. After adding the tool, open its settings and confirm Credentials to use is set to End user credentials (not Maker-provided). This ensures each person who uses the agent signs in with their own Affinity account. If you set it to Maker and publish the agent org-wide, all users will read and write Affinity data as you.
Copilot Studio tool details showing Credentials to use dropdown with End user credentials selected and Maker-provided credentials as the alternative

The tool's Additional details panel showing Credentials to use set to End user credentials.

Step 5: Test your connection

In the Test your agent panel, type a prompt such as:
  • who am i?
  • Find 3 companies I emailed in the last 30 days.
  • Show me my upcoming meetings.
If Affinity data comes back, your agent is connected and working.
Copilot Studio Test your agent panel showing who am i query returning Affinity user data

The Test your agent panel showing a successful Affinity MCP response.


Publish your Copilot Studio agent to Microsoft 365

Once your agent is built and tested, you can publish it so it appears in Microsoft 365 Copilot (Teams, Outlook, and the Microsoft 365 app) for you and your organization.

Step 1: Open the Evaluation tab

Click the Evaluation tab in the agent top navigation. Running an evaluation before publishing is recommended — it lets you verify your agent’s responses at scale before rolling it out.
Copilot Studio Evaluation tab with Create a test set button

The Evaluation tab in Copilot Studio showing the option to create a test set.

Step 2: Create a test set

Click Create a test set. The new evaluation page opens with options for data type and data source.
New evaluation page in Copilot Studio showing Single response data type and data source options

The new evaluation page showing data type and data source options.

Step 3: Select Quick question set

Under More ways to start, click Quick question set. Copilot Studio automatically generates 10 questions based on your agent’s description and capabilities.
New evaluation page showing Quick question set option under More ways to start

The new evaluation page with the Quick question set option highlighted.

Step 4: Run the evaluation

Review the 10 generated test cases. Give the test set a name (e.g. Evaluate Affinity - agent) and click Run.
Review your test cases page showing 10 questions about Affinity CRM with Configure test set panel and Run button

The test case review page showing 10 AI-generated questions and the Run button.

Step 5: Confirm results and publish

Once the run completes, review the results. Then click Publish in the top-right corner of the agent.
Evaluation results page showing Pass 10/10 with 100% answer quality score and Publish button in top navigation

The test run results showing 10/10 passing with a 100% answer quality score.

Submit to your org catalog

After publishing, submit the agent for admin approval so it appears org-wide in Microsoft 365.

Step 1: Go to Channels

Click the Channels tab in the agent top navigation.
Copilot Studio Channels tab showing published agent status and Microsoft 365 and Microsoft Teams channel option

The Channels tab showing published agent status and available Microsoft channels.

Step 2: Select Microsoft 365 and Microsoft Teams

Click Microsoft 365 and Microsoft Teams. A panel opens on the right showing the agent preview and availability options.
Microsoft 365 and Microsoft Teams channel panel showing agent preview with See agent in Microsoft 365 and See agent in Teams buttons

The Microsoft 365 and Microsoft Teams channel panel showing the Affinity agent preview.

Step 3: Add the channel

Click Add channel at the bottom of the panel. A The channel was added confirmation appears at the top of the screen.

Step 4: Open Availability options

Click Availability options in the agent preview card.
Microsoft 365 and Microsoft Teams channel panel showing the channel was added confirmation and Availability options button

The Microsoft 365 and Microsoft Teams panel after the channel is added, with Availability options highlighted.

Step 5: Select Show to everyone in my org

Select Show to everyone in my org. This submits the agent for admin approval so it appears in the Built by your org section of the Microsoft 365 agent store.
Availability options panel showing Show to my teammates and shared users and Show to everyone in my org options

The Availability options panel showing Show to everyone in my org.

Step 6: Submit to org catalog

Review the checklist on the Show in Teams app store for org screen, then click Submit to org catalog. The submission goes to your Microsoft 365 admin for approval before the agent appears org-wide.
Show in Teams app store for org dialog showing pre-submission checklist and Submit to org catalog button

The Show in Teams app store for org screen with the Submit to org catalog button.

Approve the agent (Microsoft 365 admin)

A Microsoft 365 admin must approve the submission before the agent appears org-wide. Go to admin.cloud.microsoft and navigate to Agents → All agents.
Microsoft 365 admin center All agents page showing Affinity - agent listed as Available

The All agents page in the Microsoft 365 admin center showing the agent registry.

Click the Requests tab. The submitted agent appears with state Pending review.
All agents Requests tab showing Affinity - agent with Pending review status and Publish request type

The Requests tab showing the Affinity agent submission pending review.

Click the agent row to open its detail panel, then click Publish to store.
Agent detail panel showing Publish to store and Reject submission options with the pending request

The agent detail panel showing the Publish to store action.

In the Publish agent to selected users wizard, choose who can install the agent and who will have it pre-installed. Setting both to All users makes the agent available to everyone in the tenant — you can also target a specific group to roll it out more narrowly. Click Next.
Publish agent wizard Select users step showing All users selected for both install and pre-install options

The Select users step of the publish wizard with All users selected for install and pre-install.

Proceed through Apply template and Accept permissions, then review the summary on Review and finish.
Review and finish step showing Affinity - agent published to All users with default policy template

The Review and finish step showing the publish summary before confirming.

Click Publish. The confirmation screen shows You published Affinity - agent.
You published Affinity - agent confirmation screen showing all steps completed and Done button

The publish confirmation screen showing the agent was successfully published to all users.

Verify in Microsoft Teams

Step 1: Find and open your agent in Microsoft Teams

Go to teams.microsoft.com, click Agents in the left sidebar, then click More agents. Search for Affinity (or the name you gave your agent). The agent appears in the results.
Microsoft Teams More agents search showing Affinity - agent result built using Microsoft Copilot Studio

Searching for the Affinity agent in the Microsoft Teams More agents catalog.

Click the agent tile and then click Open to start a chat with it.
Affinity - agent tile in Teams showing Open button, works in Teams and Copilot, and permissions overview

The Affinity agent tile showing the Open button and permissions overview.

Step 2: Test the agent

In the chat, try a prompt such as who am i? to confirm the agent is connected to Affinity and returning live data.
Microsoft Teams chat with Affinity - agent showing profile, organization, and access details in response to who am i

The Affinity agent in Microsoft Teams responding to 'who am i' with profile and organization data from Affinity.

Verify in Microsoft Copilot

Step 1: Open the agent in Microsoft Copilot

Go to copilot.cloud.microsoft. The approved agent appears under Agents in the left sidebar. Click it to open the chat.
Microsoft Copilot sidebar showing Affinity - agent listed under Agents with a message input field

Microsoft Copilot showing the Affinity agent in the left sidebar under Agents.

Step 2: Test the agent

In the chat, try a prompt such as who am i? to confirm the agent is connected to Affinity and returning live data.
Microsoft Copilot chat with Affinity - agent showing profile, organization, and access details in response to who am i

Microsoft Copilot responding to 'who am i' with profile, organization, and access details from Affinity.


Copilot Studio — API Key

Use this path if you prefer not to use the certified connector. Generate an Affinity API key first — see Authentication. Setup is performed by the agent author using Copilot Studio’s MCP onboarding wizard.
  1. In Copilot Studio, open your agent and go to the Tools tab.
  2. Click + Add a tool, then select Add new MCP. The MCP wizard appears.
Add tool dialog in Copilot Studio showing Add new MCP option highlighted

The Add tool dialog with the Add new MCP option.

  1. Fill in the server details:
    • 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
MCP server configuration form showing Affinity server name, description, URL, and API key authentication settings

The Add a Model Context Protocol server form filled in with Affinity server details.

  1. For Authentication, select API key and set:
    • Type: Header
    • Header name: Authorization
  2. Click Create. On the Add tool dialog that appears, click Create new connection.
Add tool dialog for Affinity showing Not connected state with Create new connection option

The Add tool dialog prompting to create a new connection.

  1. When prompted, enter the full bearer token including the Bearer prefix as the API key value:
Connect to Affinity dialog with display name and API key credential fields

The Connect to Affinity dialog prompting for the API key credential.

  1. Click Create, then click Add to finish.
Add tool dialog showing Affinity custom connection with green checkmark and Add button

The Add tool dialog with the connection established and ready to add to the agent.


Copilot CLI

Configure per developer.
  1. 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: *
  2. Press CTRL + S to save. Running /mcp show should show the newly added MCP server.

Copilot in VS Code

Configure per developer (or commit to the workspace).
  1. Open the Command Palette (CMD/CTRL + Shift + P) and select MCP: Add Server.
  2. When prompted for type, select HTTP (HTTP or Server-Sent Events).
  3. When prompted for a URL, enter https://mcp.affinity.co/mcp.
  4. When prompted for the name of the server, enter affinity-mcp.
  5. Open mcp.json and add a headers section with your API key:

Test your connection

Once configured, try one of these in your Copilot chat:
  • Find 3 companies I emailed in the last 30 days.
  • Show me my upcoming meetings.
  • Summarize recent activity on Acme Corp.
If you get Affinity data, you’re set. If not, see Troubleshooting.