Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Agency Analytics MCP server

Vendor MCP
Open markdown

The Agency Analytics MCP connector routes your AI agent's tool calls to Agency Analytics's own MCP server through Scalekit. Each user signs in to Agency Analytics once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 39 tools.

Tools
39
What they doRead · write · destructive
17 · 21 · 117 read21 write1 destructive
Users sign in with
OAuth app
Scalekit's or your own

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Agency Analytics MCP connection

    In AgentKit > Connections, create an Agency Analytics MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Agency Analytics MCP server, so you don't need to register an OAuth app.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'agencyanalyticsmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Agency Analytics MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'agencyanalyticsmcp_browse_client_custom_metrics',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • agencyanalyticsmcp_browse_client_custom_metricsList the custom metrics available for a single client — both campaign-level and account-level — so you can discover which formula-driven KPIs exist (e.g.Read-only

    BrowseClientCustomMetrics

    List the custom metrics available for a single client — both campaign-level and account-level — so you can discover which formula-driven KPIs exist (e.g. 'Cost per Lead', 'ROAS'). Returns one row per custom metric with its id, name, data_type, change_format, scope, formula, and description. Use the returned ids with read_client_custom_metrics to fetch computed values.

    Inputs

    clientIdinteger
    The client (campaign) ID.
  • agencyanalyticsmcp_browse_client_dashboardsList all dashboards for a client/campaign.Read-only

    BrowseClientDashboards

    List all dashboards for a client/campaign. Returns paginated dashboards (10 per page). If the user does not see what they are looking for, increment page and call again. Requires client_id on every call.

    Inputs

    client_idinteger
    The client (campaign) ID. Required on every call.
    pageinteger
    Page number for pagination (default 1).
  • agencyanalyticsmcp_browse_client_data_sourcesDiscover connected providers and available metric data sources for a campaign.Read-only

    BrowseClientDataSources

    Discover connected providers and available metric data sources for a campaign. Pass message (the user's question) to filter returned data sources to only those relevant to the question. Returns providers (connected slugs) and data_sources (AAQL data source definitions with available fields and pre-hydrated filters).

    Inputs

    clientIdinteger
    No description.
    messagestring
    A description of the data you need.
    requireDateRangeboolean
    No description.default false
    testModeboolean
    No description.default false
  • agencyanalyticsmcp_browse_client_reportsList all reports for a client/campaign.Read-only

    BrowseClientReports

    List all reports for a client/campaign. Use this when no specific report was named and you need to present options or pick the most relevant one. Requires client_id on every call.

    Inputs

    client_idinteger
    The client (campaign) ID. Required on every call.
  • agencyanalyticsmcp_browse_clientsBrowse or enumerate clients.Read-only

    BrowseClients

    Browse or enumerate clients. Two modes: Folder mode (omit groupId) returns all folders with their client counts plus ungrouped clients. Drill-down mode (groupId provided) returns all clients inside the specified folder. Results are paginated via limit and offset.

    Inputs

    groupIdinteger
    Folder ID to drill into. Omit to list all folders and ungrouped clients.
    limitinteger
    Maximum number of items to return (default 50, max 200).default 50
    offsetinteger
    Zero-based pagination offset (default 0).default 0
    searchstring
    Optional text filter applied to client name or URL.
    statusstring
    Optional status filter — e.g. "active" or "inactive". Omit to return all statuses.
  • agencyanalyticsmcp_fetch_webFetch a single public web page or document by URL and return its readable text.Read-only

    FetchWeb

    Fetch a single public web page or document by URL and return its readable text. HTML is reduced to plain text; JSON, plain-text, and XML responses are returned as-is. Output is truncated to maxLength characters (default 30000).

    Inputs

    urlstringrequired
    Absolute http(s) URL to fetch, e.g. 'https://example.com/article'.
    maxLengthinteger
    Maximum characters of extracted text to return. Defaults to 30000; clamped to [1000, 100000].
  • agencyanalyticsmcp_read_client_ai_trackerFetch a client's AI Tracker analytics — how visible the brand is inside AI assistants' answers (ChatGPT, Google AI Overview, Google AI Mode, Claude, Perplexity, Gemini), broken down by a dimension.Read-only

    ReadClientAiTracker

    Fetch a client's AI Tracker analytics — how visible the brand is inside AI assistants' answers (ChatGPT, Google AI Overview, Google AI Mode, Claude, Perplexity, Gemini), broken down by a dimension. Returns one row per dimension value with AI-visibility metrics (visibility, citations, position, sentiment, citation_rate, prompts). This is AI-answer visibility — NOT Google SERP keyword rankings (use read_client_keywords for that). Supported providers (1): agency-analytics-ai-tracker-v1.

    Inputs

    clientIdinteger
    The client (campaign) ID.
    endDatestring
    End date in YYYY-MM-DD format.
    entityTypestring
    The dimension to break down AI visibility by.one of platformprompttopiccitation_domaincitation_urlby_dateby_date_platformby_date_topicdefault platform
    limitinteger
    Maximum rows to return (default 50).default 50
    providerstring
    The AI Tracker provider slug.one of agency-analytics-ai-tracker-v1
    startDatestring
    Start date in YYYY-MM-DD format.
    testModeboolean
    Set to true to return sample data without a live API call.default false
  • agencyanalyticsmcp_read_client_custom_metricsFetch the computed output of a single client's custom metrics (formula-driven KPIs such as 'Cost per Lead' or 'ROAS') over a date range.Read-only

    ReadClientCustomMetrics

    Fetch the computed output of a single client's custom metrics (formula-driven KPIs such as 'Cost per Lead' or 'ROAS') over a date range. Provide customMetricIds to read specific metrics; omit it to read every custom metric available for the client. Use browse_client_custom_metrics first to discover the available metric ids.

    Inputs

    byDateboolean
    Set to true to return values broken down by date.default false
    clientIdinteger
    The client (campaign) ID.
    customMetricIdsarray
    List of custom metric IDs to fetch. Omit to fetch all.
    endDatestring
    End date in YYYY-MM-DD format.
    startDatestring
    Start date in YYYY-MM-DD format.