@icogenie/mcp 0.2.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -7
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
5
5
 
6
6
  // src/server.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
+ import { CREDIT_CONFIG } from "@icogenie/core";
8
9
 
9
10
  // src/tools/generate.ts
10
11
  import { z } from "zod";
@@ -268,7 +269,7 @@ async function generateBundle(options) {
268
269
  // src/tools/generate.ts
269
270
  var generateIconSchema = {
270
271
  prompt: z.string().describe("Description of the icon to generate"),
271
- style: z.enum(["solid", "outline"]).default("solid").describe("Icon style"),
272
+ style: z.enum(["solid", "outline", "illustration"]).default("solid").describe("Icon style: solid (filled shapes), outline (stroked lines), or illustration (colorful, detailed)"),
272
273
  variations: z.union([z.literal(1), z.literal(2), z.literal(4)]).default(1).describe("Number of variations (1, 2, or 4)"),
273
274
  referenceImagePath: z.string().optional().describe("Local file path to reference image for style extraction"),
274
275
  referenceImage: z.object({
@@ -372,7 +373,7 @@ import { z as z4 } from "zod";
372
373
  var normalizeBundleSchema = {
373
374
  description: z4.string().describe("Description of the icon bundle to create"),
374
375
  targetCount: z4.number().optional().describe("Target number of icons (2-20)"),
375
- style: z4.enum(["solid", "outline"]).optional().describe("Preferred icon style")
376
+ style: z4.enum(["solid", "outline", "illustration"]).optional().describe("Preferred icon style")
376
377
  };
377
378
  async function normalizeBundleTool(args) {
378
379
  const result = await normalizeBundle({
@@ -400,7 +401,7 @@ var generateBundleSchema = {
400
401
  ).optional().describe("Icon list from normalize_bundle or custom"),
401
402
  description: z5.string().optional().describe("Alternative: describe the bundle to auto-generate icon list"),
402
403
  targetCount: z5.number().optional().describe("Target icon count when using description"),
403
- style: z5.enum(["solid", "outline"]).default("solid").describe("Icon style"),
404
+ style: z5.enum(["solid", "outline", "illustration"]).default("solid").describe("Icon style: solid (filled shapes), outline (stroked lines), or illustration (colorful, detailed)"),
404
405
  referenceImagePath: z5.string().optional().describe("Local file path to reference image"),
405
406
  referenceImage: z5.object({
406
407
  data: z5.string(),
@@ -446,7 +447,7 @@ function createServer() {
446
447
  "generate_icon",
447
448
  {
448
449
  title: "Generate Icon",
449
- description: "Generate an AI-powered icon preview from a text description. Costs 1 credit. Returns a generationId for download. After generation, save the preview image to the user's working directory and display it.",
450
+ description: `Generate an AI-powered icon preview from a text description. Costs ${CREDIT_CONFIG.costs.preview} credit. Returns a generationId for download. After generation, save the preview image to the user's working directory and display it.`,
450
451
  inputSchema: generateIconSchema
451
452
  },
452
453
  async (args) => {
@@ -461,7 +462,7 @@ function createServer() {
461
462
  "regenerate_icon",
462
463
  {
463
464
  title: "Regenerate Icon",
464
- description: "Regenerate a specific icon variation with an optional custom prompt. Costs 1 credit. Use with generationId (single) or bundleId (bundle). After regeneration, save and display the new preview.",
465
+ description: `Regenerate a specific icon variation with an optional custom prompt. Costs ${CREDIT_CONFIG.costs.preview} credit. Use with generationId (single) or bundleId (bundle). After regeneration, save and display the new preview.`,
465
466
  inputSchema: regenerateIconSchema
466
467
  },
467
468
  async (args) => {
@@ -491,7 +492,7 @@ function createServer() {
491
492
  "download_icon",
492
493
  {
493
494
  title: "Download Icon",
494
- description: "Download the final SVG + PNG package for an icon. Costs 5 credits (single) or 4 credits/icon (bundle). Provide outputPath to save to file. Always save to the user's working directory with a descriptive filename.",
495
+ description: `Download the final SVG + PNG package for an icon. Costs ${CREDIT_CONFIG.costs.vectorDownload} credits (single) or ${CREDIT_CONFIG.costs.bundleDownload} credits/icon (bundle). Provide outputPath to save to file. Always save to the user's working directory with a descriptive filename.`,
495
496
  inputSchema: downloadIconSchema
496
497
  },
497
498
  async (args) => {
@@ -521,7 +522,7 @@ function createServer() {
521
522
  "generate_bundle",
522
523
  {
523
524
  title: "Generate Bundle",
524
- description: "Generate a bundle of icons from an icon list. Costs 1 credit per icon. Use normalize_bundle first to plan, or provide icons directly. After generation, save preview images to the user's working directory and display them.",
525
+ description: `Generate a bundle of icons from an icon list. Costs ${CREDIT_CONFIG.costs.bundlePreview} credit per icon. Use normalize_bundle first to plan, or provide icons directly. After generation, save preview images to the user's working directory and display them.`,
525
526
  inputSchema: generateBundleSchema
526
527
  },
527
528
  async (args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icogenie/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "MCP server for IcoGenie - Enable AI agents to generate icons programmatically",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,8 @@
18
18
  "@modelcontextprotocol/sdk": "^1.12.0",
19
19
  "conf": "^12.0.0",
20
20
  "open": "^10.0.0",
21
- "zod": "^3.23.0"
21
+ "zod": "^3.23.0",
22
+ "@icogenie/core": "0.1.0"
22
23
  },
23
24
  "devDependencies": {
24
25
  "@types/node": "^20.0.0",