A TypeScript SDK for interacting with the Make API. This SDK provides a type-safe way to interact with Make's API endpoints for managing scenarios, teams, data stores, and more.
Via NPM (Node.js)
npm install @makehq/sdk
Via JSR (Deno)
deno add jsr:@make/sdk
import { Make } from '@makehq/sdk';
// Initialize the Make client
const make = new Make('your-api-key', 'eu2.make.com');
// Get user information
const user = await make.users.me();
// List scenarios
const scenarios = await make.scenarios.list(/* Team ID */);
// Work with data stores
const dataStore = await make.dataStores.get(/* DataStore ID */);
Initialize with retry configuration (optional):
const make = new Make('your-api-key', 'eu2.make.com', {
retry: {
onRateLimit: true,
maxRetries: 3,
},
});
The Make constructor accepts an optional third parameter with configuration options:
const make = new Make('your-api-key', 'eu2.make.com', {
version: 2,
headers: { 'X-Custom-Header': 'value' },
retry: {
onRateLimit: true,
onServerError: true,
maxRetries: 3,
baseDelay: 1000,
maxDelay: 30000,
backoffMultiplier: 2,
},
});
| Option | Type | Default | Description |
|---|---|---|---|
version |
number |
2 |
API version to use |
headers |
Record<string, string> |
{} |
Custom headers to include in all requests |
retry |
RetryOptions |
See below | Configuration for retry behavior |
The SDK supports automatic retries with exponential backoff for handling rate limits and transient server errors.
| Option | Type | Default | Description |
|---|---|---|---|
onRateLimit |
boolean |
false |
Enable retries for rate limit errors (HTTP 429) |
onServerError |
boolean |
false |
Enable retries for server errors (HTTP 5xx) |
maxRetries |
number |
3 |
Maximum number of retry attempts |
baseDelay |
number |
1000 |
Base delay in milliseconds for exponential backoff |
maxDelay |
number |
30000 |
Maximum delay in milliseconds |
backoffMultiplier |
number |
2 |
Multiplier for exponential backoff |
The retry mechanism uses exponential backoff with jitter to prevent thundering herd problems. When a Retry-After header is present in the response, the SDK respects it (capped at maxDelay).
Every SDK endpoint is also described as a harness-agnostic tool definition - a self-contained record with a JSON Schema, examples, and an executor. The same definitions power:
Import them directly via the ./tools subpath:
import { Make } from '@makehq/sdk';
import { MakeTools } from '@makehq/sdk/tools';
const make = new Make('your-api-key', 'eu2.make.com');
// List tools
const tools = MakeTools.map(tool => {
return {
name: tool.name,
title: tool.title,
description: tool.description,
inputSchema: tool.inputSchema,
};
});
// Execute a tool
const tool = MakeTools.find(tool => tool.name === 'scenarios_list');
try {
await tool.execute(make, { teamId: 1 });
} catch (error) {
// Handle error
}
See full example in the scripts/run-mcp-server.mjs file.
Each tool is described as demonstrated in the following example:
{
name: 'scenarios_list',
title: 'List scenarios',
description: 'List all scenarios for a team',
category: 'scenarios',
scope: 'scenarios:read',
inputSchema: {
type: 'object',
properties: {
teamId: { type: 'number', description: 'The team ID to filter scenarios by' },
},
required: ['teamId'],
},
execute: async (make: Make, args: { teamId: number }) => {
return await make.scenarios.list(args.teamId);
},
}
All tools are organized into the following categories:
connectionsconnected-systemcredential-requestsdata-storesdata-store-recordsdata-structuresenumsexecutionsfoldersfunctionshooksincomplete-executionskeyson-prem-agentorganizationsscenariosteamspublic-templatesuserssdk.appssdk.connectionssdk.functionssdk.modulessdk.rpcssdk.webhooksYou can learn more about scopes in our documentation.
make-sdk/
├── src/ # Source code
│ ├── endpoints/ # API endpoint implementations
│ │ ├── *.ts # Endpoints
│ │ └── *.tools.ts # Tool definitions (MCP / CLI / …)
│ ├── index.ts # Main entry point
│ ├── make.ts # Core Make client
│ ├── tools.ts # Aggregated tool definitions (./tools export)
│ ├── types.ts # Common type definitions
│ └── utils.ts # Utility functions
├── test/ # Test files
│ ├── mocks/ # Test mocks
│ ├── *.spec.ts # Unit tests
│ ├── *.integration.test.ts # Integration tests
│ └── test.utils.ts # Test utilities
├── dist/ # Compiled output
└── docs/ # Documentation
The project includes both unit tests and integration tests. To run the tests:
npm test
# Make sure to set up your .env file first
npm run test:integration
Create a .env file in the root directory with the following variables:
MAKE_API_KEY="<your-api-key>"
MAKE_ZONE="<zone>"
MAKE_TEAM="<team-id>"
MAKE_ORGANIZATION="<organization-id>"
Required for connected-system create integration (field names from getAppConfig):
MAKE_CONNECTED_SYSTEM_HTTP_INPUTS='{"url":"https://example.com"}'
MAKE_CONNECTED_SYSTEM_SAP_AGENT_INPUTS='{"ashost":"00","sysnr":"00","client":"00"}'
Each create suite registers a new on-prem agent, then creates the connected system on that agent (no agent ID in .env). Use the same input field names and values you would enter in the Make UI. For sap-agent, the form uses ashost, sysnr, and client (not language); confirm names via getAppConfig if your zone differs.
Read tests always cover http and sap-agent. Create suites run when the matching MAKE_CONNECTED_SYSTEM_*_INPUTS is set.
Copy .env.example to .env and fill in values. The organization must have license.onPremAgent enabled; the API token needs organizations:read, agents:read, and agents:write scopes.
Please provide zone without https:// prefix (e.g. eu2.make.com).
To build the project:
npm run build # Builds both ESM and CJS versions
API documentation can be generated using:
npm run build:docs