Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Bitly MCP server

Vendor MCP
Open markdown

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

Tools
79
What they doRead · write · destructive
60 · 17 · 260 read17 write2 destructive
Users sign in with
OAuth app
Scalekit's or your own

What you can do

  • Create and manage short links: shorten URLs, create links with custom back-halves, update link metadata, and delete links
  • Create and manage QR codes: generate QR codes for links, update QR code settings, and retrieve QR code images
  • Analyze link performance: get click summaries, engagement metrics, and breakdowns by city, country, device, referrer, and referring domain
  • Analyze QR code scans: get scan summaries and breakdowns by city, country, device, and browser
  • Analyze group-level engagement: query top links, clicks, scans, and engagement trends across all links in a group
  • Manage account structure: retrieve organizations, groups, custom domains, and user details

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

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

    Scalekit credentials are available for Bitly 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 = 'bitlymcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Bitly 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: 'bitlymcp_bitly_get_custom_domains',
    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
  • bitlymcp_bitly_get_custom_domainsList all custom domains (also called branded short domains or BSDs) available to the authenticated user for use instead of 'bit.ly' when creating short links.Read-only

    Get Custom Domains

    List all custom domains (also called branded short domains or BSDs) available to the authenticated user for use instead of 'bit.ly' when creating short links.

    Inputs

    _metaobject
    Optional metadata about this request. Include user_prompt, caller_agent (e.g. claude), intent_classification, conversation_id.
    response_formatstring
    'text' (default) or 'json'
  • bitlymcp_bitly_get_group_analyticsGet analytics across all links in a group (workspace).Read-only

    Bitly Get Group Analytics

    Get analytics across all links in a group (workspace). Use this when the user asks about overall performance or top-performing links, rather than one specific link. For a single link use bitly_get_link_analytics; for a single QR code's scans use bitly_get_qr_code_analytics. Choose a dataset — 'clicks', 'engagements' (clicks + QR scans + button clicks), or 'qr_scans' — and a dimension: a facet breakdown, 'over_time' (time series), or 'top' (best performing links). There is no group-level total/summary dimension: for an overall count over a period use 'over_time' and total the returned series; for a single link's total use bitly_get_link_analytics with dimension 'summary'. Valid dimensions per dataset — clicks: cities, countries, device_os, over_time, referrers, top; engagements: cities, countries, devices, over_time, referrers, referring_networks, top; qr_scans: cities, countries, over_time, top. 'devices' is device form factor (mobile, desktop, ...) and 'device_os' is operating system (iOS, Android, Windows, ...). Notes: for datasets 'engagements' and 'qr_scans' the raw JSON keys counts as 'clicks' even though the values are engagements/scans; for dataset 'clicks' with dimension 'referrers' the v4 API returns engagement counts, not clicks alone.

    Inputs

    datasetstringrequired
    What to measure: 'clicks' (link clicks only), 'engagements' (clicks + QR scans + button clicks), or 'qr_scans' (QR code scans only).one of clicksengagementsqr_scans
    dimensionstringrequired
    The report to return. Valid values depend on the dataset — clicks: cities, countries, device_os, over_time, referrers, top; engagements: cities, countries, devices, over_time, referrers, referring_networks, top; qr_scans: cities, countries, over_time, top.one of citiescountriesdevice_osdevicesover_timereferrersreferring_networkstop
    group_guidstringrequired
    The unique identifier of the group (workspace)
    _metaobject
    Optional metadata about this request. Include user_prompt, caller_agent (e.g. claude), intent_classification, conversation_id.
    response_formatstring
    'text' (default) or 'json'
    sizenumber
    Maximum number of results to return (default varies)
    unitstring
    Time granularity for metrics data: 'minute', 'hour', 'day', 'week', or 'month'. Determines how metrics are grouped by time. default: day
    unit_referencestring
    ISO 8601 timestamp for the END of the time range. The range is the last 'units' periods ending on this date (e.g. '2025-02-28T00:00:00+0000' with units=28 gives all of February). For a full month, use the last day of that month (e.g. 2026-02-28 for Feb 2026). Omit for default: now.
    unitsstring
    Number of time periods to include (e.g., '7' with unit='day' returns 7 days of data). Defaults to 30 when not specified.
  • bitlymcp_bitly_get_group_detailsGet metadata for a specific group by GUID, including name, organization, role, creation date, custom domains (BSDs), and status.Read-only

    Get Group Details

    Get metadata for a specific group by GUID, including name, organization, role, creation date, custom domains (BSDs), and status. For the group's preferred short domain, use get_group_preferences instead.

    Inputs

    group_guidstringrequired
    The unique identifier of the group (workspace)
    _metaobject
    Optional metadata about this request. Include user_prompt, caller_agent (e.g. claude), intent_classification, conversation_id.
    response_formatstring
    'text' (default) or 'json'
  • bitlymcp_bitly_get_group_preferencesGet a group's preferences, including its default (preferred) short domain.Read-only

    Get Group Preferences

    Get a group's preferences, including its default (preferred) short domain. Check this first when deciding which domain to shorten a link to, then fall back to get_group_details for the group's full list of available custom domains.

    Inputs

    group_guidstringrequired
    The unique identifier of the group (workspace)
    _metaobject
    Optional metadata about this request. Include user_prompt, caller_agent (e.g. claude), intent_classification, conversation_id.
    response_formatstring
    'text' (default) or 'json'
  • bitlymcp_bitly_get_group_qr_codesList the QR codes in a group, with search, archived-status and dynamic-routing filters, and pagination.Read-only

    Bitly Get Group Qr Codes

    List the QR codes in a group, with search, archived-status and dynamic-routing filters, and pagination. Use this to browse a group's QR codes or to find one by title or destination when you don't have its ID. Note: QR codes backed by an existing short link (coupled) appear here. bitly_update_qr_code can still change their title, archived status and visual customizations, and dynamic routing must be set on the underlying link with bitly_update_short_link instead. Expiration is not supported on coupled QR codes at all.

    Inputs

    group_guidstringrequired
    The unique identifier of the group (workspace)
    _metaobject
    Optional metadata about this request. Include user_prompt, caller_agent (e.g. claude), intent_classification, conversation_id.
    archivedstring
    Filter by archived status: 'on' (archived only), 'off' (non-archived only), 'both' (all)
    has_dynamic_routingstring
    Filter by dynamic routing: 'on' (only QR codes with dynamic routing), 'off' (only those without), 'both' (all, default). Requires the dynamic_routing feature; otherwise ignored.
    querystring
    Search term to filter QR codes by title or destination URL
    response_formatstring
    'text' (default) or 'json'
    search_afterstring
    Pagination cursor for retrieving next page of results
    sizestring
    Number of QR codes to return (default: 50, max: 100)