@microlink/mcp 2.0.0 → 2.0.3

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@microlink/mcp",
3
3
  "description": "MCP server for Microlink API",
4
4
  "homepage": "https://github.com/microlinkhq/microlink",
5
- "version": "2.0.0",
5
+ "version": "2.0.3",
6
6
  "main": "./src/index.js",
7
7
  "exports": {
8
8
  ".": "./src/index.js"
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@microlink/mql": "0.18.0",
47
47
  "@modelcontextprotocol/sdk": "1.30.0",
48
- "microlink.io": "0.0.4",
48
+ "microlink.io": "0.1.1",
49
49
  "zod": "~4.4.3"
50
50
  },
51
51
  "engines": {
@@ -66,5 +66,5 @@
66
66
  "access": "public"
67
67
  },
68
68
  "type": "module",
69
- "gitHead": "13e0818cc80bca85a19f16837095bd7d6b31f76a"
69
+ "gitHead": "a12fcd2a7bc918e741a71b50fd2cd93876f4ca8f"
70
70
  }
package/src/schemas.js CHANGED
@@ -120,6 +120,7 @@ export const screenshotConfigSchema = objectLikeSchema(
120
120
  optimizeForSpeed: booleanSchema.optional(),
121
121
  overlay: screenshotOverlaySchema.optional(),
122
122
  palette: booleanSchema.optional(),
123
+ quality: z.number().min(0).max(100).optional(),
123
124
  type: z.enum(['jpeg', 'png']).optional()
124
125
  })
125
126
  .strict()
@@ -227,12 +228,15 @@ const fullShape = {
227
228
  ping: toggledObjectSchema.optional()
228
229
  }
229
230
 
230
- const visualSchema = {
231
+ // Shared Microlink API query parameters (see microlink.io/docs/api/parameters).
232
+ // Product tools layer their own fields on top; these apply to any URL fetch.
233
+ // `data` is separate: content/collection helpers overwrite it with their field rule.
234
+ const browserSchema = {
231
235
  adblock: booleanSchema.optional(),
232
236
  animations: booleanSchema.optional(),
237
+ cacheKey: z.string().min(1).optional(),
233
238
  click: stringOrStringArraySchema.optional(),
234
239
  colorScheme: z.enum(['no-preference', 'light', 'dark']).optional(),
235
- data: objectLikeSchema(z.record(z.string(), dataRuleSchema)).optional(),
236
240
  device: z.string().min(1).optional(),
237
241
  filename: z.string().min(1).optional(),
238
242
  filter: z.string().min(1).optional(),
@@ -260,6 +264,11 @@ const visualSchema = {
260
264
  .optional()
261
265
  }
262
266
 
267
+ const visualSchema = {
268
+ ...browserSchema,
269
+ data: objectLikeSchema(z.record(z.string(), dataRuleSchema)).optional()
270
+ }
271
+
263
272
  export const extractInputSchema = baseSchema
264
273
  .extend(fullShape)
265
274
  .extend(visualSchema)
@@ -287,35 +296,40 @@ export const pdfInputSchema = baseSchema
287
296
  .strict()
288
297
 
289
298
  export const audioInputSchema = baseSchema
299
+ .extend(visualSchema)
290
300
  .extend({
291
- proxy: proxySchema.optional(),
292
301
  meta: z.union([booleanSchema, metaConfigSchema]).optional(),
293
302
  audio: booleanSchema.optional()
294
303
  })
295
304
  .strict()
296
305
 
297
306
  export const videoInputSchema = baseSchema
307
+ .extend(visualSchema)
298
308
  .extend({
299
- proxy: proxySchema.optional(),
300
309
  meta: z.union([booleanSchema, metaConfigSchema]).optional(),
301
310
  video: booleanSchema.optional()
302
311
  })
303
312
  .strict()
304
313
 
305
314
  export const logoInputSchema = baseSchema
315
+ .extend(visualSchema)
306
316
  .extend({
307
- square: booleanSchema.optional()
317
+ square: booleanSchema.optional(),
318
+ palette: booleanSchema.optional()
308
319
  })
309
320
  .strict()
310
321
 
311
322
  export const metadataInputSchema = baseSchema
323
+ .extend(visualSchema)
312
324
  .extend({
313
- meta: z.union([booleanSchema, metaConfigSchema]).optional()
325
+ meta: z.union([booleanSchema, metaConfigSchema]).optional(),
326
+ palette: booleanSchema.optional()
314
327
  })
315
328
  .strict()
316
329
 
317
330
  // Content tools (markdown/html/text) accept a selector to scope the extraction.
318
331
  const contentSchema = baseSchema
332
+ .extend(browserSchema)
319
333
  .extend({
320
334
  selector: selectorSchema.optional(),
321
335
  selectorAll: selectorSchema.optional(),
@@ -325,6 +339,7 @@ const contentSchema = baseSchema
325
339
 
326
340
  // Collection tools accept selector/attr/type overrides for the data rule.
327
341
  const collectionSchema = baseSchema
342
+ .extend(browserSchema)
328
343
  .extend({
329
344
  selector: selectorSchema.optional(),
330
345
  selectorAll: selectorSchema.optional(),
@@ -340,6 +355,7 @@ export const htmlInputSchema = contentSchema
340
355
  export const textInputSchema = contentSchema
341
356
 
342
357
  export const embedInputSchema = baseSchema
358
+ .extend(visualSchema)
343
359
  .extend({
344
360
  maxWidth: z.coerce.number().int().positive().optional(),
345
361
  maxHeight: z.coerce.number().int().positive().optional()
@@ -356,9 +372,10 @@ export const audiosInputSchema = collectionSchema
356
372
 
357
373
  export const emailsInputSchema = collectionSchema
358
374
 
359
- export const technologiesInputSchema = baseSchema.strict()
375
+ export const technologiesInputSchema = baseSchema.extend(visualSchema).strict()
360
376
 
361
377
  export const lighthouseInputSchema = baseSchema
378
+ .extend(visualSchema)
362
379
  .extend({
363
380
  onlyCategories: z.array(z.string().min(1)).optional(),
364
381
  onlyAudits: z.array(z.string().min(1)).optional(),
@@ -392,6 +409,7 @@ export const searchInputSchema = z
392
409
  .strict()
393
410
 
394
411
  export const functionInputSchema = baseSchema
412
+ .extend(visualSchema)
395
413
  .extend({
396
414
  code: z.string().min(1)
397
415
  })
@@ -8,6 +8,7 @@ export function fn (server) {
8
8
  [
9
9
  'Run a JavaScript function against any public URL inside Microlink’s server-side browser sandbox.',
10
10
  'Pass `code` as the function source (e.g. "async ({ page }) => page.title()"); it receives `{ page, response, ...args }` and its return value comes back in `value`.',
11
+ 'Combine with browser options such as `javascript`, `waitUntil`, `waitForSelector`, `click`, `scroll`, `headers`, and `proxy`.',
11
12
  'Also returns `isFulfilled`, `profiling`, and `logging`. Mirrors the `microlink.function(url, code)` library method.'
12
13
  ].join(' '),
13
14
  functionInputSchema,
package/src/tools/html.js CHANGED
@@ -8,6 +8,7 @@ export function html (server) {
8
8
  [
9
9
  'Extract the HTML content of any public URL via Microlink.',
10
10
  'Returns the page HTML as a string. Pass `selector` to scope it to part of the page.',
11
+ 'Combine with browser options such as `javascript`, `waitUntil`, `waitForSelector`, `headers`, and `proxy`.',
11
12
  'Mirrors the `microlink.html(url)` library method.'
12
13
  ].join(' '),
13
14
  htmlInputSchema,
@@ -8,6 +8,7 @@ export function markdown (server) {
8
8
  [
9
9
  'Convert any public URL to Markdown via Microlink.',
10
10
  'Returns the page content as a Markdown string. Pass `selector` to scope it to part of the page.',
11
+ 'Combine with browser options such as `javascript`, `waitUntil`, `waitForSelector`, `headers`, and `proxy`.',
11
12
  'Mirrors the `microlink.markdown(url)` library method.'
12
13
  ].join(' '),
13
14
  markdownInputSchema,
package/src/tools/text.js CHANGED
@@ -8,6 +8,7 @@ export function text (server) {
8
8
  [
9
9
  'Extract the plain text of any public URL via Microlink.',
10
10
  'Returns the readable page text as a string. Pass `selector` to scope it to part of the page.',
11
+ 'Combine with browser options such as `javascript`, `waitUntil`, `waitForSelector`, `headers`, and `proxy`.',
11
12
  'Mirrors the `microlink.text(url)` library method.'
12
13
  ].join(' '),
13
14
  textInputSchema,