Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Customer.io MCP connector

OAuth 2.1/DCR MarketingAnalyticsCRM & Sales

Connect to Customer.io MCP to manage customers, campaigns, and events

Customer.io MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. 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. Register your Customer.io MCP credentials with Scalekit so it handles the token lifecycle. You do this once per environment.

    Dashboard setup steps

    Customer.io MCP uses Dynamic Client Registration (DCR) — no client ID or secret is required. The only step is creating a connection in Scalekit and authorizing your Customer.io account.

    1. Create a connection in Scalekit

      • In the Scalekit dashboard, go to AgentKitConnectionsCreate Connection.
      • Search for Customer.io MCP and click Create.
      • Note the Connection name — use this as connection_name in your code (e.g., customeriomcp).
    2. Authorize your Customer.io account

      Generate an authorization link and open it in a browser to complete the Customer.io OAuth flow.

      The user is redirected to Customer.io to sign in and grant access. Scalekit stores the token and injects it automatically into every tool call — no further configuration is needed.

  4. quickstart.ts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENV_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'customeriomcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Customer.io MCP:', link)
    process.stdout.write('Press Enter after authorizing...')
    await new Promise(r => process.stdin.once('data', r))
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'customeriomcp_cio_auth_status',
    toolInput: {},
    })
    console.log(result)

Connect this agent connector to let your agent:

  • Api cio write — Write to the Customer.io API (POST, PUT, or PATCH)
  • Read cio skills, cio — Read the full content of a specific Customer.io agent skill by path
  • List cio skills — List available Customer.io agent skills — task-specific instruction manuals covering campaigns, segments, deliveries, analytics, and more
  • Schema cio — Introspect the Customer.io API schema to discover endpoints, parameters, and response shapes
  • Prime cio — Print LLM-ready instructions for using the Customer.io API
  • Delete cio — Delete a resource via the Customer.io API (DELETE only)

Check authentication status

Use customeriomcp_cio_auth_status to verify the connection and see the authenticated user, account, and accessible workspaces.

const status = await actions.executeTool({
connectionName: 'customeriomcp',
identifier: 'user_123',
toolName: 'customeriomcp_cio_auth_status',
toolInput: {},
});
console.log(status);

Read campaign data

Use customeriomcp_cio_read_api to fetch campaigns from a Customer.io environment. Call customeriomcp_cio_schema first to discover the correct API path and available parameters.

const campaigns = await actions.executeTool({
connectionName: 'customeriomcp',
identifier: 'user_123',
toolName: 'customeriomcp_cio_read_api',
toolInput: {
path: '/v1/environments/{environment_id}/campaigns',
params: { environment_id: 'env_abc123' },
limit: 10,
},
});
console.log(campaigns);

Create a campaign

Use customeriomcp_cio_write_api to create a new campaign. Always set dry_run: true first to validate the request before executing.

// Step 1 — dry run to validate
const preview = await actions.executeTool({
connectionName: 'customeriomcp',
identifier: 'user_123',
toolName: 'customeriomcp_cio_write_api',
toolInput: {
path: '/v1/environments/{environment_id}/campaigns',
params: { environment_id: 'env_abc123' },
body: { name: 'Welcome Series', type: 'triggered' },
dry_run: true,
},
});
console.log(preview);
// Step 2 — execute after confirming dry run looks correct
const result = await actions.executeTool({
connectionName: 'customeriomcp',
identifier: 'user_123',
toolName: 'customeriomcp_cio_write_api',
toolInput: {
path: '/v1/environments/{environment_id}/campaigns',
params: { environment_id: 'env_abc123' },
body: { name: 'Welcome Series', type: 'triggered' },
},
});
console.log(result);

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

customeriomcp_cio_auth_status # Show the active authentication state — authenticated user, account, and accessible workspaces. Call this to verify which Customer.io account is connected. 0 params

Show the active authentication state — authenticated user, account, and accessible workspaces. Call this to verify which Customer.io account is connected.

customeriomcp_cio_delete_api # Delete a resource via the Customer.io API (DELETE only). Always run with dry_run=true first to preview before executing. 4 params

Delete a resource via the Customer.io API (DELETE only). Always run with dry_run=true first to preview before executing.

Name Type Required Description
path string required API path including placeholders, e.g. '/v1/environments/{environment_id}/campaigns/{campaign_id}'. Placeholders are substituted from params.
dry_run boolean optional Validate and return the request without executing it.
jq string optional gojq expression to filter the response before returning.
params object optional Parameters object. Keys matching path placeholders are substituted; remaining keys become the query string.
customeriomcp_cio_prime # Print LLM-ready instructions for using the Customer.io API. Call this first in a new task to load context about available endpoints and best practices. 0 params

Print LLM-ready instructions for using the Customer.io API. Call this first in a new task to load context about available endpoints and best practices.

customeriomcp_cio_read_api # Read from the Customer.io API (GET only). Use cio_schema first to find the correct path. Supports pagination, jq filtering, and dry_run preview. 7 params

Read from the Customer.io API (GET only). Use cio_schema first to find the correct path. Supports pagination, jq filtering, and dry_run preview.

Name Type Required Description
path string required API path including placeholders, e.g. '/v1/environments/{environment_id}/campaigns'. Placeholders are substituted from params.
dry_run boolean optional Validate and return the request without executing it.
jq string optional gojq expression to filter the response before returning. Use to trim large responses.
limit number optional Page size.
page number optional Page number (1-indexed).
page_all boolean optional Auto-paginate and return NDJSON for the full dataset.
params object optional Parameters object. Keys matching path placeholders are substituted; remaining keys become the query string.
customeriomcp_cio_schema # Introspect the Customer.io API schema to discover endpoints, parameters, and response shapes. Use this before calling cio_read_api or cio_write_api to find the correct path and placeholders. 2 params

Introspect the Customer.io API schema to discover endpoints, parameters, and response shapes. Use this before calling cio_read_api or cio_write_api to find the correct path and placeholders.

Name Type Required Description
query string optional One of: '' (list resources), 'campaigns' (resource), 'campaigns.list' (resource.method), 'GET /v1/...' (method + path), or '/v1/...' (all methods for a path).
refresh boolean optional Force re-download of API specs.
customeriomcp_cio_skills_list # List available Customer.io agent skills — task-specific instruction manuals covering campaigns, segments, deliveries, analytics, and more. 1 param

List available Customer.io agent skills — task-specific instruction manuals covering campaigns, segments, deliveries, analytics, and more.

Name Type Required Description
refresh boolean optional Force re-download of skills.
customeriomcp_cio_skills_read # Read the full content of a specific Customer.io agent skill by path. Use cio_skills_list to find available paths (e.g. 'campaigns', 'fly-api/campaigns.md'). 1 param

Read the full content of a specific Customer.io agent skill by path. Use cio_skills_list to find available paths (e.g. 'campaigns', 'fly-api/campaigns.md').

Name Type Required Description
path string required Skill path, e.g. 'campaigns' or 'campaigns/examples'. See cio_skills_list for available paths.
customeriomcp_cio_write_api # Write to the Customer.io API (POST, PUT, or PATCH). Always run with dry_run=true first to preview the request before executing. 6 params

Write to the Customer.io API (POST, PUT, or PATCH). Always run with dry_run=true first to preview the request before executing.

Name Type Required Description
path string required API path including placeholders, e.g. '/v1/environments/{environment_id}/campaigns'. Placeholders are substituted from params.
body object optional JSON request body.
dry_run boolean optional Validate and return the request without executing it.
jq string optional gojq expression to filter the response before returning.
method string optional HTTP method: POST, PUT, or PATCH. Defaults to POST.
params object optional Parameters object. Keys matching path placeholders are substituted; remaining keys become the query string.