Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Close MCP server

Vendor MCP
Open markdown

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

Tools
117
What they doRead · write · destructive
62 · 40 · 1562 read40 write15 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 Close MCP connection

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

    Scalekit credentials are available for Close, 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 = 'closemcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Close 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: 'closemcp_customized_builtin_labels',
    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
  • closemcp_aggregationPerform an aggregation to answer questions like: - How many emails were sent this week?Read-only

    Aggregation

    Perform an aggregation to answer questions like: - How many emails were sent this week? - Calls by user this week (Who made the most?) You MUST first fetch the list of available leads of fields using the `get_fields` tool.

    Inputs

    include_typesarrayrequired
    Object types to include in aggregation. Valid values: lead, contact, opportunity, task, email, call, note, meeting, sms, whatsapp, custom_activity, custom_object, sequence_subscription, lead_status_change, opportunity_status_change.
    aggregationsstring
    Aggregation specifications to compute. Each item must specify an aggregation_type (e.g. count, sum, average, min, max, median, cardinality, percent_empty, etc.) and most require a field name.
    display_modestring
    How to display the aggregation results. Determined automatically by default.
    group_bystring
    Reference or enum fields to group by (maximum 2). Use field names returned by the get_fields tool.
    intervalstring
    Interval to aggregate by when using date fields. Determined automatically by default.
    time_bucketsstring
    Time buckets configuration for grouping results by time period.
  • closemcp_customized_builtin_labelsReturn the customized builtin labels.Read-only

    Customized Builtin Labels

    Return the customized builtin labels. Only renamed labels are returned - an empty result means the default names apply.

    Inputs

    This tool takes no inputs.

  • closemcp_fetch_callFetch a single call activity by ID.Read-only

    Fetch Call

    Fetch a single call activity by ID. Returns the call's direction, outcome, participants, and (if available) its transcript.

    Inputs

    idstringrequired
    The ID of the call to fetch.
  • closemcp_fetch_call_taskFetch a single call task by ID.Read-only

    Fetch Call Task

    Fetch a single call task by ID.

    Inputs

    idstringrequired
    The ID of the call task to fetch.
  • closemcp_fetch_commentFetch a single comment by ID.Read-only

    Close Fetch Comment

    Fetch a single comment by ID. Returns the comment's rich-text (HTML) body, the thread and lead it belongs to, its @-mentions, and the resolved author and last-editor names.

    Inputs

    idstringrequired
    ID of the comment to fetch.
  • closemcp_fetch_contactFetch an existing contact by ID.Read-only

    Fetch Contact

    Fetch an existing contact by ID. Returns the contact's details including name, title, email addresses, phone numbers, and URLs.

    Inputs

    idstringrequired
    ID of the contact to fetch
  • closemcp_fetch_custom_activity_instanceFetch an existing custom activity instance by ID.Read-only

    Fetch Custom Activity Instance

    Fetch an existing custom activity instance by ID. A custom activity instance is an activity of a custom activity type, holding the custom field values defined by that type. Returns the full instance, including its custom field values and the resolved lead, contact, and user names.

    Inputs

    idstringrequired
    ID of the custom activity instance to fetch