Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to MOCO

Scalekit connector
Open markdown

The MOCO connector lets your AI agent act in each user's MOCO account. Each user connects their own MOCO access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 59 tools.

Tools
59
What they doRead · write · destructive
33 · 25 · 133 read25 write1 destructive
Users sign in with

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 MOCO connection

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

  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 = 'moco'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize MOCO:', 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: 'moco_activities_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their MOCO credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • moco_activities_listList time tracking entries, filtered by dates, user, project, task, company or billing state.Read-only

    List Activities

    List time tracking entries, filtered by dates, user, project, task, company or billing state. Returns an array of objects with id, date, hours, description, billed, billable, invoice_id, tag. Use moco_activities_list for timesheets and reports.

    Inputs

    billableboolean
    Filter by billable flag. Example: true
    billedboolean
    Filter by billed flag. Example: false
    company_idinteger
    Company ID, from moco_companies_list. Example: 760253573
    deal_idstring
    Deal ID, from moco_deals_list. Example: 1234567
    fromstring
    Start date, YYYY-MM-DD. Example: 2026-11-01
    idsstring
    Only these IDs, comma-separated. Example: 123,456
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Results per page (default 100). Example: 100
    project_idinteger
    Project ID, from moco_projects_list. Example: 944504145
    remote_idstring
    Single remote ID or comma-separated list of remote IDs. Example: abc123
    sort_bystring
    Sort field, optionally followed by desc. Example: created_at desc
    tagstring
    Single tag or comma-separated list of tags. Example: example
    task_idinteger
    Project task ID, from moco_project_tasks_list. Example: 1234567
    termstring
    Full-text search term. Example: website
    tostring
    End date, YYYY-MM-DD. Example: 2026-11-30
    updated_afterstring
    Only records changed after this time, ISO 8601. Example: 2026-11-01T00:00:00Z
    user_idinteger
    User ID, from moco_users_list. Example: 933590696
  • moco_activity_getGet one time entry.Read-only

    Get Activity

    Get one time entry. Returns an object with id, date, hours, description, billed, billable, invoice_id, tag, remote_service, remote_id, and more. Use moco_activity_get for one entry.

    Inputs

    activity_idintegerrequired
    Activity ID. Example: 123456
  • moco_comments_listList comments on companies, contacts, deals, projects, offers and invoices.Read-only

    List Comments

    List comments on companies, contacts, deals, projects, offers and invoices. Returns an array of objects with id, commentable_id, commentable_type, text, manual, created_at, updated_at, user. Use moco_comments_list to read notes on a record.

    Inputs

    commentable_idinteger
    ID of the record. Example: 944504145
    commentable_typestring
    Type of record. One of: Company, Contact, Deal, DeliveryNote, Expense, Invoice, InvoiceBookkeepingExport, InvoiceDeletion, InvoiceReminder, Offer, OfferConfirmation, Project, ProjectGroup, Purchase, PurchaseBookkeepingExport, PurchaseDraft, Receipt, ReceiptRefundRequest, RecurringExpense, Unit, User, UserHolidayRequest. Example: Projectone of CompanyContactDealDeliveryNoteExpenseInvoiceInvoiceBookkeepingExportInvoiceDeletionInvoiceReminderOfferOfferConfirmationProjectProjectGroupPurchasePurchaseBookkeepingExportPurchaseDraftReceiptReceiptRefundRequestRecurringExpenseUnitUserUserHolidayRequest
    idsstring
    Only these IDs, comma-separated. Example: 123,456
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Results per page (default 100). Example: 100
    updated_afterstring
    Only records changed after this time, ISO 8601. Example: 2026-11-01T00:00:00Z
    user_idinteger
    User ID, from moco_users_list. Example: 933590696
  • moco_companies_listList customers, suppliers and organizations.Read-only

    List Companies

    List customers, suppliers and organizations. Returns an array of objects with id, type, identifier, name, website, email, billing_email_cc, phone. Use moco_companies_list to find a company ID. Use moco_company_get for one company.

    Inputs

    identifierstring
    Identifier (number); MOCO generates one if empty and numbering is automatic. Example: P2611-001
    idsstring
    Only these IDs, comma-separated. Example: 123,456
    include_archivedboolean
    If true, include archived records. Example: false
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Results per page (default 100). Example: 100
    tagsstring
    Tags, comma-separated in queries or an array in bodies. Example: ["Retainer"]
    termstring
    Full-text search term. Example: website
    typestring
    Company type. One of: customer, supplier, organization. Example: customerone of customersupplierorganization
    updated_afterstring
    Only records changed after this time, ISO 8601. Example: 2026-11-01T00:00:00Z
  • moco_company_getGet one company with its address, billing settings and projects.Read-only

    Get Company

    Get one company with its address, billing settings and projects. Returns an object with id, type, identifier, name, website, email, billing_email_cc, phone, fax, address, and more. Use moco_company_get for one company.

    Inputs

    company_idintegerrequired
    Company ID. Example: 123456
  • moco_contact_getGet one contact person.Read-only

    Get Contact

    Get one contact person. Returns an object with id, gender, firstname, lastname, title, job_position, mobile_phone, work_fax, work_phone, work_email, and more. Use moco_contact_get for one contact.

    Inputs

    contact_idintegerrequired
    Contact ID. Example: 123456
  • moco_contacts_listList contact people.Read-only

    List Contacts

    List contact people. Returns an array of objects with id, gender, firstname, lastname, title, job_position, mobile_phone, work_fax. Use moco_contacts_list to find a contact.

    Inputs

    idsstring
    Only these IDs, comma-separated. Example: 123,456
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Results per page (default 100). Example: 100
    phonestring
    Phone number. Example: +41 44 123 45 67
    tagsstring
    Tags, comma-separated in queries or an array in bodies. Example: ["Retainer"]
    termstring
    Full-text search term. Example: website
    updated_afterstring
    Only records changed after this time, ISO 8601. Example: 2026-11-01T00:00:00Z
  • moco_deal_categories_listList the deal categories (pipeline stages) with their probability.Read-only

    List Deal Stages

    List the deal categories (pipeline stages) with their probability. Returns an array of objects with id, name, probability, created_at, updated_at. Use moco_deal_categories_list to find a deal_category_id.

    Inputs

    idsstring
    Only these IDs, comma-separated. Example: 123,456
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Results per page (default 100). Example: 100
    updated_afterstring
    Only records changed after this time, ISO 8601. Example: 2026-11-01T00:00:00Z