Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the MailSenpai MCP server

Vendor MCP
Open markdown

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

Tools
74
What they doRead · write · destructive
34 · 9 · 3134 read9 write31 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 MailSenpai MCP connection

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

    Scalekit credentials are available for MailSenpai 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 = 'mailsenpaimcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize MailSenpai 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: 'mailsenpaimcp_check_blacklist',
    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
  • mailsenpaimcp_check_blacklistChecks whether a public IPv4 address or a domain is listed on the public email blocklists (DNSBLs) that MailSenpai queries.Read-only

    Check Blacklist

    Checks whether a public IPv4 address or a domain is listed on the public email blocklists (DNSBLs) that MailSenpai queries. For a domain it checks the domain, its registered domain, the IPs of its MX servers and its A record. Returns status (done, in_progress), summary, counts (checks, listed, unreachable, clean) and, for each target, every list with result (listed, clean, unreachable), the reason and the list's official removal page. manual_checks holds the lists that are not queried (for example Spamhaus), each with the link to its official check page. Works on any IP or domain, needs no data from the MailSenpai account and changes nothing. Use it when emails bounce with a blocklist error or before sending from a new IP. It usually answers in 1-5 seconds; if status is in_progress, call again with the returned job.

    Inputs

    jobstring
    Only to resume: the job returned by a previous call that ended with status in_progress. Avoids starting a second check.
    languagestring
    Language of summary and notes: en (default) or it.one of enit
    targetstring
    Public IPv4 address (e.g. 203.0.113.10) or domain (e.g. example.com). IPv6 and private addresses are not supported: for IPv6 pass the domain.
  • mailsenpaimcp_check_domain_dnsChecks the public DNS records that decide whether a domain's email gets delivered: SPF (single record, ending, DNS lookups under the limit of 10, includes that no longer exist), DKIM (the most common selectors, or the one you pass in selector, with key length), DMARC (policy, reports address, inherited from the parent domain) and MX (which servers and spam filters receive the mail).Read-only

    Check Domain Dns

    Checks the public DNS records that decide whether a domain's email gets delivered: SPF (single record, ending, DNS lookups under the limit of 10, includes that no longer exist), DKIM (the most common selectors, or the one you pass in selector, with key length), DMARC (policy, reports address, inherited from the parent domain) and MX (which servers and spam filters receive the mail). Returns status (checked, public_mailbox, not_found, invalid, dns_unreachable), summary, checks.spf/dkim/dmarc/mx each with result (ok, fix, missing, check) and an explanatory note, tips ordered by priority with the exact values to publish, and the raw records. Works on any domain, does not need data from the MailSenpai account and changes nothing. Use it before sending from a new domain or when emails land in spam.

    Inputs

    domainstring
    Domain to check, e.g. example.com. A URL or an email address also works: the domain is extracted.
    languagestring
    Language of notes and tips: en (default) or it.one of enit
    selectorstring
    Optional DKIM selector to try first (the name before ._domainkey), when the sending service uses an uncommon one.
  • mailsenpaimcp_get_campaignReturns one campaign by campaign_uid: name, subject, sender, list and segment, status and send date.Read-only

    Get Campaign

    Returns one campaign by campaign_uid: name, subject, sender, list and segment, status and send date. For opens, clicks and bounces use get_campaign_stats. Read-only.

    Inputs

    campaign_uidstring
    Unique ID of the campaign (campaign_uid), a 13-character code. Find it with list_campaigns.
  • mailsenpaimcp_get_campaign_statsReturns the aggregate results of one campaign: recipients processed, delivered, opens and unique opens, clicks, hard/soft bounces, unsubscribes and complaints, with rates.Read-only

    Get Campaign Stats

    Returns the aggregate results of one campaign: recipients processed, delivered, opens and unique opens, clicks, hard/soft bounces, unsubscribes and complaints, with rates. For the individual bounce records use list_campaign_bounces. Read-only.

    Inputs

    campaign_uidstring
    Unique ID of the campaign (campaign_uid), a 13-character code. Find it with list_campaigns.
  • mailsenpaimcp_get_email_spam_test_resultReturns the state and result of a spam test started with start_email_spam_test.Read-only

    Get Email Spam Test Result

    Returns the state and result of a spam test started with start_email_spam_test. status is waiting (no email received yet: ask the user to send it, then call again), analyzing, completed or expired. When completed: score from 0 to 10, rating (excellent, good, needs_work, at_risk), summary, partial (true when authentication or the filter verdict could not be evaluated), the received email (from, subject, sending IP, size), sections with each check (authentication, blocklists, reverse DNS, headers, content), to_do with the fixes in order of impact and the spam filter rules that fired. Only the analysis is stored, never the message text; details are deleted after 24 hours. The score describes this one message, it is not a promise of inbox placement. Read-only.

    Inputs

    test_tokenstring
    The test_token returned by start_email_spam_test.
  • mailsenpaimcp_get_listReturns the full settings of one mailing list by list_uid: general info, default sender (from name, from email, reply-to), notification and company details.Read-only

    Get List

    Returns the full settings of one mailing list by list_uid: general info, default sender (from name, from email, reply-to), notification and company details. If you only know the list name, find its list_uid with list_lists first. Read-only.

    Inputs

    list_uidstring
    Unique ID of the mailing list (list_uid), a 13-character code such as "ab123cd456ef7". Find it with list_lists.
  • mailsenpaimcp_get_list_fieldReturns one custom field of a list by field_id: label, tag, type, required flag, default value and options (for dropdowns).Read-only

    Get List Field

    Returns one custom field of a list by field_id: label, tag, type, required flag, default value and options (for dropdowns). Use list_list_fields to find the field_id. Read-only.

    Inputs

    field_idstring
    Numeric ID of the custom field (field_id), e.g. 12. Find it with list_list_fields.
    list_uidstring
    Unique ID of the mailing list (list_uid), a 13-character code such as "ab123cd456ef7". Find it with list_lists.
  • mailsenpaimcp_get_list_segmentReturns one segment by segment_uid with its name, match mode (all or any) and conditions.Read-only

    Get List Segment

    Returns one segment by segment_uid with its name, match mode (all or any) and conditions. Use list_segment_subscribers to see the matching subscribers. Read-only.

    Inputs

    list_uidstring
    Unique ID of the mailing list (list_uid), a 13-character code such as "ab123cd456ef7". Find it with list_lists.
    segment_uidstring
    Unique ID of the segment (segment_uid). Find it with list_list_segments.