make-mcp-server 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +10 -0
- package/LICENSE +21 -0
- package/README.md +334 -0
- package/bin/make-mcp.js +78 -0
- package/bin/postinstall.js +33 -0
- package/data/make-modules.db +0 -0
- package/dist/database/db.d.ts +15 -0
- package/dist/database/db.d.ts.map +1 -0
- package/dist/database/db.js +135 -0
- package/dist/database/db.js.map +1 -0
- package/dist/database/schema.sql +42 -0
- package/dist/mcp/server.d.ts +16 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +551 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/scrapers/scrape-modules.d.ts +18 -0
- package/dist/scrapers/scrape-modules.d.ts.map +1 -0
- package/dist/scrapers/scrape-modules.js +407 -0
- package/dist/scrapers/scrape-modules.js.map +1 -0
- package/dist/utils/logger.d.ts +17 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +55 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +71 -0
- package/scripts/build.js +41 -0
- package/scripts/prepublish.js +42 -0
- package/src/database/schema.sql +42 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS modules (
|
|
2
|
+
id TEXT PRIMARY KEY,
|
|
3
|
+
name TEXT NOT NULL,
|
|
4
|
+
app TEXT NOT NULL,
|
|
5
|
+
type TEXT NOT NULL, -- 'trigger', 'action', 'search'
|
|
6
|
+
description TEXT,
|
|
7
|
+
parameters TEXT, -- JSON string of parameter schema
|
|
8
|
+
examples TEXT, -- JSON string of example configurations
|
|
9
|
+
documentation TEXT, -- Markdown documentation
|
|
10
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
CREATE INDEX IF NOT EXISTS idx_modules_app ON modules(app);
|
|
14
|
+
CREATE INDEX IF NOT EXISTS idx_modules_type ON modules(type);
|
|
15
|
+
CREATE INDEX IF NOT EXISTS idx_modules_name ON modules(name);
|
|
16
|
+
|
|
17
|
+
-- Standalone FTS5 table (not external content, avoids rowid/TEXT PK mismatch)
|
|
18
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS modules_fts USING fts5(
|
|
19
|
+
module_id,
|
|
20
|
+
name,
|
|
21
|
+
app,
|
|
22
|
+
description
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
CREATE TABLE IF NOT EXISTS templates (
|
|
26
|
+
id TEXT PRIMARY KEY,
|
|
27
|
+
name TEXT NOT NULL,
|
|
28
|
+
description TEXT,
|
|
29
|
+
blueprint TEXT, -- JSON string of Make scenario
|
|
30
|
+
modules_used TEXT, -- JSON array of module IDs
|
|
31
|
+
category TEXT,
|
|
32
|
+
difficulty TEXT, -- 'beginner', 'intermediate', 'advanced'
|
|
33
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
CREATE TABLE IF NOT EXISTS examples (
|
|
37
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
38
|
+
module_id TEXT NOT NULL,
|
|
39
|
+
config TEXT NOT NULL, -- JSON string of module configuration
|
|
40
|
+
source TEXT, -- 'template:123' or 'manual'
|
|
41
|
+
FOREIGN KEY (module_id) REFERENCES modules(id)
|
|
42
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make.com MCP Server — Production-grade
|
|
3
|
+
* @author Daniel Shashko (https://www.linkedin.com/in/daniel-shashko/)
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - registerTool / registerPrompt / registerResource (latest v1.x SDK API)
|
|
7
|
+
* - Proper isError flag for tool execution errors
|
|
8
|
+
* - Input validation & sanitization
|
|
9
|
+
* - Structured logging to stderr only (stdio-safe)
|
|
10
|
+
* - MCP Prompts for guided scenario creation
|
|
11
|
+
* - MCP Resources for module catalog browsing
|
|
12
|
+
* - tools_documentation meta-tool (START HERE pattern from n8n-mcp)
|
|
13
|
+
* - Graceful shutdown
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Make.com MCP Server — Production-grade
|
|
4
|
+
* @author Daniel Shashko (https://www.linkedin.com/in/daniel-shashko/)
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - registerTool / registerPrompt / registerResource (latest v1.x SDK API)
|
|
8
|
+
* - Proper isError flag for tool execution errors
|
|
9
|
+
* - Input validation & sanitization
|
|
10
|
+
* - Structured logging to stderr only (stdio-safe)
|
|
11
|
+
* - MCP Prompts for guided scenario creation
|
|
12
|
+
* - MCP Resources for module catalog browsing
|
|
13
|
+
* - tools_documentation meta-tool (START HERE pattern from n8n-mcp)
|
|
14
|
+
* - Graceful shutdown
|
|
15
|
+
*/
|
|
16
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
17
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
import { MakeDatabase } from '../database/db.js';
|
|
20
|
+
import axios from 'axios';
|
|
21
|
+
import dotenv from 'dotenv';
|
|
22
|
+
import { logger } from '../utils/logger.js';
|
|
23
|
+
dotenv.config();
|
|
24
|
+
const VERSION = '1.2.0';
|
|
25
|
+
// ── Database ──
|
|
26
|
+
// DATABASE_PATH env var overrides default; otherwise db.ts resolves
|
|
27
|
+
// to <packageRoot>/data/make-modules.db automatically.
|
|
28
|
+
const dbPath = process.env['DATABASE_PATH'];
|
|
29
|
+
const db = new MakeDatabase(dbPath);
|
|
30
|
+
// ── MCP Server ──
|
|
31
|
+
const server = new McpServer({
|
|
32
|
+
name: 'make-mcp-server',
|
|
33
|
+
version: VERSION,
|
|
34
|
+
});
|
|
35
|
+
// ══════════════════════════════════════════════════════════════
|
|
36
|
+
// HELPER: safe tool response
|
|
37
|
+
// ══════════════════════════════════════════════════════════════
|
|
38
|
+
function ok(data) {
|
|
39
|
+
return {
|
|
40
|
+
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function fail(message) {
|
|
44
|
+
return {
|
|
45
|
+
content: [{ type: 'text', text: message }],
|
|
46
|
+
isError: true,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// ══════════════════════════════════════════════════════════════
|
|
50
|
+
// TOOL: tools_documentation (START HERE)
|
|
51
|
+
// ══════════════════════════════════════════════════════════════
|
|
52
|
+
server.registerTool('tools_documentation', {
|
|
53
|
+
title: 'Tools Documentation — START HERE',
|
|
54
|
+
description: 'Returns comprehensive documentation for all available tools, resources, and prompts. ' +
|
|
55
|
+
'Call this FIRST to understand how to use the Make.com MCP server effectively.',
|
|
56
|
+
}, async () => {
|
|
57
|
+
const doc = {
|
|
58
|
+
server: {
|
|
59
|
+
name: 'make-mcp-server',
|
|
60
|
+
version: VERSION,
|
|
61
|
+
description: 'MCP server for creating, validating, and deploying Make.com automation scenarios.',
|
|
62
|
+
},
|
|
63
|
+
quickStart: [
|
|
64
|
+
'1. Call tools_documentation (this tool) to understand available capabilities',
|
|
65
|
+
'2. Use search_modules to find the modules you need (e.g., "slack", "google sheets")',
|
|
66
|
+
'3. Use get_module to get full parameter details for each module',
|
|
67
|
+
'4. Build a scenario blueprint JSON with a "flow" array of modules',
|
|
68
|
+
'5. Call validate_scenario to check for errors before deploying',
|
|
69
|
+
'6. Call create_scenario to deploy to Make.com (requires MAKE_API_KEY)',
|
|
70
|
+
],
|
|
71
|
+
tools: {
|
|
72
|
+
tools_documentation: 'Returns this documentation. Call first.',
|
|
73
|
+
search_modules: 'Full-text search across 200+ Make.com modules. Params: query (required), app (optional filter).',
|
|
74
|
+
get_module: 'Get detailed module info with all parameters. Params: moduleId (e.g., "slack:ActionPostMessage").',
|
|
75
|
+
validate_scenario: 'Validate a scenario blueprint before deployment. Checks structure, modules, and required params.',
|
|
76
|
+
create_scenario: 'Deploy a validated scenario to Make.com via API. Requires MAKE_API_KEY.',
|
|
77
|
+
search_templates: 'Search reusable scenario templates. Params: query (optional), category (optional).',
|
|
78
|
+
list_apps: 'List all available apps with module counts.',
|
|
79
|
+
},
|
|
80
|
+
prompts: {
|
|
81
|
+
build_scenario: 'Guided scenario creation wizard. Provide a description and the prompt guides you through module selection, configuration, and validation.',
|
|
82
|
+
explain_module: 'Get a detailed explanation of any Make.com module with usage examples.',
|
|
83
|
+
},
|
|
84
|
+
resources: {
|
|
85
|
+
'make://apps': 'List of all available apps and their module counts.',
|
|
86
|
+
},
|
|
87
|
+
blueprintFormat: {
|
|
88
|
+
description: 'Make.com scenario blueprint structure',
|
|
89
|
+
example: {
|
|
90
|
+
name: 'My Scenario',
|
|
91
|
+
flow: [
|
|
92
|
+
{
|
|
93
|
+
id: 1,
|
|
94
|
+
module: 'gateway:CustomWebHook',
|
|
95
|
+
parameters: { name: 'My Webhook' },
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: 2,
|
|
99
|
+
module: 'slack:ActionPostMessage',
|
|
100
|
+
parameters: { channel: '#general', text: '{{1.data}}' },
|
|
101
|
+
mapper: { channel: '#general', text: '{{1.data}}' },
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
tips: [
|
|
107
|
+
'Module IDs follow the format: app:ActionName or app:TriggerName',
|
|
108
|
+
'Use search_modules with wildcard "*" to list all modules',
|
|
109
|
+
'First module in a scenario should be a trigger',
|
|
110
|
+
'Parameters reference previous modules with {{moduleId.field}} syntax',
|
|
111
|
+
'Always validate before deploying to catch errors early',
|
|
112
|
+
],
|
|
113
|
+
};
|
|
114
|
+
logger.debug('tools_documentation called');
|
|
115
|
+
return ok(doc);
|
|
116
|
+
});
|
|
117
|
+
// ══════════════════════════════════════════════════════════════
|
|
118
|
+
// TOOL: search_modules
|
|
119
|
+
// ══════════════════════════════════════════════════════════════
|
|
120
|
+
server.registerTool('search_modules', {
|
|
121
|
+
title: 'Search Make.com Modules',
|
|
122
|
+
description: 'Full-text search across 200+ Make.com modules. Returns module names, apps, types, and descriptions.',
|
|
123
|
+
inputSchema: {
|
|
124
|
+
query: z.string().min(1).max(200).describe('Search keyword (e.g., "slack", "email", "google sheets")'),
|
|
125
|
+
app: z.string().max(100).optional().describe('Filter by app name (e.g., "Slack", "Gmail")'),
|
|
126
|
+
},
|
|
127
|
+
}, async ({ query, app }) => {
|
|
128
|
+
try {
|
|
129
|
+
const sanitizedQuery = query.replace(/[^\w\s*".-]/g, ' ').trim();
|
|
130
|
+
if (!sanitizedQuery) {
|
|
131
|
+
return fail('Invalid search query. Use alphanumeric characters.');
|
|
132
|
+
}
|
|
133
|
+
const results = db.searchModules(sanitizedQuery, app);
|
|
134
|
+
logger.debug('search_modules', { query: sanitizedQuery, app, resultCount: results.length });
|
|
135
|
+
return ok({
|
|
136
|
+
count: results.length,
|
|
137
|
+
modules: results.map((m) => ({
|
|
138
|
+
id: m.id,
|
|
139
|
+
name: m.name,
|
|
140
|
+
app: m.app,
|
|
141
|
+
type: m.type,
|
|
142
|
+
description: m.description,
|
|
143
|
+
})),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
logger.error('search_modules failed', { error: error.message });
|
|
148
|
+
return fail(`Search failed: ${error.message}`);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
// ══════════════════════════════════════════════════════════════
|
|
152
|
+
// TOOL: get_module
|
|
153
|
+
// ══════════════════════════════════════════════════════════════
|
|
154
|
+
server.registerTool('get_module', {
|
|
155
|
+
title: 'Get Module Details',
|
|
156
|
+
description: 'Get detailed information about a specific Make.com module including all parameters, types, and configuration examples.',
|
|
157
|
+
inputSchema: {
|
|
158
|
+
moduleId: z.string().min(1).max(200).describe('Module ID (e.g., "http:ActionSendData", "slack:ActionPostMessage")'),
|
|
159
|
+
},
|
|
160
|
+
}, async ({ moduleId }) => {
|
|
161
|
+
try {
|
|
162
|
+
const sanitizedId = moduleId.replace(/[^\w:.-]/g, '');
|
|
163
|
+
const mod = db.getModule(sanitizedId);
|
|
164
|
+
if (!mod) {
|
|
165
|
+
return fail(`Module not found: ${sanitizedId}. Use search_modules to find valid module IDs.`);
|
|
166
|
+
}
|
|
167
|
+
const response = {
|
|
168
|
+
id: mod.id,
|
|
169
|
+
name: mod.name,
|
|
170
|
+
app: mod.app,
|
|
171
|
+
type: mod.type,
|
|
172
|
+
description: mod.description,
|
|
173
|
+
parameters: JSON.parse(mod.parameters),
|
|
174
|
+
documentation: mod.documentation || undefined,
|
|
175
|
+
};
|
|
176
|
+
const examples = db.getModuleExamples(sanitizedId);
|
|
177
|
+
if (examples.length > 0) {
|
|
178
|
+
response.examples = examples.map((ex) => JSON.parse(ex.config));
|
|
179
|
+
}
|
|
180
|
+
logger.debug('get_module', { moduleId: sanitizedId });
|
|
181
|
+
return ok(response);
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
logger.error('get_module failed', { moduleId, error: error.message });
|
|
185
|
+
return fail(`Failed to retrieve module: ${error.message}`);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
// ══════════════════════════════════════════════════════════════
|
|
189
|
+
// TOOL: validate_scenario
|
|
190
|
+
// ══════════════════════════════════════════════════════════════
|
|
191
|
+
server.registerTool('validate_scenario', {
|
|
192
|
+
title: 'Validate Scenario Blueprint',
|
|
193
|
+
description: 'Validate a Make.com scenario blueprint before deployment. ' +
|
|
194
|
+
'Checks for missing required parameters, unknown modules, type mismatches, and structural issues.',
|
|
195
|
+
inputSchema: {
|
|
196
|
+
blueprint: z.string().min(2).max(100000).describe('Make scenario blueprint JSON (stringified)'),
|
|
197
|
+
},
|
|
198
|
+
}, async ({ blueprint }) => {
|
|
199
|
+
try {
|
|
200
|
+
let parsed;
|
|
201
|
+
try {
|
|
202
|
+
parsed = JSON.parse(blueprint);
|
|
203
|
+
}
|
|
204
|
+
catch {
|
|
205
|
+
return fail('Invalid JSON. Ensure the blueprint is valid JSON.');
|
|
206
|
+
}
|
|
207
|
+
const errors = [];
|
|
208
|
+
const warnings = [];
|
|
209
|
+
const validatedModules = [];
|
|
210
|
+
if (!parsed.flow || !Array.isArray(parsed.flow)) {
|
|
211
|
+
errors.push('Blueprint must contain a "flow" array of modules.');
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
if (parsed.flow.length === 0) {
|
|
215
|
+
errors.push('Flow array is empty. Add at least one module.');
|
|
216
|
+
}
|
|
217
|
+
for (let i = 0; i < parsed.flow.length; i++) {
|
|
218
|
+
const flowModule = parsed.flow[i];
|
|
219
|
+
const pos = `Flow[${i}]`;
|
|
220
|
+
if (!flowModule || typeof flowModule !== 'object') {
|
|
221
|
+
errors.push(`${pos}: Each flow item must be an object.`);
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
if (!flowModule.module || typeof flowModule.module !== 'string') {
|
|
225
|
+
errors.push(`${pos}: Missing or invalid "module" property.`);
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
const schema = db.getModule(flowModule.module);
|
|
229
|
+
if (!schema) {
|
|
230
|
+
errors.push(`${pos}: Unknown module "${flowModule.module}". Use search_modules to find valid IDs.`);
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
validatedModules.push(flowModule.module);
|
|
234
|
+
// Check required parameters
|
|
235
|
+
const params = JSON.parse(schema.parameters);
|
|
236
|
+
for (const param of params) {
|
|
237
|
+
if (param.required) {
|
|
238
|
+
const hasParam = flowModule.parameters?.[param.name] !== undefined
|
|
239
|
+
|| flowModule.mapper?.[param.name] !== undefined;
|
|
240
|
+
if (!hasParam) {
|
|
241
|
+
errors.push(`${pos} (${flowModule.module}): Missing required parameter "${param.name}".`);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// Warn if first module is not a trigger
|
|
247
|
+
if (parsed.flow.length > 0 && parsed.flow[0]?.module) {
|
|
248
|
+
const firstModule = db.getModule(parsed.flow[0].module);
|
|
249
|
+
if (firstModule && firstModule.type !== 'trigger') {
|
|
250
|
+
warnings.push('First module should typically be a trigger. Your scenario has no trigger entry point.');
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
// Warn about missing module IDs
|
|
254
|
+
for (let i = 0; i < parsed.flow.length; i++) {
|
|
255
|
+
if (!parsed.flow[i]?.id && parsed.flow[i]?.id !== 0) {
|
|
256
|
+
warnings.push(`Flow[${i}]: Missing "id" field. Each module should have a unique numeric ID for mapping references.`);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
const result = {
|
|
261
|
+
valid: errors.length === 0,
|
|
262
|
+
errors,
|
|
263
|
+
warnings,
|
|
264
|
+
modulesValidated: validatedModules,
|
|
265
|
+
summary: errors.length === 0
|
|
266
|
+
? `Blueprint is valid. ${validatedModules.length} module(s) checked, ${warnings.length} warning(s).`
|
|
267
|
+
: `${errors.length} error(s) found. Fix them before deploying.`,
|
|
268
|
+
};
|
|
269
|
+
logger.debug('validate_scenario', { valid: result.valid, errors: errors.length, warnings: warnings.length });
|
|
270
|
+
return ok(result);
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
logger.error('validate_scenario failed', { error: error.message });
|
|
274
|
+
return fail(`Validation failed: ${error.message}`);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
// ══════════════════════════════════════════════════════════════
|
|
278
|
+
// TOOL: create_scenario
|
|
279
|
+
// ══════════════════════════════════════════════════════════════
|
|
280
|
+
server.registerTool('create_scenario', {
|
|
281
|
+
title: 'Deploy Scenario to Make.com',
|
|
282
|
+
description: 'Deploy a validated scenario blueprint to Make.com via API. ' +
|
|
283
|
+
'Requires MAKE_API_KEY environment variable. Always validate first.',
|
|
284
|
+
inputSchema: {
|
|
285
|
+
name: z.string().min(1).max(500).describe('Scenario name'),
|
|
286
|
+
blueprint: z.string().min(2).max(100000).describe('Scenario blueprint JSON (stringified)'),
|
|
287
|
+
teamId: z.number().optional().describe('Make team ID (uses MAKE_TEAM_ID env var if not provided)'),
|
|
288
|
+
folderId: z.number().optional().describe('Make folder ID to create scenario in'),
|
|
289
|
+
},
|
|
290
|
+
annotations: {
|
|
291
|
+
destructiveHint: true,
|
|
292
|
+
idempotentHint: false,
|
|
293
|
+
},
|
|
294
|
+
}, async ({ name, blueprint, teamId, folderId }) => {
|
|
295
|
+
try {
|
|
296
|
+
const apiKey = process.env['MAKE_API_KEY'];
|
|
297
|
+
if (!apiKey || apiKey === 'your_api_key_here') {
|
|
298
|
+
return fail('MAKE_API_KEY not configured. Set it in the .env file to deploy scenarios.\n' +
|
|
299
|
+
'Get your API key from: https://www.make.com/en/api-documentation');
|
|
300
|
+
}
|
|
301
|
+
const resolvedTeamId = teamId || Number(process.env['MAKE_TEAM_ID']);
|
|
302
|
+
if (!resolvedTeamId || isNaN(resolvedTeamId)) {
|
|
303
|
+
return fail('Team ID required. Provide teamId parameter or set MAKE_TEAM_ID in .env file.');
|
|
304
|
+
}
|
|
305
|
+
// Validate blueprint JSON
|
|
306
|
+
try {
|
|
307
|
+
JSON.parse(blueprint);
|
|
308
|
+
}
|
|
309
|
+
catch {
|
|
310
|
+
return fail('Invalid blueprint JSON. Run validate_scenario first.');
|
|
311
|
+
}
|
|
312
|
+
const baseUrl = process.env['MAKE_API_URL'] || 'https://eu1.make.com/api/v2';
|
|
313
|
+
const payload = {
|
|
314
|
+
teamId: resolvedTeamId,
|
|
315
|
+
name,
|
|
316
|
+
blueprint,
|
|
317
|
+
scheduling: JSON.stringify({ type: 'on-demand' }),
|
|
318
|
+
};
|
|
319
|
+
if (folderId)
|
|
320
|
+
payload.folderId = folderId;
|
|
321
|
+
logger.info('create_scenario', { name, teamId: resolvedTeamId });
|
|
322
|
+
const response = await axios.post(`${baseUrl}/scenarios`, payload, {
|
|
323
|
+
headers: {
|
|
324
|
+
'Authorization': `Token ${apiKey}`,
|
|
325
|
+
'Content-Type': 'application/json',
|
|
326
|
+
},
|
|
327
|
+
timeout: 30000,
|
|
328
|
+
});
|
|
329
|
+
return ok({
|
|
330
|
+
success: true,
|
|
331
|
+
scenario: response.data,
|
|
332
|
+
message: `Scenario "${name}" created successfully.`,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
catch (error) {
|
|
336
|
+
const msg = error.response?.data?.message || error.message;
|
|
337
|
+
const status = error.response?.status;
|
|
338
|
+
logger.error('create_scenario failed', { error: msg, status });
|
|
339
|
+
if (status === 401) {
|
|
340
|
+
return fail('Authentication failed. Check your MAKE_API_KEY.');
|
|
341
|
+
}
|
|
342
|
+
if (status === 403) {
|
|
343
|
+
return fail('Access denied. Check your API key permissions and team ID.');
|
|
344
|
+
}
|
|
345
|
+
return fail(`Failed to create scenario: ${msg}`);
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
// ══════════════════════════════════════════════════════════════
|
|
349
|
+
// TOOL: search_templates
|
|
350
|
+
// ══════════════════════════════════════════════════════════════
|
|
351
|
+
server.registerTool('search_templates', {
|
|
352
|
+
title: 'Search Scenario Templates',
|
|
353
|
+
description: 'Search Make.com scenario templates for inspiration and reuse.',
|
|
354
|
+
inputSchema: {
|
|
355
|
+
query: z.string().max(200).optional().describe('Search keyword'),
|
|
356
|
+
category: z.string().max(100).optional().describe('Filter by category (e.g., "marketing", "sales")'),
|
|
357
|
+
},
|
|
358
|
+
}, async ({ query, category }) => {
|
|
359
|
+
try {
|
|
360
|
+
const templates = db.searchTemplates(query, category);
|
|
361
|
+
logger.debug('search_templates', { query, category, count: templates.length });
|
|
362
|
+
return ok({
|
|
363
|
+
count: templates.length,
|
|
364
|
+
templates: templates.map((t) => ({
|
|
365
|
+
id: t.id,
|
|
366
|
+
name: t.name,
|
|
367
|
+
description: t.description,
|
|
368
|
+
category: t.category,
|
|
369
|
+
difficulty: t.difficulty,
|
|
370
|
+
})),
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
catch (error) {
|
|
374
|
+
logger.error('search_templates failed', { error: error.message });
|
|
375
|
+
return fail(`Template search failed: ${error.message}`);
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
// ══════════════════════════════════════════════════════════════
|
|
379
|
+
// TOOL: list_apps
|
|
380
|
+
// ══════════════════════════════════════════════════════════════
|
|
381
|
+
server.registerTool('list_apps', {
|
|
382
|
+
title: 'List Available Apps',
|
|
383
|
+
description: 'List all available Make.com apps/integrations with module counts.',
|
|
384
|
+
}, async () => {
|
|
385
|
+
try {
|
|
386
|
+
const apps = db.searchModules('*');
|
|
387
|
+
const appMap = new Map();
|
|
388
|
+
for (const mod of apps) {
|
|
389
|
+
const existing = appMap.get(mod.app);
|
|
390
|
+
if (existing) {
|
|
391
|
+
existing.count++;
|
|
392
|
+
existing.types.add(mod.type);
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
appMap.set(mod.app, { count: 1, types: new Set([mod.type]) });
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
const result = Array.from(appMap.entries())
|
|
399
|
+
.map(([app, info]) => ({
|
|
400
|
+
app,
|
|
401
|
+
moduleCount: info.count,
|
|
402
|
+
types: Array.from(info.types),
|
|
403
|
+
}))
|
|
404
|
+
.sort((a, b) => b.moduleCount - a.moduleCount);
|
|
405
|
+
logger.debug('list_apps', { appCount: result.length });
|
|
406
|
+
return ok({
|
|
407
|
+
totalApps: result.length,
|
|
408
|
+
totalModules: apps.length,
|
|
409
|
+
apps: result,
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
catch (error) {
|
|
413
|
+
logger.error('list_apps failed', { error: error.message });
|
|
414
|
+
return fail(`Failed to list apps: ${error.message}`);
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
// ══════════════════════════════════════════════════════════════
|
|
418
|
+
// PROMPT: build_scenario
|
|
419
|
+
// ══════════════════════════════════════════════════════════════
|
|
420
|
+
server.registerPrompt('build_scenario', {
|
|
421
|
+
title: 'Build a Make.com Scenario',
|
|
422
|
+
description: 'Guided workflow for creating a Make.com automation scenario. ' +
|
|
423
|
+
'Provide a description of what you want to automate, and this prompt will ' +
|
|
424
|
+
'guide you through module selection, configuration, and validation.',
|
|
425
|
+
argsSchema: {
|
|
426
|
+
description: z.string().describe('Natural language description of the automation you want to create'),
|
|
427
|
+
apps: z.string().optional().describe('Comma-separated list of specific apps to use (e.g., "Slack, Google Sheets")'),
|
|
428
|
+
},
|
|
429
|
+
}, ({ description, apps }) => {
|
|
430
|
+
const appHint = apps ? `\nPreferred apps: ${apps}` : '';
|
|
431
|
+
return {
|
|
432
|
+
messages: [
|
|
433
|
+
{
|
|
434
|
+
role: 'user',
|
|
435
|
+
content: {
|
|
436
|
+
type: 'text',
|
|
437
|
+
text: [
|
|
438
|
+
`I want to create a Make.com automation scenario.`,
|
|
439
|
+
``,
|
|
440
|
+
`## Description`,
|
|
441
|
+
description,
|
|
442
|
+
appHint,
|
|
443
|
+
``,
|
|
444
|
+
`## Instructions`,
|
|
445
|
+
`Please help me build this scenario step by step:`,
|
|
446
|
+
``,
|
|
447
|
+
`1. **Analyze** the requirement and identify the needed modules`,
|
|
448
|
+
`2. **Search** for modules using the search_modules tool`,
|
|
449
|
+
`3. **Get details** for each module using get_module to understand parameters`,
|
|
450
|
+
`4. **Build** the blueprint JSON with proper module IDs, parameters, and data mapping`,
|
|
451
|
+
`5. **Validate** the blueprint using validate_scenario`,
|
|
452
|
+
`6. **Fix** any validation errors`,
|
|
453
|
+
`7. **Present** the final validated blueprint ready for deployment`,
|
|
454
|
+
``,
|
|
455
|
+
`Important rules:`,
|
|
456
|
+
`- Always start with a trigger module`,
|
|
457
|
+
`- Use exact module IDs from the database (format: "app:ActionName")`,
|
|
458
|
+
`- Reference previous module outputs using {{moduleId.field}} syntax`,
|
|
459
|
+
`- Include all required parameters for each module`,
|
|
460
|
+
`- Validate before presenting the final blueprint`,
|
|
461
|
+
].join('\n'),
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
],
|
|
465
|
+
};
|
|
466
|
+
});
|
|
467
|
+
server.registerPrompt('explain_module', {
|
|
468
|
+
title: 'Explain a Make.com Module',
|
|
469
|
+
description: 'Get a detailed explanation of a Make.com module with usage examples and best practices.',
|
|
470
|
+
argsSchema: {
|
|
471
|
+
moduleId: z.string().describe('The module ID to explain (e.g., "slack:ActionPostMessage")'),
|
|
472
|
+
},
|
|
473
|
+
}, ({ moduleId }) => ({
|
|
474
|
+
messages: [
|
|
475
|
+
{
|
|
476
|
+
role: 'user',
|
|
477
|
+
content: {
|
|
478
|
+
type: 'text',
|
|
479
|
+
text: [
|
|
480
|
+
`Please explain the Make.com module "${moduleId}" in detail:`,
|
|
481
|
+
``,
|
|
482
|
+
`1. Use the get_module tool to retrieve its full specification`,
|
|
483
|
+
`2. Explain what the module does in plain language`,
|
|
484
|
+
`3. List all parameters with which are required vs optional`,
|
|
485
|
+
`4. Show a practical example of how to configure it in a scenario`,
|
|
486
|
+
`5. Mention any tips, gotchas, or best practices`,
|
|
487
|
+
].join('\n'),
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
],
|
|
491
|
+
}));
|
|
492
|
+
// ══════════════════════════════════════════════════════════════
|
|
493
|
+
// RESOURCE: make://apps
|
|
494
|
+
// ══════════════════════════════════════════════════════════════
|
|
495
|
+
server.registerResource('apps-catalog', 'make://apps', {
|
|
496
|
+
title: 'Make.com Apps Catalog',
|
|
497
|
+
description: 'List of all available Make.com apps/integrations with module counts.',
|
|
498
|
+
mimeType: 'application/json',
|
|
499
|
+
}, async (uri) => {
|
|
500
|
+
const apps = db.searchModules('*');
|
|
501
|
+
const appMap = new Map();
|
|
502
|
+
for (const mod of apps) {
|
|
503
|
+
appMap.set(mod.app, (appMap.get(mod.app) || 0) + 1);
|
|
504
|
+
}
|
|
505
|
+
const result = Array.from(appMap.entries())
|
|
506
|
+
.map(([app, count]) => ({ app, moduleCount: count }))
|
|
507
|
+
.sort((a, b) => b.moduleCount - a.moduleCount);
|
|
508
|
+
return {
|
|
509
|
+
contents: [{
|
|
510
|
+
uri: uri.href,
|
|
511
|
+
mimeType: 'application/json',
|
|
512
|
+
text: JSON.stringify({ totalApps: result.length, apps: result }, null, 2),
|
|
513
|
+
}],
|
|
514
|
+
};
|
|
515
|
+
});
|
|
516
|
+
// ══════════════════════════════════════════════════════════════
|
|
517
|
+
// MAIN
|
|
518
|
+
// ══════════════════════════════════════════════════════════════
|
|
519
|
+
async function main() {
|
|
520
|
+
const transport = new StdioServerTransport();
|
|
521
|
+
// Graceful shutdown
|
|
522
|
+
const shutdown = async () => {
|
|
523
|
+
logger.info('Shutting down Make MCP server...');
|
|
524
|
+
try {
|
|
525
|
+
db.close();
|
|
526
|
+
await server.close();
|
|
527
|
+
}
|
|
528
|
+
catch {
|
|
529
|
+
// Ignore errors during shutdown
|
|
530
|
+
}
|
|
531
|
+
process.exit(0);
|
|
532
|
+
};
|
|
533
|
+
process.on('SIGINT', shutdown);
|
|
534
|
+
process.on('SIGTERM', shutdown);
|
|
535
|
+
process.on('uncaughtException', (err) => {
|
|
536
|
+
logger.error('Uncaught exception', { error: err.message, stack: err.stack });
|
|
537
|
+
shutdown();
|
|
538
|
+
});
|
|
539
|
+
process.on('unhandledRejection', (reason) => {
|
|
540
|
+
logger.error('Unhandled rejection', { error: reason?.message || String(reason) });
|
|
541
|
+
});
|
|
542
|
+
await server.connect(transport);
|
|
543
|
+
logger.info(`Make MCP server v${VERSION} running on stdio`, {
|
|
544
|
+
modules: db.searchModules('*').length,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
main().catch((err) => {
|
|
548
|
+
logger.error('Fatal: Failed to start server', { error: err.message });
|
|
549
|
+
process.exit(1);
|
|
550
|
+
});
|
|
551
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB,iBAAiB;AACjB,oEAAoE;AACpE,uDAAuD;AACvD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAC5C,MAAM,EAAE,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;AAEpC,mBAAmB;AACnB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IACzB,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH,iEAAiE;AACjE,6BAA6B;AAC7B,iEAAiE;AAEjE,SAAS,EAAE,CAAC,IAAa;IACrB,OAAO;QACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;KAC5E,CAAC;AACN,CAAC;AAED,SAAS,IAAI,CAAC,OAAe;IACzB,OAAO;QACH,OAAO,EAAE,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AE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface MakeModule {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
app: string;
|
|
5
|
+
type: 'trigger' | 'action' | 'search';
|
|
6
|
+
description: string;
|
|
7
|
+
parameters: any[];
|
|
8
|
+
documentation?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class ModuleScraper {
|
|
11
|
+
private db;
|
|
12
|
+
constructor();
|
|
13
|
+
scrapeFromMakeAPI(): Promise<MakeModule[]>;
|
|
14
|
+
private getModuleCatalog;
|
|
15
|
+
populateDatabase(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=scrape-modules.d.ts.map
|