Skip to main content

Copilot Studio Integration

This guide walks through connecting a Microsoft Copilot Studio agent to the Media Intelligence API, so the agent can search media coverage on your behalf without any code written against the REST API.

The connection uses the Model Context Protocol (MCP), an open standard that lets AI agents call external tools. We expose an MCP server at:

https://apigateway.agilitypr.com/api/mcp

Today this server provides a single tool, Agility Media Mention Search (ad_hoc_search), which mirrors the ad-hoc search endpoint. Once connected, your agent can search news and social coverage for a brand, person, or topic, including boolean query logic, filters, and facet breakdowns.

Copilot Studio connects to our MCP server with an API key generated from your Agility account.

Prerequisites​

Before you start, make sure you have:

  • An Agility account with access to the Media Monitoring APIs. If you're unsure whether your account has this enabled, check with your Agility representative. If you're not yet an Agility client, book a demo to get started.
  • Permission to create API keys. You'll need the API Key Manager permission in the Agility Platform. See Get an API key for how to request it and provision a key.
  • A Copilot Studio agent you can edit. The MCP server is added as a tool on an existing agent.
note

Access to social media coverage (e.g. X/Twitter, Reddit, YouTube) depends on your account's provisioning. If social mentions aren't returned as expected, check with your Agility representative.

Setup​

Microsoft's guide, Connect your agent to an existing Model Context Protocol (MCP) server, covers the full onboarding wizard. The steps below cover the values specific to our server.

  1. Provision an API key in the Agility Platform by following Get an API key. Keep it handy for steps 4 and 6.

  2. In Copilot Studio, open your agent and click + next to Tools.

    Tools section of a Copilot Studio agent with the add button
  3. In the Add a tool dialog, click + Add, then select Model Context Protocol (MCP).

    Add a tool dialog with the Add menu open and Model Context Protocol (MCP) highlighted
  4. In the Add MCP server dialog, fill in:

    • Server name: e.g. Agility Ad-hoc Search

    • Server description: a short description the agent uses to decide when to call the server, e.g. Searches across the Agility media mention database with a given query

    • Server URL:

      https://apigateway.agilitypr.com/api/mcp
    • Authentication: API key

    • Parameter type: Header

    • Header name: apiKey

    • Key value: the API key from step 1

    Add MCP server dialog filled in with server name, description, URL, and API key header authentication

    Click Add. The Select a connection dialog appears.

  5. Open the Connection dropdown and select Create new connection.

    Select a connection dialog with the Connection dropdown open and Create new connection highlighted
  6. Optionally enter a Display name, then enter the same API key from step 1 in the apiKey field. Click Create.

    Create connection dialog with display name and apiKey fields filled in
  7. Back in Select a connection, click Add. The server now appears under Tools on your agent, using the server name from step 4.

    Agent overview with the Agility Ad-hoc Search server listed under Tools
note

Every search the agent runs uses the permissions of the API key on the connection. The agent can only see coverage that key's account is provisioned for. Treat the key like a password, and see Microsoft's documentation for how connections are shared with your agent's users.

Usage​

Once the tool is added, test it from the agent's test pane, then ask in plain language what you're looking for. For example:

  • "Search for news coverage of Tesla recalls from the last 7 days."
  • "Find negative sentiment articles mentioning our brand in the last month, and summarize the main themes."
  • "Break down Tesla coverage from the last 7 days by media type and sentiment."

The agent translates the request into a boolean search expression, filters, and any requested facet breakdowns, calls the ad_hoc_search tool, and works with the results.