Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Kit MCP server

Vendor MCP
Open markdown

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

Tools
83
What they doRead · write · destructive
45 · 28 · 1045 read28 write10 destructive
Users sign in with
OAuth app
Scalekit's or your own

What you can do

  • Manage subscribers: create, update, and unsubscribe subscribers and filter them by opens, clicks, or sign-up date
  • Tag and segment: create tags, apply or remove them in bulk, and list subscribers by tag, form, or segment
  • Build email sequences: create sequences, add and edit their emails, and enroll subscribers
  • Draft broadcasts: create, update, and delete draft broadcasts and review their clicks and performance stats
  • Track growth and sales: view email and subscriber growth stats, purchases, and Commerce products
  • Create landing pages: create, read, and update landing pages and reusable content snippets

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

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

    Scalekit credentials are available for Kit 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 = 'kitmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Kit 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: 'kitmcp_filter_subscribers',
    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
  • kitmcp_filter_subscribersSearch and filter subscribers by engagement events (opens, clicks, sends, deliveries) or sign-up date.Read-only

    Filter Subscribers

    Search and filter subscribers by engagement events (opens, clicks, sends, deliveries) or sign-up date. Returns paginated results.

    Inputs

    afterstring
    Pagination cursor for the next page. Use `pagination.end_cursor` from a previous response. Distinct from per-filter date ranges in `all[].after`.
    allarray
    Array of filter conditions, AND-ed together. Each item filters by one event type (opens, clicks, sent, delivered), by sign-up date (subscribed), by subscriber state (subscriber_state), by tag membership (tags), by primary location (location), by original signup attribution (attribution), or by Kit Field (kit_field). Combine filters to get their intersection. Defaults to active subscribers only — keep `{type: "subscriber_state", states: ["active"]}` here (alongside any other conditions) unless the user explicitly wants other states. Drop it only to include non-active subscribers.
    beforestring
    Pagination cursor for the previous page. Use `pagination.start_cursor` from a previous response. Distinct from per-filter date ranges in `all[].before`.
    counting_modestring
    Optional. How engagement events (opens, clicks, sent, delivered) are counted when comparing against count_greater_than / count_less_than. Defaults to "unique_email", which counts distinct emails/broadcasts (3 opens of the same broadcast = 1) — i.e. "how many different emails did they open/click", which is what creators usually mean. Use "total" to count every event instead (3 opens of the same broadcast = 3). Has no effect on non-engagement filters (subscribed, subscriber_state, tags).one of unique_emailtotaldefault unique_email
    includearray
    Optional. Extra related data to embed in each returned subscriber, resolved in the same request. Each item is an object with a `type` (and, for "stats", an optional `range`). Omit for the slim default of id, first_name, email_address, created_at.
    include_total_countboolean
    Optional. If true, include `pagination.total_count` (the size of the full filtered set, not just this page) in the response. Adds a count query, so it is slower — request it only when you need the total.
    per_pageinteger
    Results per page (1-100).default 10
    session_idstring
    Opaque session identifier for grouping all tool calls in this conversation. Generate a random UUID v4 (example: "7f8e4c2a-1b9d-4e3f-a5c6-8d7e9f0a1b2c") at the start of the conversation and reuse the exact same value on every tool call until the conversation ends, even as the creator's goal evolves. Do not derive the ID from the date, the creator's name, the account, the tool being called, or any other semantic content; the ID must be a fresh random UUID so analytics can group calls by conversation without collisions across creators or days. Optional; used only for analytics grouping and not validated server-side.
    sort_fieldstring
    Field to sort by. Base columns (`id`, `first_name`, `email_address`, `created_at`), `engagement__<metric>` (trailing-90-day engagement stat), `location__distance` (great-circle from the `location` filter's origin; nearest-first by default), or `kit_field__<name>` (sort by a Kit Field's value; excludes subscribers with no value for it).one of idfirst_nameemail_addresscreated_atengagement__sentengagement__opensengagement__clicksengagement__open_rateengagement__click_ratelocation__distancekit_field__agekit_field__education_levelkit_field__genderkit_field__household_incomekit_field__marital_statuskit_field__household_sizekit_field__home_ownershipkit_field__presence_of_childrenkit_field__job_titlekit_field__social_reachkit_field__instagram_followerskit_field__instagram_usernamekit_field__instagram_biokit_field__twitter_followerskit_field__twitter_usernamekit_field__twitter_biokit_field__youtube_subscriberskit_field__youtube_usernamekit_field__youtube_descriptionkit_field__tiktok_followerskit_field__tiktok_usernamekit_field__tiktok_biokit_field__twitch_followerskit_field__twitch_usernamekit_field__linkedin_followerskit_field__linkedin_connectionskit_field__linkedin_usernamekit_field__linkedin_biodefault created_at
    sort_orderstring
    Sort direction (default: desc).one of ascdesc
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown
  • kitmcp_get_broadcastRetrieve a single broadcast record by ID.Read-only

    Get Broadcast

    Retrieve a single broadcast record by ID.

    Inputs

    idintegerrequired
    The broadcast ID
    includearray
    Extra fields to include. `content_tree` adds the broadcast body as structured Kit-JSON blocks, the email-wide `theme`, `built_with_badge`, and content_tree_is_clean / content_tree_warnings — the editable form used by create_broadcast / update_broadcast.
    session_idstring
    Opaque session identifier for grouping all tool calls in this conversation. Generate a random UUID v4 (example: "7f8e4c2a-1b9d-4e3f-a5c6-8d7e9f0a1b2c") at the start of the conversation and reuse the exact same value on every tool call until the conversation ends, even as the creator's goal evolves. Do not derive the ID from the date, the creator's name, the account, the tool being called, or any other semantic content; the ID must be a fresh random UUID so analytics can group calls by conversation without collisions across creators or days. Optional; used only for analytics grouping and not validated server-side.
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown
  • kitmcp_get_broadcast_schema[Broadcasts] Return the Kit-JSON schema for a broadcast's `content_tree` — the exact shape create_broadcast and update_broadcast accept.Read-only

    Get Broadcast Schema

    [Broadcasts] Return the Kit-JSON schema for a broadcast's `content_tree` — the exact shape create_broadcast and update_broadcast accept. Call this first whenever you're building a content_tree, then construct the tree to match before calling create/update. Pass the same `email_template_id` you'll create or update the broadcast with (omit it to use the account's default template). The schema is tailored to that template, so build the tree exactly as returned — don't second-guess its shape. Returns: `content_tree`, a JSON Schema for the block array (every block definition and its allowed values), and `theme`, the schema for the optional email-wide styling both tools accept.

    Inputs

    email_template_idinteger
    The email template the broadcast will use. Pass the same value you'll send to create_broadcast / update_broadcast so the returned schema matches what the server validates against; omit to use the account's default template.
    session_idstring
    Opaque session identifier for grouping all tool calls in this conversation. Generate a random UUID v4 (example: "7f8e4c2a-1b9d-4e3f-a5c6-8d7e9f0a1b2c") at the start of the conversation and reuse the exact same value on every tool call until the conversation ends, even as the creator's goal evolves. Do not derive the ID from the date, the creator's name, the account, the tool being called, or any other semantic content; the ID must be a fresh random UUID so analytics can group calls by conversation without collisions across creators or days. Optional; used only for analytics grouping and not validated server-side.
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown
  • kitmcp_get_creator_profileRetrieve the creator profile linked to the authenticated Kit account.Read-only

    Get Creator Profile

    Retrieve the creator profile linked to the authenticated Kit account.

    Inputs

    session_idstring
    UUID v4 identifier for grouping tool calls in the same conversation. Generate once at the start of the session and reuse it on every call.
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown
  • kitmcp_get_current_account[Account] Get details for the authenticated Kit account.Read-only

    Get current account

    [Account] Get details for the authenticated Kit account. Returns: top-level `user` (id and email of the authenticated user) and `account` with name, plan_type, primary_email_address, created_at, sending_addresses (each with email_address, from_name, status, is_default, is_verified, is_dmarc_configured), and a structured timezone (name, friendly_name, utc_offset). Call this only when the user asks about their account details, plan, or profile. It is not a prerequisite for subscriber, broadcast, or other work, so don't call it as a preamble.

    Inputs

    session_idstring
    UUID v4 identifier for grouping tool calls in the same conversation. Generate once at the start of the session and reuse it on every call.
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown
  • kitmcp_get_email_statsRetrieve overall email performance statistics for the Kit account.Read-only

    Get Email Stats

    Retrieve overall email performance statistics for the Kit account.

    Inputs

    session_idstring
    UUID v4 identifier for grouping tool calls in the same conversation. Generate once at the start of the session and reuse it on every call.
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown
  • kitmcp_get_email_templateRetrieve a single email template by ID.Read-only

    Get Email Template

    Retrieve a single email template by ID.

    Inputs

    idintegerrequired
    The email template ID (required). Use list_email_templates to find IDs.
    includearray
    Extra fields to include. `content_tree` adds the template's default body as structured Kit-JSON blocks, its email-wide `theme`, and content_tree_is_clean / content_tree_warnings — the editable form create_broadcast accepts. Request it whenever you intend to draft from this template; without it only the HTML `content` comes back.
    session_idstring
    Opaque session identifier for grouping all tool calls in this conversation. Generate a random UUID v4 (example: "7f8e4c2a-1b9d-4e3f-a5c6-8d7e9f0a1b2c") at the start of the conversation and reuse the exact same value on every tool call until the conversation ends, even as the creator's goal evolves. Do not derive the ID from the date, the creator's name, the account, the tool being called, or any other semantic content; the ID must be a fresh random UUID so analytics can group calls by conversation without collisions across creators or days. Optional; used only for analytics grouping and not validated server-side.
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown
  • kitmcp_get_growth_statsRetrieve subscriber growth statistics for a specified date range.Read-only

    Get Growth Stats

    Retrieve subscriber growth statistics for a specified date range.

    Inputs

    endingstring
    End date (YYYY-MM-DD). Defaults to today.
    session_idstring
    UUID v4 identifier for grouping tool calls in the same conversation. Generate once at the start of the session and reuse it on every call.
    startingstring
    Start date (YYYY-MM-DD). Defaults to 90 days ago.
    user_goalstring
    What the creator is trying to accomplish with this tool call. Pick the closest match; use 'unknown' only when no category fits.one of analyze_performanceaudit_list_healthfind_subscribersdraft_sequence_emaildraft_broadcast_emailmanage_audiencemanage_publishingoptimize_contentaccount_cleanupautomate_my_newsletterconnect_my_toolsunknown