Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Supermetrics MCP server

Vendor MCP
Open markdown

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

Tools
14
What they doRead · write · destructive
8 · 4 · 28 read4 write2 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 Supermetrics MCP connection

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

    Scalekit credentials are available for Supermetrics MCP server, so you don't need to register an OAuth app. To show your own app on the consent screen, use your own credentials instead.

    Use your own OAuth app

    Supermetrics MCP uses Dynamic Client Registration (DCR) — no client ID or secret is required. The only step is creating a connection in Scalekit and authorizing your Supermetrics account.

    1. Create a connection in Scalekit

      • In the Scalekit dashboard, go to AgentKit → Connections → Create Connection.
      • Search for Supermetrics MCP and click Create.
      • Note the Connection name — use this as connection_name in your code (e.g., supermetricsmcp).
    2. Authorize your Supermetrics account

      Generate an authorization link and open it in a browser to complete the Supermetrics OAuth flow.

      The user is redirected to Supermetrics to sign in and grant access. Scalekit stores the token and injects it automatically into every tool call — no further configuration is needed.

  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 = 'supermetricsmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Supermetrics 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: 'supermetricsmcp_data_source_discovery',
    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
  • supermetricsmcp_accounts_discoveryList connected ad accounts and profiles for a marketing or advertising data source.Read-only

    Accounts Discovery

    List connected ad accounts and profiles for a marketing or advertising data source.

    Inputs

    ds_idstringrequired
    Data source identifier (e.g. `GA4`, `FA`, `ADWORDS`). Use `data_source_discovery` to list available IDs.
    compressstring
    Whether to compress the response payload.
    filterstring
    Text filter to narrow discovery results.
  • supermetricsmcp_campaign_and_resource_getRetrieve campaign details, performance metrics, or related resources from an advertising platform.Read-only

    Campaign And Resource Get

    Retrieve campaign details, performance metrics, or related resources from an advertising platform.

    Inputs

    account_idstringrequired
    Ad account or profile ID for the selected data source.
    ds_idstringrequired
    Data source identifier (e.g. `GA4`, `FA`, `ADWORDS`). Use `data_source_discovery` to list available IDs.
    max_rowsstring
    Maximum number of rows to return.
    paramsstring
    Resource-type-specific parameters. See ResourceParams for which fields apply to each resource_type.
    resource_typestring
    Type of resource to retrieve (e.g. `CAMPAIGN`, `AD_GROUP`).
  • supermetricsmcp_data_queryQuery marketing analytics data from any connected data source, with optional date ranges, field selection, and filters.Read-only

    Data Query

    Query marketing analytics data from any connected data source, with optional date ranges, field selection, and filters.

    Inputs

    ds_idstringrequired
    Data source identifier (e.g. `GA4`, `FA`, `ADWORDS`). Use `data_source_discovery` to list available IDs.
    compare_end_datestring
    End of the comparison period (YYYY-MM-DD). Required when `compare_type` is `custom`.
    compare_showstring
    How to display the comparison: - 'perc_change': percentage change (default) - 'abs_change': absolute change - 'value': raw value from the comparison period
    compare_start_datestring
    Start of the comparison period (YYYY-MM-DD). Required when `compare_type` is `custom`.
    compare_typestring
    Select how to compare results to an earlier period: - 'prev_range': previous period of the same length - 'prev_year': same period in the previous year - 'prev_year_weekday': same weekdays in the previous year - 'custom': user-defined period (requires compare_start_date and compare_end_date)
    date_range_typestring
    Preset date range (e.g. `last_30_days`, `last_month`). Use instead of `start_date`/`end_date`.
    ds_accountsstring
    List of account IDs to query data from.
    end_datestring
    End of the data range (YYYY-MM-DD).
    fieldsstring
    List of metric and dimension field names to include. Use `field_discovery` to find valid field names.
    filtersstring
    List of field filters to narrow the query results.
    max_rowsstring
    Maximum number of rows to return.
    settingsstring
    All data source-specific settings from data_source_discovery config mode. Pass as a JSON object. IMPORTANT: Every setting_id from data_source_discovery (report_type, common_settings, report-type-specific settings) MUST be passed inside this object — do NOT pass them as separate root-level parameters. Example: {"report_type": "TopIosApps", "country": "US", "list_type": "top-free"}
    start_datestring
    Start of the data range (YYYY-MM-DD).
    timezonestring
    Timezone for date calculations (e.g. `America/New_York`).
  • supermetricsmcp_data_source_discoveryList all available marketing and advertising data sources supported by Supermetrics.Read-only

    Data Source Discovery

    List all available marketing and advertising data sources supported by Supermetrics.

    Inputs

    compressstring
    Whether to compress the response payload.
    ds_idstring
    Data source identifier (e.g. `GA4`, `FA`, `ADWORDS`). Use `data_source_discovery` to list available IDs.
  • supermetricsmcp_field_discoveryList available metrics and dimensions for a specific data source.Read-only

    Field Discovery

    List available metrics and dimensions for a specific data source. Returns field names usable in `data_query`.

    Inputs

    ds_idstringrequired
    Data source identifier (e.g. `GA4`, `FA`, `ADWORDS`). Use `data_source_discovery` to list available IDs.
    compressstring
    Whether to compress the response payload.
    filterstring
    Text filter to narrow discovery results.
  • supermetricsmcp_get_async_query_resultsRetrieve results of an async `data_query` using the schedule ID returned by that query.Read-only

    Get Async Query Results

    Retrieve results of an async `data_query` using the schedule ID returned by that query.

    Inputs

    schedule_idstringrequired
    Schedule ID returned by `data_query` for async result retrieval.
    compressstring
    Whether to compress the response payload.
  • supermetricsmcp_get_todayGet the current UTC date and time.Read-only

    Get Today

    Get the current UTC date and time. Use before `data_query` to resolve relative date references.

    Inputs

    This tool takes no inputs.

  • supermetricsmcp_supermetrics_guideExplain what Supermetrics can do for this user, or show what has changed recently.Read-only

    Supermetrics Guide

    Explain what Supermetrics can do for this user, or show what has changed recently.

    Inputs

    modestring
    Use `tour` (the default) for what the user can do with Supermetrics, or `whats_new` for capabilities added recently.

Workflows

Discover available data sources

Use supermetricsmcp_data_source_discovery to list all marketing and advertising data sources connected to the user’s Supermetrics account.

const sources = await actions.executeTool({
connector: 'supermetricsmcp',
identifier: 'user_123',
toolName: 'supermetricsmcp_data_source_discovery',
toolInput: {},
});
console.log(sources);

Query marketing analytics data

Use supermetricsmcp_data_query to pull structured metrics and dimensions from a connected data source. Call field_discovery first to find valid field names, and get_today to resolve relative date references.

const report = await actions.executeTool({
connector: 'supermetricsmcp',
identifier: 'user_123',
toolName: 'supermetricsmcp_data_query',
toolInput: {
ds_id: 'GA4',
fields: ['Sessions', 'Conversions', 'Date'],
date_range_type: 'last_30_days',
max_rows: 100,
},
});
console.log(report);

Create an ad campaign

Use supermetricsmcp_campaign_create to create a new advertising campaign on a supported platform. Call accounts_discovery first to find the correct account ID.

const campaign = await actions.executeTool({
connector: 'supermetricsmcp',
identifier: 'user_123',
toolName: 'supermetricsmcp_campaign_create',
toolInput: {
ds_id: 'FA',
account_id: 'act_123456789',
name: 'Q1 Brand Awareness',
status: 'PAUSED',
budget_amount: '50.00',
budget_type: 'DAILY',
},
});
console.log(campaign);