image-router-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 +6 -4
- package/dist/schemas.d.ts +4 -2
- package/dist/schemas.js +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ It keeps model IDs flexible instead of locking tools to a small allowlist, so ne
|
|
|
21
21
|
|
|
22
22
|
| Tool | Provider | Supports |
|
|
23
23
|
| --- | --- | --- |
|
|
24
|
-
| `xai_generate_image` | xAI/Grok | Text-to-image and JSON image edits with local `input_images` |
|
|
25
|
-
| `google_generate_image` | Google Gemini/Nano Banana | Text-to-image and local reference/edit images |
|
|
24
|
+
| `xai_generate_image` | xAI/Grok | Text-to-image and JSON image edits with up to 3 local `input_images` |
|
|
25
|
+
| `google_generate_image` | Google Gemini/Nano Banana | Text-to-image and local reference/edit images, including `512`, `1K`, `2K`, and `4K` image sizes where supported |
|
|
26
26
|
| `openai_generate_image` | OpenAI | Text-to-image and local reference/edit images |
|
|
27
27
|
|
|
28
28
|
## Model examples
|
|
@@ -102,6 +102,7 @@ To edit or reference existing local images, pass file paths with `input_images`:
|
|
|
102
102
|
"model": "gemini-3.1-flash-image-preview",
|
|
103
103
|
"input_images": ["./assets/sketch.png"],
|
|
104
104
|
"aspect_ratio": "16:9",
|
|
105
|
+
"image_size": "512",
|
|
105
106
|
"return_mode": "both"
|
|
106
107
|
}
|
|
107
108
|
}
|
|
@@ -145,8 +146,8 @@ npm run ci
|
|
|
145
146
|
|
|
146
147
|
| 工具 | 供應商 | 支援內容 |
|
|
147
148
|
| --- | --- | --- |
|
|
148
|
-
| `xai_generate_image` | xAI/Grok |
|
|
149
|
-
| `google_generate_image` | Google Gemini/Nano Banana |
|
|
149
|
+
| `xai_generate_image` | xAI/Grok | 文字生成圖片,以及最多 3 張本機 `input_images` 的 JSON 圖片編輯 |
|
|
150
|
+
| `google_generate_image` | Google Gemini/Nano Banana | 文字生成圖片,以及本機參考圖/編輯圖;支援供應商允許的 `512`、`1K`、`2K`、`4K` 圖片尺寸 |
|
|
150
151
|
| `openai_generate_image` | OpenAI | 文字生成圖片,以及本機參考圖/編輯圖 |
|
|
151
152
|
|
|
152
153
|
## 模型範例
|
|
@@ -226,6 +227,7 @@ npm run build
|
|
|
226
227
|
"model": "gemini-3.1-flash-image-preview",
|
|
227
228
|
"input_images": ["./assets/sketch.png"],
|
|
228
229
|
"aspect_ratio": "16:9",
|
|
230
|
+
"image_size": "512",
|
|
229
231
|
"return_mode": "both"
|
|
230
232
|
}
|
|
231
233
|
}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare const googleInputShape: {
|
|
|
50
50
|
readonly model: z.ZodDefault<z.ZodString>;
|
|
51
51
|
readonly aspect_ratio: z.ZodOptional<z.ZodString>;
|
|
52
52
|
readonly image_size: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
512: "512";
|
|
53
54
|
"1K": "1K";
|
|
54
55
|
"2K": "2K";
|
|
55
56
|
"4K": "4K";
|
|
@@ -67,6 +68,7 @@ export declare const googleInputShape: {
|
|
|
67
68
|
readonly user: z.ZodOptional<z.ZodString>;
|
|
68
69
|
};
|
|
69
70
|
export declare const xaiInputShape: {
|
|
71
|
+
readonly input_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
72
|
readonly model: z.ZodDefault<z.ZodString>;
|
|
71
73
|
readonly aspect_ratio: z.ZodOptional<z.ZodString>;
|
|
72
74
|
readonly resolution: z.ZodOptional<z.ZodEnum<{
|
|
@@ -75,7 +77,6 @@ export declare const xaiInputShape: {
|
|
|
75
77
|
}>>;
|
|
76
78
|
readonly prompt: z.ZodString;
|
|
77
79
|
readonly output_path: z.ZodOptional<z.ZodString>;
|
|
78
|
-
readonly input_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
79
80
|
readonly return_mode: z.ZodDefault<z.ZodEnum<{
|
|
80
81
|
file: "file";
|
|
81
82
|
inline: "inline";
|
|
@@ -130,6 +131,7 @@ export declare const googleParamsSchema: z.ZodObject<{
|
|
|
130
131
|
model: z.ZodDefault<z.ZodString>;
|
|
131
132
|
aspect_ratio: z.ZodOptional<z.ZodString>;
|
|
132
133
|
image_size: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
512: "512";
|
|
133
135
|
"1K": "1K";
|
|
134
136
|
"2K": "2K";
|
|
135
137
|
"4K": "4K";
|
|
@@ -147,6 +149,7 @@ export declare const googleParamsSchema: z.ZodObject<{
|
|
|
147
149
|
user: z.ZodOptional<z.ZodString>;
|
|
148
150
|
}, z.core.$strict>;
|
|
149
151
|
export declare const xaiParamsSchema: z.ZodObject<{
|
|
152
|
+
input_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
150
153
|
model: z.ZodDefault<z.ZodString>;
|
|
151
154
|
aspect_ratio: z.ZodOptional<z.ZodString>;
|
|
152
155
|
resolution: z.ZodOptional<z.ZodEnum<{
|
|
@@ -155,7 +158,6 @@ export declare const xaiParamsSchema: z.ZodObject<{
|
|
|
155
158
|
}>>;
|
|
156
159
|
prompt: z.ZodString;
|
|
157
160
|
output_path: z.ZodOptional<z.ZodString>;
|
|
158
|
-
input_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
161
|
return_mode: z.ZodDefault<z.ZodEnum<{
|
|
160
162
|
file: "file";
|
|
161
163
|
inline: "inline";
|
package/dist/schemas.js
CHANGED
|
@@ -35,10 +35,11 @@ export const googleInputShape = {
|
|
|
35
35
|
...commonImageShape,
|
|
36
36
|
model: nonEmptyString.default("gemini-3.1-flash-image-preview").describe("Google image model ID. Defaults to Nano Banana 2."),
|
|
37
37
|
aspect_ratio: nonEmptyString.optional().describe("Aspect ratio, for example 1:1, 16:9, 9:16, 4:3, or 3:2."),
|
|
38
|
-
image_size: z.enum(["1K", "2K", "4K"]).optional().describe("Google image size where supported."),
|
|
38
|
+
image_size: z.enum(["512", "1K", "2K", "4K"]).optional().describe("Google image size where supported."),
|
|
39
39
|
};
|
|
40
40
|
export const xaiInputShape = {
|
|
41
41
|
...commonImageShape,
|
|
42
|
+
input_images: z.array(nonEmptyString).max(3).optional().describe("Local image paths used as edit/reference inputs. xAI supports up to 3 input images."),
|
|
42
43
|
model: nonEmptyString.default("grok-imagine-image-quality").describe("xAI/Grok image model ID."),
|
|
43
44
|
aspect_ratio: nonEmptyString.optional().describe("Aspect ratio, for example 1:1, 16:9, 9:16, 3:2, or auto."),
|
|
44
45
|
resolution: z.enum(["1k", "2k"]).optional().describe("xAI image resolution."),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-router-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "MCP server for routing image generation and editing across xAI, Google Gemini/Nano Banana, and OpenAI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"author": "",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@google/genai": "2.
|
|
36
|
+
"@google/genai": "2.7.0",
|
|
37
37
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
38
|
-
"openai": "6.39.
|
|
38
|
+
"openai": "6.39.1",
|
|
39
39
|
"zod": "4.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|