@layerporter/image-optimizer-mcp 0.1.1 → 0.1.2
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 +72 -79
- package/package.json +2 -2
- package/server.json +3 -3
package/README.md
CHANGED
|
@@ -1,123 +1,116 @@
|
|
|
1
1
|
# LayerPorter Website Image Optimizer MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Public MCP server for website image analysis and safe image optimization.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npx -y @layerporter/image-optimizer-mcp@latest
|
|
9
|
+
```
|
|
10
10
|
|
|
11
11
|
- npm package: `@layerporter/image-optimizer-mcp`
|
|
12
12
|
- MCP server: `com.layerporter/website-image-optimizer`
|
|
13
13
|
- transport: `stdio`
|
|
14
14
|
- Node.js: `>=22.12.0`
|
|
15
|
+
- repository: `https://github.com/OlegStrateg/lp-site`
|
|
16
|
+
- product page: `https://layerporter.com/mcp/website-image-optimizer/`
|
|
15
17
|
|
|
16
|
-
The npm package
|
|
18
|
+
The npm package is publicly available. Official MCP Registry publication is a separate distribution step and is not implied by npm publication.
|
|
17
19
|
|
|
18
|
-
##
|
|
20
|
+
## What it does
|
|
19
21
|
|
|
20
|
-
The
|
|
22
|
+
The server registers seven bounded tools:
|
|
21
23
|
|
|
22
|
-
- `analyze_page_images`
|
|
23
|
-
- `optimize_image`
|
|
24
|
-
- `generate_responsive_variants`
|
|
25
|
-
- `compare_image_versions`
|
|
26
|
-
- `optimize_page_images`
|
|
27
|
-
- `analyze_url_images`
|
|
28
|
-
- `optimize_url_images`
|
|
24
|
+
- `analyze_page_images` — analyze caller-provided page/image facts;
|
|
25
|
+
- `optimize_image` — optimize one image;
|
|
26
|
+
- `generate_responsive_variants` — generate resized image variants without upscaling;
|
|
27
|
+
- `compare_image_versions` — compare image versions;
|
|
28
|
+
- `optimize_page_images` — optimize a bounded set of page images;
|
|
29
|
+
- `analyze_url_images` — inspect images referenced by static HTML at a public URL;
|
|
30
|
+
- `optimize_url_images` — fetch and optimize a bounded set of raster images referenced by static HTML.
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
Accepted optimized binaries are returned through temporary MCP `resource_link` values and read separately with `resources/read`.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
## Input and output boundary
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
Untrusted image input is fail-closed:
|
|
35
37
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- image processing through the shared image core / Sharp / libvips
|
|
38
|
+
- accepted input decoders: JPEG, PNG, WebP;
|
|
39
|
+
- blocked input decoders: HEIF/AVIF, TIFF, GIF, SVG, and unknown formats;
|
|
40
|
+
- AVIF remains available as an output format.
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
The optimizer applies bounded transformations and does not upscale images.
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
## URL mode limitations
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
cd packages/image-core
|
|
47
|
-
npm install --no-audit --no-fund
|
|
48
|
-
npm test
|
|
49
|
-
|
|
50
|
-
cd ../image-optimizer-mcp
|
|
51
|
-
npm install --ignore-scripts --no-audit --no-fund
|
|
52
|
-
npm run release:preflight
|
|
53
|
-
npm run sync:core
|
|
54
|
-
npm test
|
|
55
|
-
node src/server.js
|
|
56
|
-
```
|
|
46
|
+
URL mode is intentionally a fast static-HTML path. It does **not** claim to provide a browser-rendered audit.
|
|
57
47
|
|
|
58
|
-
|
|
48
|
+
It does not discover or measure:
|
|
59
49
|
|
|
60
|
-
|
|
50
|
+
- browser-selected `currentSrc`;
|
|
51
|
+
- real LCP;
|
|
52
|
+
- CSS background images;
|
|
53
|
+
- JavaScript-injected or lazy-loaded content that is absent from the fetched HTML;
|
|
54
|
+
- production page write/apply behavior.
|
|
61
55
|
|
|
62
|
-
|
|
63
|
-
npx -y @layerporter/image-optimizer-mcp
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## License
|
|
56
|
+
Use it for bounded static discovery and optimization, not as a replacement for a browser runtime or Core Web Vitals measurement.
|
|
67
57
|
|
|
68
|
-
|
|
58
|
+
## Safety
|
|
69
59
|
|
|
70
|
-
The
|
|
60
|
+
The package:
|
|
71
61
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
- performs public HTTP(S) reads only through the two URL tools;
|
|
63
|
+
- blocks unsafe URL schemes, credentials, localhost/private/link-local/reserved destinations, unsafe DNS answers, and redirects to prohibited addresses;
|
|
64
|
+
- caps page bytes, image bytes, total accepted bytes, redirects, image count, timeouts, and concurrency;
|
|
65
|
+
- writes accepted output only to an isolated temporary artifact store;
|
|
66
|
+
- does not execute shell commands;
|
|
67
|
+
- does not perform arbitrary filesystem writes;
|
|
68
|
+
- does not modify a website or production environment.
|
|
79
69
|
|
|
80
|
-
The
|
|
70
|
+
Temporary artifacts are process-local and ephemeral. The default TTL is 30 minutes; cleanup is performed during store operations/disposal rather than at an exact wall-clock instant.
|
|
81
71
|
|
|
82
|
-
|
|
72
|
+
## Quick usage examples
|
|
83
73
|
|
|
84
|
-
|
|
85
|
-
- blocks unsafe URL schemes, URL credentials, localhost/private/link-local/reserved targets, unsafe DNS answers and redirects to prohibited addresses;
|
|
86
|
-
- caps page bytes, per-image bytes, accepted total image bytes, redirects, image count, timeouts and concurrency;
|
|
87
|
-
- writes accepted image artifacts only to its isolated temporary artifact store;
|
|
88
|
-
- does not perform arbitrary filesystem write/delete/rename operations;
|
|
89
|
-
- does not execute shell commands;
|
|
90
|
-
- does not write to a website or production environment.
|
|
74
|
+
After connecting the MCP server to a compatible client, requests can be framed around the task:
|
|
91
75
|
|
|
92
|
-
|
|
76
|
+
- “Analyze the images referenced by this page URL.”
|
|
77
|
+
- “Optimize this JPEG for web delivery without upscaling.”
|
|
78
|
+
- “Generate responsive variants for this image.”
|
|
79
|
+
- “Compare these two image versions and report the byte difference.”
|
|
93
80
|
|
|
94
|
-
|
|
81
|
+
Client-specific MCP configuration differs by product, so use the MCP client’s current documentation for its exact server configuration format.
|
|
95
82
|
|
|
96
83
|
## Verification
|
|
97
84
|
|
|
98
|
-
|
|
85
|
+
The release process verifies:
|
|
99
86
|
|
|
100
|
-
- package/server identity consistency;
|
|
101
|
-
- proprietary license metadata and packaged `LICENSE` presence;
|
|
87
|
+
- package/server identity and version consistency;
|
|
102
88
|
- image-core and MCP tests;
|
|
103
89
|
- packed npm artifact metadata;
|
|
104
90
|
- clean installation of the packed tarball;
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
91
|
+
- stdio startup and MCP client handshake;
|
|
92
|
+
- exactly seven expected tools;
|
|
93
|
+
- real tool calls;
|
|
94
|
+
- temporary `resource_link` and `resources/read`;
|
|
95
|
+
- public-package source equivalence after publication.
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
This package is proprietary LayerPorter software. The official unmodified package may be downloaded, installed, and used under the terms in `LICENSE`.
|
|
109
100
|
|
|
110
|
-
|
|
101
|
+
Copying beyond technically necessary installation/runtime copies, modification, derivative works, repackaging, redistribution, sublicensing, resale, and unauthorized hosting are prohibited. Third-party dependencies remain governed by their own licenses.
|
|
111
102
|
|
|
112
|
-
|
|
103
|
+
## Links
|
|
113
104
|
|
|
114
|
-
- `https://layerporter.com/mcp/website-image-optimizer/`
|
|
115
|
-
- `https://layerporter.com/docs/mcp/website-image-optimizer/`
|
|
105
|
+
- Product: `https://layerporter.com/mcp/website-image-optimizer/`
|
|
106
|
+
- Documentation: `https://layerporter.com/docs/mcp/website-image-optimizer/`
|
|
107
|
+
- Repository: `https://github.com/OlegStrateg/lp-site`
|
|
108
|
+
- Issues: `https://github.com/OlegStrateg/lp-site/issues`
|
|
116
109
|
|
|
117
|
-
## Not
|
|
110
|
+
## Not included
|
|
118
111
|
|
|
119
|
-
-
|
|
120
|
-
- hosted endpoint;
|
|
112
|
+
- Official MCP Registry publication;
|
|
113
|
+
- hosted remote endpoint;
|
|
121
114
|
- full browser crawler/runtime metrics collection;
|
|
122
|
-
- production apply/write
|
|
123
|
-
- universal performance or
|
|
115
|
+
- production apply/write tools;
|
|
116
|
+
- universal performance, quality, or Core Web Vitals guarantees.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerporter/image-optimizer-mcp",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "MCP server for website image analysis, safe compression, resizing, responsive variants, and WebP/AVIF output.",
|
|
5
5
|
"mcpName": "com.layerporter/website-image-optimizer",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
package/server.json
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "com.layerporter/website-image-optimizer",
|
|
4
4
|
"title": "LayerPorter Website Image Optimizer",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Website image analysis and safe optimization for compression, resizing, and responsive variants.",
|
|
6
6
|
"websiteUrl": "https://layerporter.com/mcp/website-image-optimizer/",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/OlegStrateg/lp-site",
|
|
9
9
|
"source": "github",
|
|
10
10
|
"subfolder": "packages/image-optimizer-mcp"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.1.
|
|
12
|
+
"version": "0.1.2",
|
|
13
13
|
"packages": [
|
|
14
14
|
{
|
|
15
15
|
"registryType": "npm",
|
|
16
16
|
"identifier": "@layerporter/image-optimizer-mcp",
|
|
17
|
-
"version": "0.1.
|
|
17
|
+
"version": "0.1.2",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
}
|