Connect Microsoft Clarity to Claude Code

Read session recordings, dashboard analytics, and behaviour insights for a Clarity project. Add Toolspoke to Claude Code once and it can use 3 Microsoft Clarity actions. Your Microsoft Clarity credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Microsoft Clarity and connect it

    Add Microsoft Clarity to a project in your Toolspoke workspace.

    Data Export API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    Data Export API token
    Clarity → Settings → Data Export → Generate new API token. Requires project admin. A token reaches only the project that issued it, so install this tool once per Clarity project.
  3. Choose what Claude Code may do

    All 3 actions only read, and any of them can be switched off for a project.

What you can ask Claude Code for

A few of the Microsoft Clarity actions that only read, so they are safe to try first.

  • Ask for Clarity dashboard metrics in plain English and get the matching rows back
  • List session recordings with playback links, filtered by behaviour, device, geography or URL
  • Search Microsoft Clarity's own documentation for setup, feature, troubleshooting and integration guidance

What Claude Code can do in Microsoft Clarity

3 actions read.

Reads

  • Query analytics dashboard

    Ask for Clarity dashboard metrics in plain English and get the matching rows back. Handles traffic, popular pages, dead and rage clicks, script errors, scroll depth, engagement time, and breakdowns by browser, device, OS, country, source or URL. Ask one thing per call and always name the time range, for example 'dead clicks by URL over the last 3 days'. This reads the project the installed credential belongs to; it takes no project argument.

  • List session recordings

    List session recordings with playback links, filtered by behaviour, device, geography or URL. Use this when you need to watch what a user actually did, dead clicks, rage clicks and quickbacks are only diagnosable from a recording. filters.date is required and is UTC ISO 8601.

  • Query documentation

    Search Microsoft Clarity's own documentation for setup, feature, troubleshooting and integration guidance. Use it to answer how Clarity itself works rather than to read any project's data.

Microsoft Clarity in Claude Code: questions

Does Claude Code see my Microsoft Clarity credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Will 3 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Microsoft Clarity action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan. Microsoft Clarity runs in a sandbox, so a call bills the sandbox time it uses.

Try Microsoft Clarity in Claude Code

Free to start, and tool calls cost nothing on any plan.