Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the LinklyHQ MCP server

Vendor MCP
Open markdown

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

Tools
25
What they doRead · write · destructive
13 · 7 · 513 read7 write5 destructive
Users sign in with
OAuth app
Scalekit's or your own

What you can do

  • Create and manage short links: shorten URLs, update destinations and tracking tags, and delete links one by one or in bulk
  • Find links: list links or search them by name, destination URL, or note
  • Analyze clicks: get click counts over time, break them down by country, platform, or browser, and export click details
  • Get click webhooks: subscribe and unsubscribe webhook URLs for click events on one link or the whole workspace
  • Manage custom domains: add, list, and remove custom domains and update their favicons

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 LinklyHQ MCP connection

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

    Scalekit credentials are available for LinklyHQ 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

    LinklyHQ MCP uses Dynamic Client Registration (DCR), so you don’t need a client ID or secret. Create a connection in Scalekit, then have each user authorize their LinklyHQ account.

    1. Create a connection in Scalekit

      • In the Scalekit dashboard, go to AgentKit > Connections > Create Connection.
      • Search for LinklyHQ MCP and click Create.
      • Note the Connection name. Use it as connection_name in your code, for example linklymcp.
    2. Authorize your LinklyHQ account

      Generate an authorization link and open it in a browser. The user signs in to LinklyHQ and grants access to their workspace.

      Scalekit stores the token and adds it to every tool call, so 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 = 'linklymcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize LinklyHQ 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: 'linklymcp_export_clicks',
    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
  • linklymcp_export_clicksExport detailed click records with full information including timestamp, browser, country, URL, platform, referrer, bot status, ISP, and URL parameters.Read-only

    Export Clicks

    Export detailed click records with full information including timestamp, browser, country, URL, platform, referrer, bot status, ISP, and URL parameters.

    Inputs

    botsstring
    Bot filteringone of includeexcludeonly
    countrystring
    Filter by country code
    endstring
    End date in YYYY-MM-DD format (default: yesterday)
    link_idinteger
    Filter by specific link ID
    platformstring
    Filter by platform
    startstring
    Start date in YYYY-MM-DD format (default: 30 days ago)
  • linklymcp_get_analyticsGet time-series click analytics data for charting.Read-only

    Get Analytics

    Get time-series click analytics data for charting. Returns click counts over time with optional date range, link, and demographic filters.

    Inputs

    botsstring
    Bot filtering: include (default), exclude, or onlyone of includeexcludeonly
    browserstring
    Filter by browser name
    countrystring
    Filter by country code (e.g., 'US', 'GB')
    endstring
    End date in YYYY-MM-DD format (default: today)
    frequencystring
    Time granularity: 'day' (default) or 'hour'one of dayhour
    link_idinteger
    Filter by specific link ID
    platformstring
    Filter by platform (e.g., 'desktop', 'mobile', 'tablet')
    startstring
    Start date in YYYY-MM-DD format (default: 30 days ago)
    uniqueboolean
    Count unique clicks only (by IP)
  • linklymcp_get_analytics_byGet click counts grouped by a dimension such as country, platform, or browser.Read-only

    Get Analytics by Dimension

    Get click counts grouped by a dimension such as country, platform, or browser. Useful for breakdowns and top-N reports.

    Inputs

    counterstringrequired
    Dimension to group by (required)one of countryplatformrefererisplink_iddestinationbot_name
    botsstring
    Bot filteringone of includeexcludeonly
    countrystring
    Filter by country code
    endstring
    End date in YYYY-MM-DD format (default: today)
    link_idinteger
    Filter by specific link ID
    platformstring
    Filter by platform
    startstring
    Start date in YYYY-MM-DD format (default: 30 days ago)
    uniqueboolean
    Count unique clicks only
  • linklymcp_get_clicksGet recent click data for the workspace, optionally filtered by a specific link ID.Read-only

    Get Clicks

    Get recent click data for the workspace, optionally filtered by a specific link ID.

    Inputs

    link_idinteger
    Filter clicks by link ID. Provide the integer ID of the link to scope results to that link only. If omitted, returns clicks across all links in the workspace.
  • linklymcp_list_domainsList all custom domains configured in the LinklyHQ workspace.Read-only

    List Domains

    List all custom domains configured in the LinklyHQ workspace.

    Inputs

    This tool takes no inputs.

Workflows

Check authentication status

Use linklymcp_test_authentication to verify the connection is active and your credentials are valid.

const result = await actions.executeTool({
connector: 'linklymcp',
identifier: 'user_123',
toolName: 'linklymcp_test_authentication',
toolInput: {},
});
console.log(result);

Use linklymcp_create_link to shorten a URL and attach UTM parameters for campaign tracking.

const link = await actions.executeTool({
connector: 'linklymcp',
identifier: 'user_123',
toolName: 'linklymcp_create_link',
toolInput: {
url: 'https://example.com/landing-page',
name: 'Summer Campaign',
utm_source: 'newsletter',
utm_medium: 'email',
utm_campaign: 'summer2024',
},
});
console.log(link.full_url);

Get click analytics by dimension

Use linklymcp_get_analytics_by to break down click counts by country, browser, or platform over a date range.

const analytics = await actions.executeTool({
connector: 'linklymcp',
identifier: 'user_123',
toolName: 'linklymcp_get_analytics_by',
toolInput: {
counter: 'country',
start: '2024-01-01',
end: '2024-01-31',
},
});
console.log(analytics);