Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

LinklyHQ MCP connector

OAuth 2.1/PKCEMarketingAnalytics

LinklyHQ MCP is a URL shortening and link management platform offering click analytics, custom domains, UTM tracking, QR codes, and webhook integrations for...

LinklyHQ MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. 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. Register your Linkly credentials with Scalekit so it handles the token lifecycle. You do this once per environment.

    Dashboard setup steps

    LinklyHQ 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 Customer.io account.

    1. Create a connection in Scalekit

      • In the Scalekit dashboard, go to AgentKitConnectionsCreate Connection.
      • Search for LinklyHQ MCP and click Create.
      • Note the Connection name — use this as connection_name in your code (e.g., linklymcp).
    2. Authorize your Customer.io account

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

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

  4. quickstart.ts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENV_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)
    process.stdout.write('Press Enter after authorizing...')
    await new Promise(r => process.stdin.once('data', r))
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'linklymcp_get_analytics',
    toolInput: {},
    })
    console.log(result)

Connect this agent connector to let your agent:

  • Batchdeletelinks records — Batch delete multiple LinklyHQ links by their IDs
  • Create domain, link — Add a custom domain to the LinklyHQ workspace
  • Delete domain, link — Remove a custom domain from the LinklyHQ workspace
  • Clicks export — Export detailed click records with full information including timestamp, browser, country, URL, platform, referrer, bot status, ISP, and URL parameters
  • Get analytics, analytics by, clicks — Get time-series click analytics data for charting
  • List domains, link webhooks, links — List all custom domains configured in the LinklyHQ workspace

Check authentication status

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

const result = await actions.executeTool({
connectionName: '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({
connectionName: '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({
connectionName: 'linklymcp',
identifier: 'user_123',
toolName: 'linklymcp_get_analytics_by',
toolInput: {
counter: 'country',
start: '2024-01-01',
end: '2024-01-31',
},
});
console.log(analytics);

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

linklymcp_create_domain#Add a custom domain to the LinklyHQ workspace. The domain must already be configured to point to LinklyHQ servers via DNS.1 param

Add a custom domain to the LinklyHQ workspace. The domain must already be configured to point to LinklyHQ servers via DNS.

NameTypeRequiredDescription
namestringrequiredThe fully-qualified domain name to add to the LinklyHQ workspace. The domain must already have DNS configured to point to LinklyHQ servers before calling this.
linklymcp_delete_domain#Remove a custom domain from the LinklyHQ workspace. This action is permanent.1 param

Remove a custom domain from the LinklyHQ workspace. This action is permanent.

NameTypeRequiredDescription
domain_idintegerrequiredThe integer ID of the domain to permanently remove from the LinklyHQ workspace. Use list_domains to find the domain's ID before calling this.
linklymcp_export_clicks#Export detailed click records with full information including timestamp, browser, country, URL, platform, referrer, bot status, ISP, and URL parameters.6 params

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

NameTypeRequiredDescription
botsstringoptionalBot filtering mode for the export. Use 'include' to export all clicks, 'exclude' to remove bot traffic, or 'only' to export bot clicks only.
countrystringoptionalFilter exported clicks by ISO country code (e.g., US, GB). Only clicks from that country will be included.
endstringoptionalEnd date for the export range in YYYY-MM-DD format. Defaults to yesterday if omitted.
link_idintegeroptionalFilter exported records to a specific link by its integer ID. If omitted, exports clicks from all links in the workspace.
platformstringoptionalFilter exported clicks by platform type (e.g., desktop, mobile, tablet). Only clicks from that platform will be included.
startstringoptionalStart date for the export range in YYYY-MM-DD format. Defaults to 30 days ago if omitted.
linklymcp_get_analytics#Get time-series click analytics data for charting. Returns click counts over time with optional date range, link, and demographic filters.9 params

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

NameTypeRequiredDescription
botsstringoptionalBot filtering mode. Use 'include' to count all clicks, 'exclude' to remove bot traffic, or 'only' to see bot-only data.
browserstringoptionalFilter results by browser name (e.g., Chrome, Firefox, Safari). Only clicks from that browser will be included.
countrystringoptionalFilter results by ISO country code (e.g., US, GB, DE). Only clicks from that country will be included.
endstringoptionalEnd date of the analytics range in YYYY-MM-DD format. Defaults to today if omitted.
frequencystringoptionalTime granularity for the time-series data. Use 'day' for daily aggregation or 'hour' for hourly. Defaults to 'day'.
link_idintegeroptionalFilter analytics to a specific link by its integer ID. If omitted, returns data for all links in the workspace.
platformstringoptionalFilter results by platform type (e.g., desktop, mobile, tablet). Only clicks from that platform will be included.
startstringoptionalStart date of the analytics range in YYYY-MM-DD format. Defaults to 30 days ago if omitted.
uniquebooleanoptionalWhen true, count only unique clicks (deduplicated by IP address). When false or omitted, counts all clicks including repeats.
linklymcp_get_analytics_by#Get click counts grouped by a dimension such as country, platform, or browser. Useful for breakdowns and top-N reports.8 params

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

NameTypeRequiredDescription
counterstringrequiredThe dimension to group click counts by. Supported values: country, platform, browser_name, referer, isp, link_id, destination, bot_name.
botsstringoptionalBot filtering mode. Use 'include' to count all clicks, 'exclude' to remove bot traffic, or 'only' to see bot-only data.
countrystringoptionalFilter results by ISO country code (e.g., US, GB). Only clicks from that country will be included in the grouped breakdown.
endstringoptionalEnd date of the analytics range in YYYY-MM-DD format. Defaults to today if omitted.
link_idintegeroptionalFilter the grouped analytics to a specific link by its integer ID. If omitted, includes data from all links.
platformstringoptionalFilter results by platform type (e.g., desktop, mobile). Only clicks from that platform will be included in the grouped breakdown.
startstringoptionalStart date of the analytics range in YYYY-MM-DD format. Defaults to 30 days ago if omitted.
uniquebooleanoptionalWhen true, count only unique clicks (deduplicated by IP address). When false or omitted, counts all clicks.
linklymcp_get_clicks#Get recent click data for the workspace, optionally filtered by a specific link ID.1 param

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

NameTypeRequiredDescription
link_idintegeroptionalFilter 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_domains#List all custom domains configured in the LinklyHQ workspace.0 params

List all custom domains configured in the LinklyHQ workspace.

linklymcp_list_webhooks#List all webhook URLs subscribed to the LinklyHQ workspace. These webhooks receive click events for all links.0 params

List all webhook URLs subscribed to the LinklyHQ workspace. These webhooks receive click events for all links.

linklymcp_list_workspaces#Return details of the authenticated LinklyHQ workspace, including ID and name.0 params

Return details of the authenticated LinklyHQ workspace, including ID and name.

linklymcp_ping#Health check for the LinklyHQ MCP server.1 param

Health check for the LinklyHQ MCP server.

NameTypeRequiredDescription
messagestringrequiredA message to ping
linklymcp_subscribe_webhook#Subscribe a webhook URL to receive click events for all links in the LinklyHQ workspace.1 param

Subscribe a webhook URL to receive click events for all links in the LinklyHQ workspace.

NameTypeRequiredDescription
urlstringrequiredThe webhook URL to receive click event notifications
linklymcp_test_authentication#Test API authentication with LinklyHQ. Use this to verify your credentials are valid.0 params

Test API authentication with LinklyHQ. Use this to verify your credentials are valid.

linklymcp_unsubscribe_webhook#Unsubscribe a webhook URL from workspace-level click events.1 param

Unsubscribe a webhook URL from workspace-level click events.

NameTypeRequiredDescription
urlstringrequiredThe webhook URL to unsubscribe
linklymcp_update_domain_favicon#Update the favicon URL for a custom domain in the LinklyHQ workspace.2 params

Update the favicon URL for a custom domain in the LinklyHQ workspace.

NameTypeRequiredDescription
domain_idintegerrequiredThe integer ID of the domain whose favicon should be updated. Use list_domains to find the domain's ID.
favicon_urlstringrequiredThe fully-qualified URL pointing to the favicon image to use for this custom domain (e.g., https://example.com/favicon.ico).
linklymcp_update_workspace#Update workspace settings including the workspace name and webhook notification URL.2 params

Update workspace settings including the workspace name and webhook notification URL.

NameTypeRequiredDescription
namestringrequiredWorkspace name
webhooksstringrequiredWebhook URL for workspace click notifications