@topazlabs/mcp 0.1.11 → 0.1.13
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 +78 -52
- package/dist/lib/path-security.d.ts +2 -8
- package/dist/lib/path-security.d.ts.map +1 -1
- package/dist/lib/path-security.js +9 -88
- package/dist/lib/path-security.js.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
# @topazlabs/mcp
|
|
2
2
|
|
|
3
|
-
AI image enhancement
|
|
4
|
-
|
|
5
|
-
Built by [Topaz Labs](https://www.topazlabs.com) — the company behind industry-leading AI upscaling and enhancement tools.
|
|
3
|
+
**AI image enhancement for LLMs.** An [MCP server](https://modelcontextprotocol.io) that lets Claude and other MCP-compatible AI assistants enhance images using [Topaz Labs](https://www.topazlabs.com) AI.
|
|
6
4
|
|
|
7
5
|
## Quick Start
|
|
8
6
|
|
|
9
|
-
```bash
|
|
10
|
-
npx @topazlabs/mcp
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
No install required. The server starts on stdio and connects to any MCP client.
|
|
14
|
-
|
|
15
|
-
## Configuration
|
|
16
|
-
|
|
17
7
|
### Claude Desktop
|
|
18
8
|
|
|
19
|
-
Add to your
|
|
9
|
+
Add to your Claude Desktop config:
|
|
10
|
+
|
|
11
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
12
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
20
13
|
|
|
21
14
|
```json
|
|
22
15
|
{
|
|
23
16
|
"mcpServers": {
|
|
24
|
-
"
|
|
17
|
+
"Topaz Labs": {
|
|
25
18
|
"command": "npx",
|
|
26
19
|
"args": ["-y", "@topazlabs/mcp"],
|
|
27
20
|
"env": {
|
|
@@ -32,65 +25,98 @@ Add to your `claude_desktop_config.json`:
|
|
|
32
25
|
}
|
|
33
26
|
```
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
Get an API key at [topazlabs.com](https://www.topazlabs.com).
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
TOPAZ_API_KEY=<key> MCP_AUTH_TOKEN=<token> PORT=3001 npx @topazlabs/mcp --http
|
|
39
|
-
```
|
|
30
|
+
## Compatibility
|
|
40
31
|
|
|
41
|
-
|
|
32
|
+
This server uses **stdio transport**, which is supported by all major MCP desktop clients:
|
|
42
33
|
|
|
43
|
-
|
|
34
|
+
| Client | Status |
|
|
35
|
+
|--------|--------|
|
|
36
|
+
| Claude Desktop / Cowork | ✅ |
|
|
37
|
+
| Cursor | ✅ |
|
|
38
|
+
| Windsurf | ✅ |
|
|
39
|
+
| VS Code (Copilot) | ✅ |
|
|
40
|
+
| Cline | ✅ |
|
|
41
|
+
| Claude Code | ✅ |
|
|
42
|
+
| Zed | ✅ |
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
HTTP streaming transport (for ChatGPT, remote agents, web/mobile clients) is not yet supported but may be added in a future release.
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
## Tool
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|-----------|------|----------|-------------|
|
|
51
|
-
| `image` | string | ✅ | Local file path or URL |
|
|
52
|
-
| `size` | object | | Output size spec (see below) |
|
|
53
|
-
| `model` | string | | Model name (auto-selects if omitted) |
|
|
48
|
+
### `image-enhance`
|
|
54
49
|
|
|
55
|
-
|
|
50
|
+
Send an image, get back an enhanced version. Defaults to Standard V2 and auto-upscales to 2K.
|
|
56
51
|
|
|
57
|
-
```json
|
|
58
|
-
{ "width": 1920, "height": 1080 } // Exact dimensions
|
|
59
|
-
{ "width": 1920 } // Scale proportionally
|
|
60
|
-
{ "height": 1080 } // Scale proportionally
|
|
61
|
-
{ "scale": 2.5 } // Multiply original dimensions
|
|
62
52
|
```
|
|
53
|
+
image: "~/Photos/photo.jpg" # Local path or URL (required)
|
|
54
|
+
size: { scale: 2 } # Optional: exact dims, single dim, or scale factor
|
|
55
|
+
model: "Standard V2" # Optional: defaults to Standard V2
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Size options:** `{ width, height }` for exact, `{ width }` or `{ height }` for proportional, `{ scale }` for a multiplier. If omitted, images under 2K are auto-upscaled to 2K width.
|
|
63
59
|
|
|
64
|
-
|
|
60
|
+
**Models:**
|
|
65
61
|
|
|
66
|
-
|
|
62
|
+
| Model | Type | Best for |
|
|
63
|
+
|-------|------|----------|
|
|
64
|
+
| Standard V2 | standard | General photos (default) |
|
|
65
|
+
| Low Resolution V2 | standard | Tiny images, thumbnails |
|
|
66
|
+
| CGI | standard | Digital art, renders, illustrations |
|
|
67
|
+
| High Fidelity V2 | standard | High-quality sources needing upscale |
|
|
68
|
+
| Redefine | generative | Creative reinterpretation |
|
|
69
|
+
| Recover 3 | generative | Low-res images, old photos |
|
|
70
|
+
| Standard MAX | generative | Maximum quality, slower |
|
|
71
|
+
| Wonder 2 | generative | Nature photography, portraits, fine detail |
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
|-----------|--------------|
|
|
70
|
-
| Under 4K | Wonder |
|
|
71
|
-
| 4K+ | Standard V2 (with face enhancement) |
|
|
73
|
+
## Environment Variables
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
| Variable | Required | Description |
|
|
76
|
+
|----------|----------|-------------|
|
|
77
|
+
| `TOPAZ_API_KEY` | Yes | Topaz Labs API key |
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
## Architecture
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
```
|
|
82
|
+
packages/mcp/
|
|
83
|
+
src/
|
|
84
|
+
api/ — Topaz API client, types, model definitions
|
|
85
|
+
lib/ — Path security, URL fetching utilities
|
|
86
|
+
tools/ — enhance tool handler
|
|
87
|
+
server.ts — MCP server setup and tool registration
|
|
88
|
+
main.ts — Entry point (stdio transport)
|
|
89
|
+
test/ — Vitest test suite
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Development
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm install
|
|
96
|
+
npm run build
|
|
97
|
+
npm test
|
|
98
|
+
```
|
|
78
99
|
|
|
79
|
-
|
|
100
|
+
Use `npm run dev -w packages/mcp` to watch for changes during development.
|
|
80
101
|
|
|
81
|
-
|
|
82
|
-
|-----------|------|----------|-------------|
|
|
83
|
-
| `before` | string | ✅ | Path or URL to the "before" image |
|
|
84
|
-
| `after` | string | ✅ | Path or URL to the "after" image |
|
|
85
|
-
| `label_before` | string | | Label for before image (default: "Before") |
|
|
86
|
-
| `label_after` | string | | Label for after image (default: "After") |
|
|
102
|
+
## Publishing to npm
|
|
87
103
|
|
|
88
|
-
|
|
104
|
+
```bash
|
|
105
|
+
# 1. Build and test
|
|
106
|
+
npm run build && npm test
|
|
107
|
+
|
|
108
|
+
# 2. Publish
|
|
109
|
+
npm publish -w packages/mcp
|
|
110
|
+
```
|
|
89
111
|
|
|
90
|
-
|
|
112
|
+
To bump the version before publishing:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm version patch -w packages/mcp
|
|
116
|
+
```
|
|
91
117
|
|
|
92
|
-
|
|
118
|
+
> **Note:** `"access": "public"` is configured in `.npmrc` (required for scoped packages). Make sure you're logged in to an npm account that has access to the `@topazlabs` scope: `npm login`.
|
|
93
119
|
|
|
94
120
|
## License
|
|
95
121
|
|
|
96
|
-
MIT
|
|
122
|
+
MIT — [Topaz Labs](https://www.topazlabs.com)
|
|
@@ -4,14 +4,8 @@
|
|
|
4
4
|
* /sessions/<id>/mnt/<folder>/ which maps to ~/<folder>/ on the host.
|
|
5
5
|
*/
|
|
6
6
|
export declare function translateSandboxPath(inputPath: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Validate a file path for reading. Returns the resolved absolute path.
|
|
9
|
-
* Expands ~, translates sandbox paths, blocks sensitive directories.
|
|
10
|
-
*/
|
|
7
|
+
/** Validate a file path for reading. */
|
|
11
8
|
export declare function validateReadPath(inputPath: string): string;
|
|
12
|
-
/**
|
|
13
|
-
* Validate a file path for writing. Returns the resolved absolute path.
|
|
14
|
-
* Expands ~, translates sandbox paths, restricts to CWD + temp + TOPAZ_ALLOWED_DIRS.
|
|
15
|
-
*/
|
|
9
|
+
/** Validate a file path for writing. */
|
|
16
10
|
export declare function validateWritePath(inputPath: string): string;
|
|
17
11
|
//# sourceMappingURL=path-security.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-security.d.ts","sourceRoot":"","sources":["../../src/lib/path-security.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"path-security.d.ts","sourceRoot":"","sources":["../../src/lib/path-security.ts"],"names":[],"mappings":"AAsEA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM9D;AAuBD,wCAAwC;AACxC,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wCAAwC;AACxC,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Path security — validates file paths.
|
|
3
3
|
*
|
|
4
|
-
* -
|
|
5
|
-
* - Writes: CWD + temp + TOPAZ_ALLOWED_DIRS
|
|
6
|
-
* - Always blocks sensitive paths (/etc, ~/.ssh, etc.)
|
|
7
|
-
* - Blocks symlinks that escape allowed directories (writes only)
|
|
4
|
+
* - Blocks sensitive paths (/etc, ~/.ssh, ~/.aws, etc.)
|
|
8
5
|
* - Expands ~ to home directory
|
|
9
6
|
* - Translates Claude Cowork sandbox paths to real macOS paths
|
|
10
7
|
*/
|
|
@@ -41,14 +38,6 @@ function isSensitivePath(p) {
|
|
|
41
38
|
}
|
|
42
39
|
return false;
|
|
43
40
|
}
|
|
44
|
-
function resolveReal(p) {
|
|
45
|
-
try {
|
|
46
|
-
return fs.realpathSync(p);
|
|
47
|
-
}
|
|
48
|
-
catch {
|
|
49
|
-
return p;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
41
|
/**
|
|
53
42
|
* Resolve a path safely, handling the case where the file doesn't exist yet.
|
|
54
43
|
* For non-existent files, resolves the parent directory (which must exist)
|
|
@@ -69,63 +58,6 @@ function resolveRealSafe(p) {
|
|
|
69
58
|
}
|
|
70
59
|
}
|
|
71
60
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Walk every component of a path checking for symlinks that escape allowed dirs.
|
|
74
|
-
* Returns true if any symlink component resolves outside allowed directories.
|
|
75
|
-
*/
|
|
76
|
-
function hasSymlinkEscape(filePath) {
|
|
77
|
-
const allowed = getWriteAllowedDirs();
|
|
78
|
-
const parts = filePath.split(path.sep);
|
|
79
|
-
let current = parts[0] === "" ? path.sep : parts[0];
|
|
80
|
-
for (let i = 1; i < parts.length; i++) {
|
|
81
|
-
current = path.join(current, parts[i]);
|
|
82
|
-
try {
|
|
83
|
-
const stat = fs.lstatSync(current);
|
|
84
|
-
if (stat.isSymbolicLink()) {
|
|
85
|
-
const target = fs.realpathSync(current);
|
|
86
|
-
const isWithinAllowed = allowed.some((dir) => target === dir || target.startsWith(dir + path.sep));
|
|
87
|
-
const isAncestorOfAllowed = allowed.some((dir) => dir.startsWith(target + path.sep));
|
|
88
|
-
if (!isWithinAllowed && !isAncestorOfAllowed) {
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
/** Directories where writes are allowed: CWD + temp + TOPAZ_ALLOWED_DIRS */
|
|
100
|
-
function getWriteAllowedDirs() {
|
|
101
|
-
const cwd = path.resolve(process.cwd());
|
|
102
|
-
const cwdReal = resolveReal(cwd);
|
|
103
|
-
const tmpDir = path.resolve(os.tmpdir());
|
|
104
|
-
const tmpDirReal = resolveReal(tmpDir);
|
|
105
|
-
const dirs = [cwd, tmpDir];
|
|
106
|
-
if (cwdReal !== cwd)
|
|
107
|
-
dirs.push(cwdReal);
|
|
108
|
-
if (tmpDirReal !== tmpDir)
|
|
109
|
-
dirs.push(tmpDirReal);
|
|
110
|
-
const envDirs = process.env.TOPAZ_ALLOWED_DIRS;
|
|
111
|
-
if (envDirs) {
|
|
112
|
-
for (const d of envDirs.split(",")) {
|
|
113
|
-
const trimmed = d.trim();
|
|
114
|
-
if (trimmed) {
|
|
115
|
-
const resolved = path.resolve(trimmed);
|
|
116
|
-
dirs.push(resolved);
|
|
117
|
-
const real = resolveReal(resolved);
|
|
118
|
-
if (real !== resolved)
|
|
119
|
-
dirs.push(real);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return dirs;
|
|
124
|
-
}
|
|
125
|
-
function isWithinWriteAllowedDirs(realPath) {
|
|
126
|
-
const allowed = getWriteAllowedDirs();
|
|
127
|
-
return allowed.some((dir) => realPath === dir || realPath.startsWith(dir + path.sep));
|
|
128
|
-
}
|
|
129
61
|
/** Expand ~ to the user's home directory */
|
|
130
62
|
function expandTilde(p) {
|
|
131
63
|
if (p === "~")
|
|
@@ -151,10 +83,10 @@ function normalizePath(inputPath) {
|
|
|
151
83
|
return translateSandboxPath(expandTilde(inputPath));
|
|
152
84
|
}
|
|
153
85
|
/**
|
|
154
|
-
* Validate a
|
|
86
|
+
* Validate a path and return the resolved absolute path.
|
|
155
87
|
* Expands ~, translates sandbox paths, blocks sensitive directories.
|
|
156
88
|
*/
|
|
157
|
-
|
|
89
|
+
function validatePath(inputPath) {
|
|
158
90
|
const normalized = normalizePath(inputPath);
|
|
159
91
|
const resolved = path.resolve(normalized);
|
|
160
92
|
const realPath = resolveRealSafe(resolved);
|
|
@@ -163,23 +95,12 @@ export function validateReadPath(inputPath) {
|
|
|
163
95
|
}
|
|
164
96
|
return resolved;
|
|
165
97
|
}
|
|
166
|
-
/**
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
98
|
+
/** Validate a file path for reading. */
|
|
99
|
+
export function validateReadPath(inputPath) {
|
|
100
|
+
return validatePath(inputPath);
|
|
101
|
+
}
|
|
102
|
+
/** Validate a file path for writing. */
|
|
170
103
|
export function validateWritePath(inputPath) {
|
|
171
|
-
|
|
172
|
-
const resolved = path.resolve(normalized);
|
|
173
|
-
const realPath = resolveRealSafe(resolved);
|
|
174
|
-
if (isSensitivePath(resolved) || isSensitivePath(realPath)) {
|
|
175
|
-
throw new Error("Access denied: path is in a restricted location");
|
|
176
|
-
}
|
|
177
|
-
if (!isWithinWriteAllowedDirs(realPath)) {
|
|
178
|
-
throw new Error("Access denied: path is outside allowed directories");
|
|
179
|
-
}
|
|
180
|
-
if (hasSymlinkEscape(resolved)) {
|
|
181
|
-
throw new Error("Access denied: path contains a symlink that escapes allowed directories");
|
|
182
|
-
}
|
|
183
|
-
return resolved;
|
|
104
|
+
return validatePath(inputPath);
|
|
184
105
|
}
|
|
185
106
|
//# sourceMappingURL=path-security.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-security.js","sourceRoot":"","sources":["../../src/lib/path-security.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"path-security.js","sourceRoot":"","sources":["../../src/lib/path-security.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,iEAAiE;AACjE,MAAM,kBAAkB,GAAG;IACzB,OAAO;IACP,eAAe;IACf,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;IACP,WAAW;IACX,mBAAmB;CACpB,CAAC;AAEF,SAAS,oBAAoB;IAC3B,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC1B,OAAO;QACL,GAAG,kBAAk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,SAAiB;IACjD,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -17,7 +17,7 @@ export function createServer() {
|
|
|
17
17
|
}
|
|
18
18
|
const server = new McpServer({ name: "Topaz Labs", version: "0.1.7" }, { capabilities: { tools: {} } });
|
|
19
19
|
// --- Tool: enhance ---
|
|
20
|
-
server.registerTool("enhance", {
|
|
20
|
+
server.registerTool("image-enhance", {
|
|
21
21
|
title: "Enhance Image",
|
|
22
22
|
description: "Enhance an image using Topaz Labs AI. Upscales, sharpens, and improves quality. Accepts a local file path or URL. If the user shares an image in the conversation without providing a path, ask them for the file path or a URL to the original image.",
|
|
23
23
|
inputSchema: {
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,UAAU,YAAY;IAC1B,IAAI,MAA+B,CAAC;IAEpC,SAAS,SAAS;QAChB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;YACzC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CACb,iFAAiF,CAClF,CAAC;YACJ,CAAC;YACD,MAAM,GAAG,IAAI,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,E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