@te-code/image-gen-mcp 1.0.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 ADDED
@@ -0,0 +1,147 @@
1
+ # TE Image Generation MCP Server
2
+
3
+ MCP server that gives Claude Code native tools for generating images:
4
+ - **App Assets**: Icons, splash screens, feature graphics for iOS/Android
5
+ - **Game Assets**: Sprites, characters, backgrounds, tilesets
6
+ - **Book Covers**: Cover images with title/author text
7
+ - **Logos**: Brand marks and logos
8
+
9
+ ## Setup
10
+
11
+ ### 1. Install
12
+
13
+ ```bash
14
+ cd mcp-server
15
+ npm install
16
+ npm run build
17
+ ```
18
+
19
+ ### 2. Get Service Key
20
+
21
+ Get a `TE_SERVICE_KEY` from TENEO Auth or your admin.
22
+
23
+ ### 3. Add to Claude Code
24
+
25
+ Add to your `~/.claude/settings.json` (or project `.claude/settings.json`):
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "te-image-gen": {
31
+ "command": "node",
32
+ "args": ["D:/Travis Eric/TE Code/book-cover-generator/mcp-server/dist/index.js"],
33
+ "env": {
34
+ "TE_SERVICE_KEY": "your_service_key_here"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ Or if published to npm:
42
+
43
+ ```json
44
+ {
45
+ "mcpServers": {
46
+ "te-image-gen": {
47
+ "command": "npx",
48
+ "args": ["@tecode/image-gen-mcp"],
49
+ "env": {
50
+ "TE_SERVICE_KEY": "your_service_key_here"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ ### 4. Restart Claude Code
58
+
59
+ The tools will now be available in your Claude Code session.
60
+
61
+ ## Available Tools
62
+
63
+ ### `generate_app_asset`
64
+
65
+ Generate app assets for iOS/Android apps.
66
+
67
+ ```
68
+ Asset types: app_icon, splash_screen, feature_graphic, hero_image, promo_image, marketing_text
69
+ Styles: ios17, minimal, gradient, glassmorphism, flat, 3d, neon, outline
70
+ Providers: auto, nanobanana (fast), nanobanana-pro (quality+text), ideogram (best)
71
+ ```
72
+
73
+ **Example:**
74
+ ```
75
+ Generate an app icon for Flux - a habit tracking app.
76
+ Use a flowing wave symbol in green (#34C759), modern iOS style.
77
+ ```
78
+
79
+ ### `generate_game_asset`
80
+
81
+ Generate game assets like sprites, backgrounds, and characters.
82
+
83
+ ```
84
+ Asset types: sprite, icon, background, tileset, character, item
85
+ Styles: pixel-art, hand-drawn, isometric, stylized, realistic, low-poly, chibi
86
+ Moods: cozy, heroic, dark, cute, magical, retro, sci-fi, spooky, vibrant
87
+ ```
88
+
89
+ **Example:**
90
+ ```
91
+ Generate a treasure chest sprite in pixel-art style for a cozy RPG game.
92
+ ```
93
+
94
+ ### `generate_cover`
95
+
96
+ Generate book covers with title and author text.
97
+
98
+ ```
99
+ Use ideogram provider for best text rendering.
100
+ ```
101
+
102
+ **Example:**
103
+ ```
104
+ Generate a sci-fi book cover for "The Last Algorithm" by Jane Smith.
105
+ Dark space background with glowing circuitry patterns.
106
+ ```
107
+
108
+ ### `generate_logo`
109
+
110
+ Generate logos and brand marks.
111
+
112
+ **Example:**
113
+ ```
114
+ Generate a minimal logo for TechFlow - a SaaS company.
115
+ Abstract flowing lines, no text, works well at small sizes.
116
+ ```
117
+
118
+ ### `list_providers`
119
+
120
+ List available AI providers and their capabilities/pricing.
121
+
122
+ ## Environment Variables
123
+
124
+ | Variable | Description | Default |
125
+ |----------|-------------|---------|
126
+ | `TE_SERVICE_KEY` | Service key for authentication | Required |
127
+ | `TE_IMAGE_GEN_URL` | API base URL | `https://bookcovergenerator.ai` |
128
+
129
+ ## Provider Comparison
130
+
131
+ | Provider | Speed | Quality | Text | Credits |
132
+ |----------|-------|---------|------|---------|
133
+ | `nanobanana` | Fast | Good | Basic | 2-5 |
134
+ | `nanobanana-pro` | Medium | Great | Good | 5-12 |
135
+ | `ideogram` | Medium | Best | Excellent | 8-15 |
136
+
137
+ Use `provider: "auto"` to let the system choose based on your request.
138
+
139
+ ## For Other Projects
140
+
141
+ To add image generation to your project:
142
+
143
+ 1. Copy this MCP server or install via npm
144
+ 2. Add to project's `.claude/settings.json`
145
+ 3. Claude in your project now has native image tools
146
+
147
+ See `D:\Travis Eric\TE Code\.claude\AI_TO_AI_INTEGRATION.md` for full ecosystem docs.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,519 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
5
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
6
+ const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
7
+ // Configuration
8
+ const BASE_URL = process.env.TE_IMAGE_GEN_URL || "https://bookcovergenerator.ai";
9
+ const SERVICE_KEY = process.env.TE_SERVICE_KEY || "";
10
+ // Tool definitions - following MCP best practices:
11
+ // 1. Lead with function (what it does)
12
+ // 2. Keep short (1-2 sentences)
13
+ // 3. Add searchable keywords
14
+ // 4. Put constraints in schema, not description
15
+ const TOOLS = [
16
+ {
17
+ name: "generate_app_asset",
18
+ description: "Generate iOS/Android app assets: icons, splash screens, feature graphics, marketing images. Keywords: app icon, splash screen, mobile app, iOS, Android, App Store, Play Store, launch screen, promotional",
19
+ inputSchema: {
20
+ type: "object",
21
+ properties: {
22
+ prompt: {
23
+ type: "string",
24
+ description: "Description of the asset to generate"
25
+ },
26
+ app_name: {
27
+ type: "string",
28
+ description: "Name of the app (used in prompt context)"
29
+ },
30
+ asset_type: {
31
+ type: "string",
32
+ enum: ["app_icon", "splash_screen", "feature_graphic", "hero_image", "promo_image", "marketing_text"],
33
+ default: "app_icon",
34
+ description: "Type of asset to generate"
35
+ },
36
+ app_category: {
37
+ type: "string",
38
+ enum: ["productivity", "health", "finance", "social", "entertainment", "education", "lifestyle", "utilities", "games", "photo_video", "music", "news", "travel", "food", "shopping"],
39
+ default: "productivity",
40
+ description: "App category for context"
41
+ },
42
+ style: {
43
+ type: "string",
44
+ enum: ["auto", "ios17", "minimal", "gradient", "glassmorphism", "flat", "3d", "skeuomorphic", "neon", "outline"],
45
+ default: "auto",
46
+ description: "Visual style"
47
+ },
48
+ mood: {
49
+ type: "string",
50
+ enum: ["auto", "professional", "playful", "premium", "tech", "calm", "bold", "friendly", "minimal", "vibrant"],
51
+ default: "auto",
52
+ description: "Mood/atmosphere"
53
+ },
54
+ brand_color: {
55
+ type: "string",
56
+ description: "Primary brand color (hex, e.g., #34C759)"
57
+ },
58
+ provider: {
59
+ type: "string",
60
+ enum: ["auto", "nanobanana", "nanobanana-pro", "ideogram"],
61
+ default: "auto",
62
+ description: "AI provider to use"
63
+ },
64
+ renderingSpeed: {
65
+ type: "string",
66
+ enum: ["TURBO", "STANDARD", "QUALITY"],
67
+ default: "QUALITY",
68
+ description: "Quality vs speed tradeoff"
69
+ }
70
+ },
71
+ required: ["prompt"]
72
+ }
73
+ },
74
+ {
75
+ name: "generate_game_asset",
76
+ description: "Generate game assets: sprites, characters, backgrounds, tilesets, icons, items. Keywords: game art, sprite, pixel art, character, tileset, game icon, 2D art, game graphics, indie game",
77
+ inputSchema: {
78
+ type: "object",
79
+ properties: {
80
+ prompt: {
81
+ type: "string",
82
+ description: "Description of the game asset"
83
+ },
84
+ asset_type: {
85
+ type: "string",
86
+ enum: ["sprite", "icon", "background", "tileset", "character", "item"],
87
+ default: "sprite",
88
+ description: "Type of game asset"
89
+ },
90
+ style: {
91
+ type: "string",
92
+ enum: ["pixel-art", "hand-drawn", "isometric", "top-down", "side-view", "stylized", "realistic", "low-poly", "chibi"],
93
+ default: "stylized",
94
+ description: "Art style"
95
+ },
96
+ mood: {
97
+ type: "string",
98
+ enum: ["cozy", "heroic", "dark", "cute", "magical", "retro", "sci-fi", "spooky", "vibrant"],
99
+ default: "vibrant",
100
+ description: "Mood/atmosphere"
101
+ },
102
+ aspectRatio: {
103
+ type: "string",
104
+ enum: ["ASPECT_1_1", "ASPECT_16_9", "ASPECT_9_16", "ASPECT_4_3", "ASPECT_3_4"],
105
+ default: "ASPECT_1_1",
106
+ description: "Aspect ratio"
107
+ },
108
+ provider: {
109
+ type: "string",
110
+ enum: ["auto", "nanobanana", "nanobanana-pro", "ideogram"],
111
+ default: "auto",
112
+ description: "AI provider"
113
+ },
114
+ renderingSpeed: {
115
+ type: "string",
116
+ enum: ["TURBO", "STANDARD", "QUALITY"],
117
+ default: "STANDARD",
118
+ description: "Quality vs speed"
119
+ }
120
+ },
121
+ required: ["prompt"]
122
+ }
123
+ },
124
+ {
125
+ name: "generate_cover",
126
+ description: "Generate book cover images with title and author text. Keywords: book cover, ebook, kindle, paperback, novel, author, publishing, cover art, book design",
127
+ inputSchema: {
128
+ type: "object",
129
+ properties: {
130
+ prompt: {
131
+ type: "string",
132
+ description: "Description of the cover design"
133
+ },
134
+ title: {
135
+ type: "string",
136
+ description: "Book title"
137
+ },
138
+ author: {
139
+ type: "string",
140
+ description: "Author name"
141
+ },
142
+ genre: {
143
+ type: "string",
144
+ description: "Book genre for style hints"
145
+ },
146
+ aspectRatio: {
147
+ type: "string",
148
+ enum: ["ASPECT_2_3", "ASPECT_3_4", "ASPECT_1_1"],
149
+ default: "ASPECT_2_3",
150
+ description: "Cover aspect ratio"
151
+ },
152
+ provider: {
153
+ type: "string",
154
+ enum: ["auto", "ideogram", "nanobanana-pro"],
155
+ default: "auto",
156
+ description: "AI provider (ideogram recommended for text)"
157
+ },
158
+ renderingSpeed: {
159
+ type: "string",
160
+ enum: ["TURBO", "STANDARD", "QUALITY"],
161
+ default: "QUALITY",
162
+ description: "Quality level"
163
+ }
164
+ },
165
+ required: ["prompt", "title"]
166
+ }
167
+ },
168
+ {
169
+ name: "generate_logo",
170
+ description: "Generate logos and brand marks. Keywords: logo, brand, icon, company logo, startup, branding, symbol, mark, identity",
171
+ inputSchema: {
172
+ type: "object",
173
+ properties: {
174
+ prompt: {
175
+ type: "string",
176
+ description: "Description of the logo"
177
+ },
178
+ company_name: {
179
+ type: "string",
180
+ description: "Company/brand name"
181
+ },
182
+ style: {
183
+ type: "string",
184
+ enum: ["minimal", "modern", "vintage", "playful", "corporate", "tech", "organic"],
185
+ default: "modern",
186
+ description: "Logo style"
187
+ },
188
+ include_text: {
189
+ type: "boolean",
190
+ default: false,
191
+ description: "Include company name in logo"
192
+ },
193
+ provider: {
194
+ type: "string",
195
+ enum: ["auto", "ideogram", "nanobanana-pro", "nanobanana"],
196
+ default: "auto",
197
+ description: "AI provider"
198
+ },
199
+ renderingSpeed: {
200
+ type: "string",
201
+ enum: ["TURBO", "STANDARD", "QUALITY"],
202
+ default: "QUALITY",
203
+ description: "Quality level"
204
+ }
205
+ },
206
+ required: ["prompt"]
207
+ }
208
+ },
209
+ {
210
+ name: "generate_website_asset",
211
+ description: "Generate website design assets: hero images, section backgrounds, product shots, team photos, brand textures, social previews. Keywords: website, hero image, background, texture, social preview, OG image, web design, brand photography",
212
+ inputSchema: {
213
+ type: "object",
214
+ properties: {
215
+ prompt: {
216
+ type: "string",
217
+ description: "Description of the website asset to generate"
218
+ },
219
+ asset_type: {
220
+ type: "string",
221
+ enum: ["hero_image", "section_image", "product_shot", "team_photo", "brand_texture", "social_preview"],
222
+ default: "hero_image",
223
+ description: "Type of website asset (hero_image=full-width hero, section_image=section background/texture, product_shot=product mockup, team_photo=professional headshot, brand_texture=subtle pattern, social_preview=OG/social share image)"
224
+ },
225
+ style: {
226
+ type: "string",
227
+ enum: ["editorial", "minimal", "dark-premium", "brutalist", "organic", "abstract"],
228
+ default: "minimal",
229
+ description: "Visual style"
230
+ },
231
+ brand_color: {
232
+ type: "string",
233
+ description: "Primary brand color as hex (e.g., #D4AF37), applied as accent/tint"
234
+ },
235
+ dark_mode: {
236
+ type: "boolean",
237
+ default: false,
238
+ description: "Generate for dark backgrounds"
239
+ },
240
+ text_overlay: {
241
+ type: "string",
242
+ description: "Optional text to include in the image"
243
+ },
244
+ provider: {
245
+ type: "string",
246
+ enum: ["auto", "nanobanana", "nanobanana-pro", "ideogram"],
247
+ default: "auto",
248
+ description: "AI provider (ideogram recommended for text overlays)"
249
+ },
250
+ renderingSpeed: {
251
+ type: "string",
252
+ enum: ["TURBO", "STANDARD", "QUALITY"],
253
+ default: "QUALITY",
254
+ description: "Quality vs speed tradeoff"
255
+ }
256
+ },
257
+ required: ["prompt"]
258
+ }
259
+ },
260
+ {
261
+ name: "list_providers",
262
+ description: "List available AI image providers with pricing and capabilities. Keywords: providers, pricing, credits, ideogram, nanobanana, gemini",
263
+ inputSchema: {
264
+ type: "object",
265
+ properties: {}
266
+ }
267
+ }
268
+ ];
269
+ // API call helper
270
+ async function callAPI(endpoint, params) {
271
+ if (!SERVICE_KEY) {
272
+ throw new Error("TE_SERVICE_KEY environment variable not set. Get a key from TENEO Auth.");
273
+ }
274
+ const url = `${BASE_URL}/api/ai-invoke/${endpoint}`;
275
+ const response = await fetch(url, {
276
+ method: "POST",
277
+ headers: {
278
+ "Content-Type": "application/json",
279
+ "x-service-key": SERVICE_KEY
280
+ },
281
+ body: JSON.stringify(params)
282
+ });
283
+ const data = await response.json();
284
+ if (!response.ok || !data.success) {
285
+ throw new Error(data.error || `API error: ${response.status}`);
286
+ }
287
+ return data;
288
+ }
289
+ // Tool handlers
290
+ async function handleGenerateAppAsset(params) {
291
+ const result = await callAPI("generate-app-asset", params);
292
+ return {
293
+ success: true,
294
+ url: result.url,
295
+ url_type: result.url_type,
296
+ suggested_filename: result.suggested_filename,
297
+ asset_type: result.asset?.type,
298
+ dimensions: result.asset?.dimensions,
299
+ provider: result.provider?.id,
300
+ credits_used: result.credits_used,
301
+ platform_notes: result.platform_notes
302
+ };
303
+ }
304
+ async function handleGenerateGameAsset(params) {
305
+ const result = await callAPI("generate-game-asset", params);
306
+ return {
307
+ success: true,
308
+ url: result.url,
309
+ suggested_filename: result.suggested_filename,
310
+ asset_type: result.asset?.type,
311
+ dimensions: result.asset?.dimensions,
312
+ provider: result.provider?.id,
313
+ credits_used: result.credits_used
314
+ };
315
+ }
316
+ async function handleGenerateCover(params) {
317
+ // Map to the book cover endpoint format
318
+ const result = await callAPI("generate-cover", {
319
+ prompt: params.prompt,
320
+ title: params.title,
321
+ author: params.author || "",
322
+ genre: params.genre,
323
+ aspectRatio: params.aspectRatio || "ASPECT_2_3",
324
+ provider: params.provider || "auto",
325
+ renderingSpeed: params.renderingSpeed || "QUALITY"
326
+ });
327
+ // Extract URL from result (handle different response formats)
328
+ let url = result.url;
329
+ if (!url && result.images) {
330
+ const images = result.images;
331
+ url = images[0]?.url;
332
+ }
333
+ // Extract provider info
334
+ let providerId = result.actualProvider;
335
+ if (!providerId && result.provider) {
336
+ const providerObj = result.provider;
337
+ providerId = providerObj.id || result.provider;
338
+ }
339
+ return {
340
+ success: true,
341
+ url,
342
+ suggested_filename: result.suggested_filename,
343
+ provider: providerId,
344
+ credits_used: result.credits_used
345
+ };
346
+ }
347
+ async function handleGenerateLogo(params) {
348
+ // Build logo-specific prompt
349
+ let prompt = params.prompt;
350
+ if (params.company_name) {
351
+ prompt = `Logo for "${params.company_name}": ${prompt}`;
352
+ }
353
+ if (params.style) {
354
+ prompt = `${params.style} style, ${prompt}`;
355
+ }
356
+ if (params.include_text === false) {
357
+ prompt = `${prompt}, no text, symbol only`;
358
+ }
359
+ const result = await callAPI("generate-app-asset", {
360
+ prompt,
361
+ asset_type: "app_icon", // Logos use square format
362
+ style: params.style || "minimal",
363
+ provider: params.provider || "auto",
364
+ renderingSpeed: params.renderingSpeed || "QUALITY"
365
+ });
366
+ return {
367
+ success: true,
368
+ url: result.url,
369
+ suggested_filename: `logo-${Date.now()}.png`,
370
+ provider: result.provider?.id,
371
+ credits_used: result.credits_used
372
+ };
373
+ }
374
+ async function handleGenerateWebsiteAsset(params) {
375
+ const assetType = params.asset_type || "hero_image";
376
+ const style = params.style || "minimal";
377
+ const darkMode = params.dark_mode === true;
378
+ // Map asset types to aspect ratios and context
379
+ const assetConfig = {
380
+ hero_image: { aspect: "ASPECT_16_9", context: "full-width hero image for a website, cinematic wide format" },
381
+ section_image: { aspect: "ASPECT_16_9", context: "website section background image, wide format" },
382
+ product_shot: { aspect: "ASPECT_4_3", context: "product screenshot mockup, clean presentation" },
383
+ team_photo: { aspect: "ASPECT_1_1", context: "professional headshot or team photo, clean background" },
384
+ brand_texture: { aspect: "ASPECT_1_1", context: "subtle tileable background texture or pattern, seamless" },
385
+ social_preview: { aspect: "ASPECT_16_9", context: "Open Graph social share preview image, bold and readable at small sizes" },
386
+ };
387
+ const config = assetConfig[assetType] || assetConfig.hero_image;
388
+ // Build prompt with style and context
389
+ let prompt = `${config.context}, ${style} style, ${params.prompt}`;
390
+ if (darkMode) {
391
+ prompt = `${prompt}, dark background, dark theme`;
392
+ }
393
+ if (params.brand_color) {
394
+ prompt = `${prompt}, accent color ${params.brand_color}`;
395
+ }
396
+ if (params.text_overlay) {
397
+ prompt = `${prompt}, with text overlay reading "${params.text_overlay}"`;
398
+ }
399
+ // Use ideogram when text overlay is requested (better text rendering)
400
+ const provider = params.provider || (params.text_overlay ? "ideogram" : "auto");
401
+ const result = await callAPI("generate-app-asset", {
402
+ prompt,
403
+ asset_type: "hero_image",
404
+ style,
405
+ aspectRatio: config.aspect,
406
+ provider,
407
+ renderingSpeed: params.renderingSpeed || "QUALITY"
408
+ });
409
+ return {
410
+ success: true,
411
+ url: result.url,
412
+ suggested_filename: `website-${assetType}-${Date.now()}.png`,
413
+ asset_type: assetType,
414
+ style,
415
+ dark_mode: darkMode,
416
+ dimensions: result.asset?.dimensions,
417
+ provider: result.provider?.id,
418
+ credits_used: result.credits_used
419
+ };
420
+ }
421
+ async function handleListProviders() {
422
+ return {
423
+ providers: [
424
+ {
425
+ id: "ideogram",
426
+ name: "Ideogram AI",
427
+ description: "Best quality, excellent text rendering",
428
+ credits: { TURBO: 8, STANDARD: 10, QUALITY: 15 },
429
+ best_for: ["book covers", "text-heavy graphics", "marketing materials"]
430
+ },
431
+ {
432
+ id: "nanobanana",
433
+ name: "NanoBanana (Gemini Flash)",
434
+ description: "Fast and affordable",
435
+ credits: { TURBO: 2, STANDARD: 3, QUALITY: 5 },
436
+ best_for: ["quick drafts", "app icons", "game sprites"]
437
+ },
438
+ {
439
+ id: "nanobanana-pro",
440
+ name: "NanoBanana Pro (Gemini Pro)",
441
+ description: "High quality with good text rendering",
442
+ credits: { TURBO: 5, STANDARD: 8, QUALITY: 12 },
443
+ best_for: ["professional graphics", "marketing with text", "detailed art"]
444
+ }
445
+ ],
446
+ recommendation: "Use 'auto' to let the system choose the best provider for your use case."
447
+ };
448
+ }
449
+ // Main server
450
+ async function main() {
451
+ const server = new index_js_1.Server({
452
+ name: "te-image-gen",
453
+ version: "1.0.0"
454
+ }, {
455
+ capabilities: {
456
+ tools: {}
457
+ }
458
+ });
459
+ // List tools handler
460
+ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
461
+ tools: TOOLS
462
+ }));
463
+ // Call tool handler
464
+ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
465
+ const { name, arguments: args } = request.params;
466
+ const params = (args || {});
467
+ try {
468
+ let result;
469
+ switch (name) {
470
+ case "generate_app_asset":
471
+ result = await handleGenerateAppAsset(params);
472
+ break;
473
+ case "generate_game_asset":
474
+ result = await handleGenerateGameAsset(params);
475
+ break;
476
+ case "generate_cover":
477
+ result = await handleGenerateCover(params);
478
+ break;
479
+ case "generate_logo":
480
+ result = await handleGenerateLogo(params);
481
+ break;
482
+ case "generate_website_asset":
483
+ result = await handleGenerateWebsiteAsset(params);
484
+ break;
485
+ case "list_providers":
486
+ result = await handleListProviders();
487
+ break;
488
+ default:
489
+ throw new Error(`Unknown tool: ${name}`);
490
+ }
491
+ return {
492
+ content: [
493
+ {
494
+ type: "text",
495
+ text: JSON.stringify(result, null, 2)
496
+ }
497
+ ]
498
+ };
499
+ }
500
+ catch (error) {
501
+ const message = error instanceof Error ? error.message : String(error);
502
+ return {
503
+ content: [
504
+ {
505
+ type: "text",
506
+ text: JSON.stringify({ success: false, error: message }, null, 2)
507
+ }
508
+ ],
509
+ isError: true
510
+ };
511
+ }
512
+ });
513
+ // Start server
514
+ const transport = new stdio_js_1.StdioServerTransport();
515
+ await server.connect(transport);
516
+ console.error("TE Image Gen MCP Server running");
517
+ }
518
+ main().catch(console.error);
519
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,wEAAmE;AACnE,wEAAiF;AACjF,iEAI4C;AAE5C,gBAAgB;AAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,+BAA+B,CAAC;AACjF,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;AAErD,mDAAmD;AACnD,uCAAuC;AACvC,gCAAgC;AAChC,6BAA6B;AAC7B,gDAAgD;AAChD,MAAM,KAAK,GAAW;IACpB;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,4MAA4M;QACzN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,sCAAsC;iBACpD;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,0CAA0C;iBACxD;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,CAAC;oBACrG,OAAO,EAAE,UAAU;oBACnB,WAAW,EAAE,2BAA2B;iBACzC;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oB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KAAK,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@te-code/image-gen-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for TE Code image generation (app assets, game assets, covers, logos)",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "te-image-gen-mcp": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "start": "node dist/index.js",
12
+ "dev": "ts-node src/index.ts",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "keywords": [
16
+ "mcp",
17
+ "claude",
18
+ "image-generation",
19
+ "ai",
20
+ "app-assets",
21
+ "game-assets"
22
+ ],
23
+ "author": "TE Code",
24
+ "license": "MIT",
25
+ "dependencies": {
26
+ "@modelcontextprotocol/sdk": "^1.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^20.0.0",
30
+ "typescript": "^5.0.0",
31
+ "ts-node": "^10.9.0"
32
+ },
33
+ "engines": {
34
+ "node": ">=18.0.0"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "README.md"
39
+ ]
40
+ }