Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the GoCardless MCP server

Vendor MCP
Open markdown

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

Tools
26
What they doRead · write · destructive
18 · 3 · 518 read3 write5 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 GoCardless MCP connection

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

    Scalekit credentials are available for GoCardless 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 = 'gocardlessmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize GoCardless 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: 'gocardlessmcp_get_environment',
    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
  • gocardlessmcp_get_customerRetrieve a single customer by ID, with PII fields partially masked.Read-only

    Get Customer

    Retrieve a single customer by ID, with PII fields partially masked.

    Inputs

    idstringrequired
    Customer ID (e.g. CU000123)
  • gocardlessmcp_get_environmentReturn the current GoCardless environment (sandbox or live) and setup instructions.Read-only

    Get Environment

    Return the current GoCardless environment (sandbox or live) and setup instructions.

    Inputs

    This tool takes no inputs.

  • gocardlessmcp_get_mandateRetrieve a single mandate (Direct Debit authorisation) by its mandate ID.Read-only

    Get Mandate

    Retrieve a single mandate (Direct Debit authorisation) by its mandate ID.

    Inputs

    idstringrequired
    Mandate ID (e.g. MD000123)
  • gocardlessmcp_get_paymentRetrieve a single payment by its payment ID.Read-only

    Get Payment

    Retrieve a single payment by its payment ID.

    Inputs

    idstringrequired
    Payment ID (e.g. PM000123)
  • gocardlessmcp_get_payment_summaryGet the count and total amount of payments in a date range, optionally filtered by status, customer, mandate, subscription, or currency.Read-only

    Get Payment Summary

    Get the count and total amount of payments in a date range, optionally filtered by status, customer, mandate, subscription, or currency. The total is net of any refunds, with the refunded amount also broken out separately. Use this instead of list_payments whenever the question needs a total, count, average, or "how much"/"how many" across multiple payments — never page through list_payments yourself and sum the results. Requires at least one date range: created_at_gte/created_at_lte, charge_date_gte/charge_date_lte, or both together (both narrows to payments matching both ranges - e.g. "payments created this week that are due to be collected next week"). For a single-axis question, use charge_date for when money actually moved ("how much did I collect in June") — created_at can be days earlier than charge_date for payments created under an advance notice period, so it can include or exclude the wrong payments for that kind of question. Use created_at on its own only when the question is specifically about when payments were set up/created, not collected.

    Inputs

    charge_date_gtestring
    Filter: charged (or due to be charged) at or after this ISO 8601 date. Provide together with charge_date_lte. Use this (on its own) for questions about when money actually moved; combine with created_at_gte/created_at_lte only when the question genuinely needs both as independent constraints.
    charge_date_ltestring
    Filter: charged (or due to be charged) at or before this ISO 8601 date. Provide together with charge_date_gte. Can be combined with created_at_gte/created_at_lte for a question that needs both as independent constraints.
    created_at_gtestring
    Filter: created at or after this ISO 8601 datetime. Provide together with created_at_lte. Can be combined with charge_date_gte/charge_date_lte for a question that needs both as independent constraints.
    created_at_ltestring
    Filter: created at or before this ISO 8601 datetime. Provide together with created_at_gte. Can be combined with charge_date_gte/charge_date_lte for a question that needs both as independent constraints.
    currencystring
    Filter by currency code (e.g. GBP, EUR, USD)
    customerstring
    Filter by customer ID (e.g. CU000123). Requires a customer ID — if the user names a customer, ask for their ID rather than searching for it, since the API has no way to look up a customer by name.
    mandatestring
    Filter by mandate ID (e.g. MD000123)
    statusesarray
    Payment statuses to include, e.g. ["failed"] or ["confirmed"]. Omit to get the total of successfully collected payments only (confirmed + paid_out) - this is what "total"/"collected" means unless a specific status is named.
    subscriptionstring
    Filter by subscription ID (e.g. SB000123)
  • gocardlessmcp_get_payoutRetrieve a single payout (bank settlement) by its payout ID.Read-only

    Get Payout

    Retrieve a single payout (bank settlement) by its payout ID.

    Inputs

    idstringrequired
    Payout ID (e.g. PO000123)
  • gocardlessmcp_get_refundRetrieve a single refund by its refund ID.Read-only

    Get Refund

    Retrieve a single refund by its refund ID.

    Inputs

    idstringrequired
    Refund ID (e.g. RF000123)
  • gocardlessmcp_get_subscriptionRetrieve a single subscription (recurring payment schedule) by its subscription ID.Read-only

    Get Subscription

    Retrieve a single subscription (recurring payment schedule) by its subscription ID.

    Inputs

    idstringrequired
    Subscription ID (e.g. SB000123)