@microlink/mcp 1.0.1 → 1.1.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/README.md +128 -56
- package/package.json +14 -48
- package/scripts/postinstall.js +10 -3
- package/src/index.js +4 -1
- package/src/microlink-client.js +32 -219
- package/src/schemas.js +151 -24
- package/src/tools/audio.js +5 -5
- package/src/tools/audios.js +16 -0
- package/src/tools/emails.js +16 -0
- package/src/tools/embed.js +17 -0
- package/src/tools/extract.js +6 -8
- package/src/tools/function.js +16 -0
- package/src/tools/html.js +16 -0
- package/src/tools/images.js +16 -0
- package/src/tools/index.js +29 -9
- package/src/tools/lighthouse.js +16 -0
- package/src/tools/links.js +16 -0
- package/src/tools/logo.js +17 -0
- package/src/tools/markdown.js +4 -4
- package/src/tools/metadata.js +17 -0
- package/src/tools/pdf.js +6 -11
- package/src/tools/register.js +41 -51
- package/src/tools/screenshot.js +8 -11
- package/src/tools/search.js +17 -0
- package/src/tools/technologies.js +16 -0
- package/src/tools/text.js +5 -5
- package/src/tools/video.js +6 -6
- package/src/tools/videos.js +16 -0
- package/src/tools/insights.js +0 -21
- package/src/tools/meta.js +0 -17
- package/src/tools/palette.js +0 -17
package/README.md
CHANGED
|
@@ -118,10 +118,10 @@ Once the server is configured, talk to your assistant in plain language. It pick
|
|
|
118
118
|
|
|
119
119
|
- *"Take a full-page screenshot of https://example.com in dark mode."* → `microlink_screenshot`
|
|
120
120
|
- *"Generate a Letter-size PDF of https://example.com."* → `microlink_pdf`
|
|
121
|
-
- *"Get the title, description, and image for https://example.com."* → `
|
|
121
|
+
- *"Get the title, description, and image for https://example.com."* → `microlink_metadata`
|
|
122
122
|
- *"Convert https://news.ycombinator.com to Markdown."* → `microlink_markdown`
|
|
123
123
|
- *"Find the playable video in this YouTube link."* → `microlink_video`
|
|
124
|
-
- *"Run a Lighthouse performance audit on https://example.com."* → `
|
|
124
|
+
- *"Run a Lighthouse performance audit on https://example.com."* → `microlink_lighthouse`
|
|
125
125
|
- *"Scrape every article title from this page using the `.title` selector."* → `microlink_extract` with `data`
|
|
126
126
|
|
|
127
127
|
Tools can also be invoked directly. Every tool takes a `url` and returns `structuredContent` (see [Response shape](#response-shape)):
|
|
@@ -141,25 +141,27 @@ Tools can also be invoked directly. Every tool takes a `url` and returns `struct
|
|
|
141
141
|
|
|
142
142
|
### Capabilities at a glance
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
Each tool is a thin wrapper over a [`microlink.io`](https://github.com/microlinkhq/microlink/tree/master/packages/core) library method — same inputs, same result, one source of truth.
|
|
145
|
+
|
|
146
|
+
- `microlink_metadata`: normalized metadata extraction with include/exclude config.
|
|
147
|
+
- `microlink_logo`: brand logo extraction.
|
|
148
|
+
- `microlink_markdown` / `microlink_html` / `microlink_text`: URL to Markdown / HTML / plain text.
|
|
149
|
+
- `microlink_screenshot`: screenshot generation with element/full-page/animated modes and browser controls.
|
|
146
150
|
- `microlink_pdf`: PDF generation with page/layout controls.
|
|
147
|
-
- `
|
|
148
|
-
- `microlink_audio`: playable audio source
|
|
149
|
-
- `
|
|
150
|
-
- `
|
|
151
|
-
- `
|
|
152
|
-
- `
|
|
153
|
-
- `
|
|
151
|
+
- `microlink_embed`: oEmbed-style embeddable iframe (`{ html, scripts }`).
|
|
152
|
+
- `microlink_video` / `microlink_audio`: primary playable video / audio source.
|
|
153
|
+
- `microlink_links` / `microlink_images` / `microlink_videos` / `microlink_audios` / `microlink_emails`: collect every link / image / video / audio / email on the page.
|
|
154
|
+
- `microlink_technologies`: technology-stack detection (Wappalyzer).
|
|
155
|
+
- `microlink_lighthouse`: Google Lighthouse audit.
|
|
156
|
+
- `microlink_search`: Google as structured data (requires an API key).
|
|
157
|
+
- `microlink_function`: run a JavaScript function in Microlink's server-side browser sandbox.
|
|
158
|
+
- `microlink_extract`: custom scraping rules (`data`) + multi-capability composition in one call.
|
|
154
159
|
- Cross-cutting request capabilities: device/viewport emulation, click/scroll actions, JS/CSS injection, modules, wait conditions, cache controls (`ttl`, `staleTtl`, `force`), retries/timeouts, media mode, headers/proxy, and endpoint/auth routing.
|
|
155
160
|
|
|
156
161
|
### Response shape
|
|
157
162
|
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
- `microlink` preserves Microlink API JSend payload (`status`, `data`, and error fields like `code`, `id`, `message`, `more`, `report`).
|
|
161
|
-
- `responseHeaders` includes key cache/rate headers (such as `x-cache-status`, `cf-cache-status`, `cache-control`, `x-rate-limit-*`) when present.
|
|
162
|
-
- MCP `isError` is set when transport fails or when `microlink.status !== "success"`.
|
|
163
|
+
- Each tool returns the library's **direct result** under `structuredContent.data` (and the same value as pretty-printed JSON text). For example `microlink_markdown` → `{ data: "# Title\n..." }`, `microlink_screenshot` → `{ data: { url, type, width, height, size } }`, `microlink_links` → `{ data: ["https://...", ...] }`.
|
|
164
|
+
- On failure the tool sets MCP `isError` and returns `{ error: { message, code?, status?, statusCode?, url?, more? } }`. A `429` also includes a free-quota `hint`.
|
|
163
165
|
|
|
164
166
|
Parameters labeled `PRO` in the official Microlink docs require a paid plan.
|
|
165
167
|
For compatibility with some MCP clients:
|
|
@@ -221,7 +223,7 @@ For `screenshot`, `pdf`, and `insights`, use `true` for defaults or an object fo
|
|
|
221
223
|
|
|
222
224
|
### `microlink_screenshot`
|
|
223
225
|
|
|
224
|
-
Capture a screenshot of any public URL and
|
|
226
|
+
Capture a screenshot of any public URL and return the screenshot asset object (`url`, `type`, `width`, `height`, `size`).
|
|
225
227
|
Set `screenshot` to `true` for defaults, or pass `screenshot: { ... }` for options. `screenshot: {}` is treated as `true`.
|
|
226
228
|
|
|
227
229
|
**Key parameters:**
|
|
@@ -266,7 +268,7 @@ Set `screenshot` to `true` for defaults, or pass `screenshot: { ... }` for optio
|
|
|
266
268
|
|
|
267
269
|
### `microlink_pdf`
|
|
268
270
|
|
|
269
|
-
Generate a PDF of any public URL and
|
|
271
|
+
Generate a PDF of any public URL and return the PDF asset object (`url`, `type`, `size`).
|
|
270
272
|
Set `pdf` to `true` for defaults, or pass `pdf: { ... }` for options. `pdf: {}` is treated as `true`.
|
|
271
273
|
|
|
272
274
|
**Key parameters:**
|
|
@@ -308,7 +310,7 @@ Set `pdf` to `true` for defaults, or pass `pdf: { ... }` for options. `pdf: {}`
|
|
|
308
310
|
|
|
309
311
|
### `microlink_video`
|
|
310
312
|
|
|
311
|
-
Detect and extract a playable video source from any URL. Returns the video
|
|
313
|
+
Detect and extract a playable video source from any URL. Returns the video asset object: `url`, `type`, `duration`, `size`, `width`, `height`, `duration_pretty`, and `size_pretty`.
|
|
312
314
|
|
|
313
315
|
Supports YouTube, Vimeo, Twitter/X, TikTok, Instagram, Dailymotion, and hundreds of other platforms.
|
|
314
316
|
|
|
@@ -324,7 +326,7 @@ Supports YouTube, Vimeo, Twitter/X, TikTok, Instagram, Dailymotion, and hundreds
|
|
|
324
326
|
|
|
325
327
|
### `microlink_audio`
|
|
326
328
|
|
|
327
|
-
Detect and extract a playable audio source from any URL. Returns the audio
|
|
329
|
+
Detect and extract a playable audio source from any URL. Returns the audio asset object: `url`, `type`, `duration`, `size`, `duration_pretty`, and `size_pretty`.
|
|
328
330
|
|
|
329
331
|
Supports SoundCloud, Spotify, Mixcloud, and other audio platforms.
|
|
330
332
|
|
|
@@ -338,29 +340,42 @@ Supports SoundCloud, Spotify, Mixcloud, and other audio platforms.
|
|
|
338
340
|
|
|
339
341
|
---
|
|
340
342
|
|
|
341
|
-
### `
|
|
343
|
+
### `microlink_technologies`
|
|
344
|
+
|
|
345
|
+
Detect the technology stack behind any URL (frameworks, CDNs, analytics, e-commerce, ...) via Wappalyzer. Returns the array of detected technologies.
|
|
342
346
|
|
|
343
|
-
|
|
344
|
-
Set `insights` to `true` for defaults, or pass `insights: { ... }` for options. `insights: {}` is treated as `true`.
|
|
347
|
+
Mirrors the `microlink.technologies(url)` library method.
|
|
345
348
|
|
|
346
349
|
**Key parameters:**
|
|
347
350
|
|
|
348
351
|
| Parameter | Type | Description |
|
|
349
352
|
|-----------|------|-------------|
|
|
350
353
|
| `url` | `string` | The URL to analyze *(required)* |
|
|
351
|
-
| `
|
|
352
|
-
| `insights.lighthouse` | `boolean \| object` | Run a Lighthouse audit |
|
|
353
|
-
| `insights.lighthouse.output` | `"json" \| "html" \| "csv"` | Report format (default: `"json"`) |
|
|
354
|
-
| `insights.lighthouse.preset` | `string` | Audit preset: `"default"`, `"desktop"`, `"perf"`, `"experimental"`, `"full"`, `"lr-desktop"`, `"lr-mobile"` |
|
|
355
|
-
| `insights.lighthouse.onlyCategories` | `string \| string[]` | Lighthouse category IDs (e.g. `["performance", "accessibility"]`) |
|
|
356
|
-
| `insights.technologies` | `boolean` | Detect tech stack via Wappalyzer |
|
|
354
|
+
| `apiKey` | `string` | Microlink API key *(optional)* |
|
|
357
355
|
|
|
358
356
|
---
|
|
359
357
|
|
|
360
|
-
### `
|
|
358
|
+
### `microlink_lighthouse`
|
|
359
|
+
|
|
360
|
+
Run a Google Lighthouse audit (performance, accessibility, best-practices, SEO) for any URL. Returns the Lighthouse report.
|
|
361
|
+
|
|
362
|
+
Mirrors the `microlink.lighthouse(url)` library method.
|
|
363
|
+
|
|
364
|
+
**Key parameters:**
|
|
365
|
+
|
|
366
|
+
| Parameter | Type | Description |
|
|
367
|
+
|-----------|------|-------------|
|
|
368
|
+
| `url` | `string` | The URL to analyze *(required)* |
|
|
369
|
+
| `apiKey` | `string` | Microlink API key *(optional)* |
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
### `microlink_metadata`
|
|
361
374
|
|
|
362
375
|
Extract normalized metadata from any public URL. Returns: `title`, `description`, `lang`, `author`, `publisher`, `date`, `url`, `image` (with dimensions and file info), and `logo` (publisher favicon).
|
|
363
376
|
|
|
377
|
+
Mirrors the `microlink.metadata(url)` library method.
|
|
378
|
+
|
|
364
379
|
**Key parameters:**
|
|
365
380
|
|
|
366
381
|
| Parameter | Type | Description |
|
|
@@ -370,25 +385,39 @@ Extract normalized metadata from any public URL. Returns: `title`, `description`
|
|
|
370
385
|
|
|
371
386
|
---
|
|
372
387
|
|
|
373
|
-
### `
|
|
388
|
+
### `microlink_logo`
|
|
374
389
|
|
|
375
|
-
Extract
|
|
390
|
+
Extract the brand logo of any public URL. Returns the logo asset in `data.logo`: `url`, `type`, `width`, `height`, `size`, and `size_pretty`.
|
|
376
391
|
|
|
377
|
-
|
|
392
|
+
Mirrors the `microlink.logo(url, { square })` library method. Useful for building link previews, favicons, or brand cards.
|
|
378
393
|
|
|
379
394
|
**Key parameters:**
|
|
380
395
|
|
|
381
396
|
| Parameter | Type | Description |
|
|
382
397
|
|-----------|------|-------------|
|
|
383
398
|
| `url` | `string` | The URL to analyze *(required)* |
|
|
384
|
-
| `
|
|
385
|
-
| `palette` | `boolean` | Enable palette extraction (default: `true`) |
|
|
399
|
+
| `square` | `boolean` | Prefer a square (icon-shaped) logo variant |
|
|
386
400
|
|
|
387
401
|
---
|
|
388
402
|
|
|
389
403
|
### `microlink_markdown`
|
|
390
404
|
|
|
391
|
-
Convert any public URL to Markdown. Returns
|
|
405
|
+
Convert any public URL to Markdown. Returns the page content as a Markdown string, useful for extracting readable content from web pages, articles, and documentation.
|
|
406
|
+
|
|
407
|
+
**Key parameters:**
|
|
408
|
+
|
|
409
|
+
| Parameter | Type | Description |
|
|
410
|
+
|-----------|------|-------------|
|
|
411
|
+
| `url` | `string` | The URL to convert *(required)* |
|
|
412
|
+
| `apiKey` | `string` | Microlink API key *(optional)* |
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
### `microlink_html`
|
|
417
|
+
|
|
418
|
+
Extract the HTML content of any public URL. Returns the page HTML as a string.
|
|
419
|
+
|
|
420
|
+
Mirrors the `microlink.html(url)` library method.
|
|
392
421
|
|
|
393
422
|
**Key parameters:**
|
|
394
423
|
|
|
@@ -401,7 +430,7 @@ Convert any public URL to Markdown. Returns JSON output with Markdown content in
|
|
|
401
430
|
|
|
402
431
|
### `microlink_text`
|
|
403
432
|
|
|
404
|
-
Extract plain text from any public URL. Returns
|
|
433
|
+
Extract plain text from any public URL. Returns the readable page text as a string.
|
|
405
434
|
|
|
406
435
|
**Key parameters:**
|
|
407
436
|
|
|
@@ -412,25 +441,68 @@ Extract plain text from any public URL. Returns JSON output with plain text cont
|
|
|
412
441
|
|
|
413
442
|
---
|
|
414
443
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
|
424
|
-
|
|
425
|
-
|
|
|
426
|
-
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
444
|
+
### `microlink_embed`
|
|
445
|
+
|
|
446
|
+
Get the oEmbed-style embeddable iframe for any URL (YouTube, Tweet, CodePen, ...). Returns `{ html, scripts }` — the markup plus the script URLs it needs.
|
|
447
|
+
|
|
448
|
+
Mirrors the `microlink.embed(url)` library method.
|
|
449
|
+
|
|
450
|
+
**Key parameters:**
|
|
451
|
+
|
|
452
|
+
| Parameter | Type | Description |
|
|
453
|
+
|-----------|------|-------------|
|
|
454
|
+
| `url` | `string` | The URL to embed *(required)* |
|
|
455
|
+
| `apiKey` | `string` | Microlink API key *(optional)* |
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
### `microlink_links` / `microlink_images` / `microlink_videos` / `microlink_audios` / `microlink_emails`
|
|
460
|
+
|
|
461
|
+
Collect every link, image, video source, audio source, or email address on a page. Each returns a clean, absolute, deduped array under `data.links` / `data.images` / `data.videos` / `data.audios` / `data.emails`.
|
|
462
|
+
|
|
463
|
+
Mirror the `microlink.links(url)` / `.images(url)` / `.videos(url)` / `.audios(url)` / `.emails(url)` library methods. For the single primary playable media, use `microlink_video` / `microlink_audio`.
|
|
464
|
+
|
|
465
|
+
**Key parameters:**
|
|
466
|
+
|
|
467
|
+
| Parameter | Type | Description |
|
|
468
|
+
|-----------|------|-------------|
|
|
469
|
+
| `url` | `string` | The URL to scan *(required)* |
|
|
470
|
+
| `apiKey` | `string` | Microlink API key *(optional)* |
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
### `microlink_search`
|
|
475
|
+
|
|
476
|
+
Search Google and get structured results (requires an API key). Returns `results` (title, url, description) plus `knowledgeGraph`, `peopleAlsoAsk`, and `relatedSearches` when Google surfaces them.
|
|
477
|
+
|
|
478
|
+
Mirrors the `microlink.search(query)` library method. Google search operators (`site:`, `filetype:`, quotes, ...) work as-is.
|
|
479
|
+
|
|
480
|
+
**Key parameters:**
|
|
481
|
+
|
|
482
|
+
| Parameter | Type | Description |
|
|
483
|
+
|-----------|------|-------------|
|
|
484
|
+
| `query` | `string` | The search query *(required)* |
|
|
485
|
+
| `apiKey` | `string` | Microlink API key *(required for this tool)* |
|
|
486
|
+
| `type` | `string` | Vertical: `search` (default), `news`, `images`, `videos`, `places`, `maps`, `shopping`, `scholar`, `patents`, `autocomplete` |
|
|
487
|
+
| `limit` | `number` | Max results |
|
|
488
|
+
| `location` | `string` | Two-letter country code (e.g. `es`) |
|
|
489
|
+
| `period` | `string` | Recency filter: `hour`, `day`, `week`, `month`, `year` |
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
### `microlink_function`
|
|
494
|
+
|
|
495
|
+
Run a JavaScript function against any public URL inside Microlink's server-side browser sandbox. The function receives `{ page, response, ...args }` and its return value comes back in `value` (plus `isFulfilled`, `profiling`, `logging`).
|
|
496
|
+
|
|
497
|
+
Mirrors the `microlink.function(url, code)` library method.
|
|
498
|
+
|
|
499
|
+
**Key parameters:**
|
|
500
|
+
|
|
501
|
+
| Parameter | Type | Description |
|
|
502
|
+
|-----------|------|-------------|
|
|
503
|
+
| `url` | `string` | The URL to run against *(required)* |
|
|
504
|
+
| `code` | `string` | Function source, e.g. `"async ({ page }) => page.title()"` *(required)* |
|
|
505
|
+
| `apiKey` | `string` | Microlink API key *(optional)* |
|
|
434
506
|
|
|
435
507
|
---
|
|
436
508
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microlink/mcp",
|
|
3
3
|
"description": "MCP server for Microlink API",
|
|
4
|
-
"homepage": "https://github.com/microlinkhq/
|
|
5
|
-
"version": "1.0
|
|
4
|
+
"homepage": "https://github.com/microlinkhq/microlink",
|
|
5
|
+
"version": "1.1.0",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.js"
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"bin": {
|
|
11
11
|
"microlink-mcp": "./bin/microlink-mcp.js"
|
|
12
12
|
},
|
|
13
|
+
"author": {
|
|
14
|
+
"email": "hello@microlink.io",
|
|
15
|
+
"name": "microlink.io",
|
|
16
|
+
"url": "https://microlink.io"
|
|
17
|
+
},
|
|
13
18
|
"contributors": [
|
|
14
19
|
{
|
|
15
20
|
"name": "Joseba",
|
|
@@ -21,11 +26,12 @@
|
|
|
21
26
|
}
|
|
22
27
|
],
|
|
23
28
|
"repository": {
|
|
29
|
+
"directory": "packages/mcp",
|
|
24
30
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/microlinkhq/
|
|
31
|
+
"url": "git+https://github.com/microlinkhq/microlink.git"
|
|
26
32
|
},
|
|
27
33
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/microlinkhq/
|
|
34
|
+
"url": "https://github.com/microlinkhq/microlink/issues"
|
|
29
35
|
},
|
|
30
36
|
"keywords": [
|
|
31
37
|
"api",
|
|
@@ -37,25 +43,11 @@
|
|
|
37
43
|
"server"
|
|
38
44
|
],
|
|
39
45
|
"dependencies": {
|
|
40
|
-
"@microlink/mql": "
|
|
46
|
+
"@microlink/mql": "0.17.0",
|
|
41
47
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
48
|
+
"microlink.io": "0.0.1",
|
|
42
49
|
"zod": "~4.4.3"
|
|
43
50
|
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@commitlint/cli": "latest",
|
|
46
|
-
"@commitlint/config-conventional": "latest",
|
|
47
|
-
"ava": "latest",
|
|
48
|
-
"c8": "latest",
|
|
49
|
-
"ci-publish": "latest",
|
|
50
|
-
"conventional-changelog-cli": "latest",
|
|
51
|
-
"finepack": "latest",
|
|
52
|
-
"git-authors-cli": "latest",
|
|
53
|
-
"github-generate-release": "latest",
|
|
54
|
-
"nano-staged": "latest",
|
|
55
|
-
"simple-git-hooks": "latest",
|
|
56
|
-
"standard": "latest",
|
|
57
|
-
"standard-version": "latest"
|
|
58
|
-
},
|
|
59
51
|
"engines": {
|
|
60
52
|
"node": ">=20"
|
|
61
53
|
},
|
|
@@ -65,40 +57,14 @@
|
|
|
65
57
|
"src"
|
|
66
58
|
],
|
|
67
59
|
"scripts": {
|
|
68
|
-
"contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
|
|
69
60
|
"postinstall": "node scripts/postinstall.js",
|
|
70
|
-
"postrelease": "pnpm release:tags && pnpm release:github && (ci-publish || pnpm publish --access=public)",
|
|
71
|
-
"release": "pnpm release:version && pnpm release:changelog && pnpm release:commit && pnpm release:tag",
|
|
72
|
-
"release:changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s",
|
|
73
|
-
"release:commit": "git add package.json CHANGELOG.md && git commit -m \"chore(release): $(node -p \"require('./package.json').version\")\"",
|
|
74
|
-
"release:github": "github-generate-release",
|
|
75
|
-
"release:tag": "git tag -a v$(node -p \"require('./package.json').version\") -m \"v$(node -p \"require('./package.json').version\")\"",
|
|
76
|
-
"release:tags": "git push origin HEAD:master --follow-tags",
|
|
77
|
-
"release:version": "standard-version --skip.changelog --skip.commit --skip.tag",
|
|
78
61
|
"start": "node src/index.js",
|
|
79
62
|
"test": "node --test test/*.test.js"
|
|
80
63
|
},
|
|
81
64
|
"license": "MIT",
|
|
82
|
-
"commitlint": {
|
|
83
|
-
"extends": [
|
|
84
|
-
"@commitlint/config-conventional"
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
"nano-staged": {
|
|
88
|
-
"*.js": [
|
|
89
|
-
"npx @kikobeats/prettier-standard",
|
|
90
|
-
"standard --fix"
|
|
91
|
-
],
|
|
92
|
-
"package.json": [
|
|
93
|
-
"finepack"
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
65
|
"publishConfig": {
|
|
97
66
|
"access": "public"
|
|
98
67
|
},
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
"pre-commit": "npx nano-staged"
|
|
102
|
-
},
|
|
103
|
-
"type": "module"
|
|
68
|
+
"type": "module",
|
|
69
|
+
"gitHead": "b28aa7d6434ac1bb43b084d7e329efec97dab36a"
|
|
104
70
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const WIDTH = 74
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line no-control-regex
|
|
3
4
|
const ANSI_PATTERN = /\u001b\[[0-9;]*m/g
|
|
4
5
|
const hasColor = process.stdout.isTTY && process.env.NO_COLOR === undefined
|
|
5
6
|
|
|
@@ -39,10 +40,16 @@ const lines = [
|
|
|
39
40
|
borderLine(),
|
|
40
41
|
contentLine(`${colors.bold}MICROLINK MCP${colors.reset}`),
|
|
41
42
|
contentLine(),
|
|
42
|
-
contentLine(
|
|
43
|
+
contentLine(
|
|
44
|
+
`${colors.bold}Free plan:${colors.reset} 50 requests/day included.`
|
|
45
|
+
),
|
|
43
46
|
contentLine(`${colors.yellow}Need more or unlimited usage?${colors.reset}`),
|
|
44
|
-
contentLine(
|
|
45
|
-
|
|
47
|
+
contentLine(
|
|
48
|
+
`Get an API key at ${colors.green}https://microlink.io/#pricing${colors.reset}`
|
|
49
|
+
),
|
|
50
|
+
contentLine(
|
|
51
|
+
`${colors.gray}Tip:${colors.reset} set MICROLINK_API_KEY in your MCP server env.`
|
|
52
|
+
),
|
|
46
53
|
borderLine()
|
|
47
54
|
]
|
|
48
55
|
|
package/src/index.js
CHANGED
|
@@ -8,7 +8,10 @@ import { tools } from './tools/index.js'
|
|
|
8
8
|
const require = createRequire(import.meta.url)
|
|
9
9
|
const { version: pkgVersion } = require('../package.json')
|
|
10
10
|
|
|
11
|
-
export function createMicrolinkServer ({
|
|
11
|
+
export function createMicrolinkServer ({
|
|
12
|
+
name = 'microlink-mcp-server',
|
|
13
|
+
version = pkgVersion
|
|
14
|
+
} = {}) {
|
|
12
15
|
const server = new McpServer({
|
|
13
16
|
name,
|
|
14
17
|
version
|