> ## Documentation Index
> Fetch the complete documentation index at: https://backstage.spotify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Actions

> Let AI assistants answer questions about how your developer portal is used.

The Insights plugin provides MCP actions that let AI assistants, such as AiKA, Claude, or Cursor, answer questions about how people use your developer portal. For example: "How many people used the portal each day last month?" or "Which plugins get the most visits?"

> [!NOTE]
>
> Insights MCP actions require `@spotify/backstage-plugin-insights-backend`
> version `0.9.0` or later.

> [!NOTE]
>
> These actions let assistants read usage data. To track how assistants use your
> MCP tools, see [Agentic Event Capture
> Installation](https://backstage.spotify.com/docs/plugins/insights/setup-and-installation.md#agentic-event-capture-installation-optional).

## Available actions

| Action | What it does |
| - | - |
| `list-event-actions` | Lists the kinds of activity Insights records in your portal, such as page visits (`navigate`), searches, and clicks. |
| `query-usage-data` | Counts and summarizes usage data. It can filter by activity type, plugin, and date range, group results by day, week, or month, and break them down by plugin, page, or search term. |

## Who can use the actions

Anyone with permission to view Insights can use these actions. People who can't view Insights don't see them. See [Configure Access Controls](https://backstage.spotify.com/docs/plugins/insights/setup-and-installation.md#configure-access-controls).

## Turn on the actions

To make the actions available in your Backstage instance:

1. Make sure the MCP Actions Backend is installed. If AI assistants can already use other Backstage tools in your instance, such as catalog or Soundcheck tools, it's installed. Otherwise, see the [MCP overview](https://backstage.spotify.com/docs/portal/core-features-and-plugins/mcp/overview).

2. Add `backstage-insights` to the list of plugins that share actions in your `app-config.yaml`:

   ```yaml app-config.yaml theme={"theme":{"light":"github-light","dark":"dracula"}}
   backend:
     actions:
       pluginSources:
         - backstage-insights
   ```

3. Restart Backstage. The Insights actions now appear alongside your other MCP tools.
