Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Mercury MCP server

Vendor MCP
Open markdown

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

Tools
35
What they doRead · write · destructive
35 · 0 · 035 read0 write0 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 Mercury MCP connection

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

    Scalekit credentials are available for Mercury 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 = 'mercurymcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Mercury 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: 'mercurymcp_getaccounts',
    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
  • mercurymcp_getaccountRetrieve details of a specific Mercury account by its ID.Read-only

    GetAccount

    Retrieve details of a specific Mercury account by its ID.

    Inputs

    accountIdstringrequired
    Mercury account ID. Get it from Get Accounts.
  • mercurymcp_getaccountcardsRetrieve all debit and credit cards associated with a specific account.Read-only

    GetAccountCards

    Retrieve all debit and credit cards associated with a specific account.

    Inputs

    accountIdstringrequired
    Mercury account ID. Get it from Get Accounts.
  • mercurymcp_getaccountsRetrieve a paginated list of all Mercury accounts for the organization.Read-only

    GetAccounts

    Retrieve a paginated list of all Mercury accounts for the organization.

    Inputs

    end_beforestring
    Cursor to fetch the page before this position.
    limitinteger
    Maximum number of items to return per page.default 1000
    orderstring
    Sort order: asc or desc.one of ascdescdefault asc
    start_afterstring
    Cursor from the previous response to fetch the next page.
  • mercurymcp_getaccountstatementsRetrieve a paginated list of monthly statements for a specific account.Read-only

    GetAccountStatements

    Retrieve a paginated list of monthly statements for a specific account.

    Inputs

    accountIdstringrequired
    Mercury account ID. Get it from Get Accounts.
    endstring
    Filter by end date (YYYY-MM-DD).
    end_beforestring
    Cursor to fetch the page before this position.
    limitinteger
    Maximum number of items to return per page.default 1000
    orderstring
    Sort order: asc or desc.one of ascdescdefault desc
    startstring
    Filter by start date (YYYY-MM-DD).
    start_afterstring
    Cursor from the previous response to fetch the next page.
  • mercurymcp_getattachmentRetrieve attachment details including the download URL.Read-only

    GetAttachment

    Retrieve attachment details including the download URL.

    Inputs

    attachmentIdstringrequired
    Mercury attachment ID.
  • mercurymcp_getcardRetrieve details of a specific card by its ID.Read-only

    GetCard

    Retrieve details of a specific card by its ID.

    Inputs

    cardIdstringrequired
    Unique identifier for a card.
  • mercurymcp_getcurrentdateGet the current date and time.Read-only

    GetCurrentDate

    Get the current date and time.

    Inputs

    This tool takes no inputs.

  • mercurymcp_getcustomerRetrieve details of a specific customer by their ID.Read-only

    GetCustomer

    Retrieve details of a specific customer by their ID.

    Inputs

    customerIdstringrequired
    Mercury customer ID. Get it from List Customers.