@icogenie/mcp 0.3.0 → 0.3.1

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 +80 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -5,7 +5,86 @@ 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
+ // ../icogenie-shared/src/credits.ts
10
+ var CREDIT_CONFIG = {
11
+ // Purchase rates
12
+ pricing: {
13
+ dollarsPerPurchase: 1,
14
+ // $1 minimum purchase
15
+ creditsPerDollar: 10
16
+ // 10 credits per $1
17
+ },
18
+ // Consumption costs
19
+ costs: {
20
+ preview: 1,
21
+ // 1 credit per preview generation
22
+ vectorDownload: 5,
23
+ // 5 credits per SVG/vector download
24
+ // Bundle costs (per icon in bundle)
25
+ bundlePreview: 1,
26
+ // 1 credit per icon preview in bundle
27
+ bundleDownload: 4
28
+ // 4 credits per icon download in bundle (20% discount)
29
+ },
30
+ // Free tier
31
+ freeTier: {
32
+ signupCredits: 8
33
+ // 8 free credits on account creation
34
+ // This allows: 1 full icon (preview + download = 6) + 2 extra previews
35
+ // Or: 8 previews to explore before purchasing
36
+ },
37
+ // Bulk purchase bonuses
38
+ bulkBonuses: [
39
+ { minDollars: 5, bonusPercent: 10 },
40
+ // $5 → 55 credits (50 + 5 bonus)
41
+ { minDollars: 10, bonusPercent: 20 },
42
+ // $10 → 120 credits (100 + 20 bonus)
43
+ { minDollars: 25, bonusPercent: 30 }
44
+ // $25 → 325 credits (250 + 75 bonus)
45
+ ],
46
+ // Purchase packages for checkout UI
47
+ packages: [
48
+ { dollars: 1, description: "Perfect for trying out" },
49
+ { dollars: 5, description: "+10% bonus" },
50
+ { dollars: 10, description: "+20% bonus" },
51
+ { dollars: 25, description: "+30% bonus" }
52
+ ],
53
+ // Bundle discount tiers
54
+ bundleDiscounts: [
55
+ { minIcons: 5, discountPercent: 20 },
56
+ { minIcons: 10, discountPercent: 30 }
57
+ ],
58
+ // Rate limits (abuse prevention)
59
+ rateLimits: {
60
+ previewsPerMinute: 10,
61
+ // Max 10 previews per minute
62
+ downloadsPerMinute: 5,
63
+ // Max 5 downloads per minute
64
+ maxCreditsPerDay: 1e3
65
+ // Max credit consumption per day
66
+ },
67
+ // Observability thresholds
68
+ alerts: {
69
+ lowBalanceWarning: 5,
70
+ // Warn when balance drops below 5 credits
71
+ highUsageThreshold: 100,
72
+ // Flag accounts using >100 credits/day
73
+ unusualPatternWindow: 3600
74
+ // Time window (seconds) for pattern detection
75
+ },
76
+ // Referral program
77
+ referral: {
78
+ referrerReward: 20,
79
+ // Credits for referrer when referee activates
80
+ refereeBonus: 20,
81
+ // Credits for referee on activation
82
+ activationGate: "first_generation",
83
+ // What counts as activation
84
+ attributionWindow: 30
85
+ // Days to track referral attribution
86
+ }
87
+ };
9
88
 
10
89
  // src/tools/generate.ts
11
90
  import { z } from "zod";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icogenie/mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MCP server for IcoGenie - Enable AI agents to generate icons programmatically",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,7 +19,7 @@
19
19
  "conf": "^12.0.0",
20
20
  "open": "^10.0.0",
21
21
  "zod": "^3.23.0",
22
- "@icogenie/core": "0.1.0"
22
+ "@icogenie/shared": "0.1.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^20.0.0",
@@ -56,7 +56,7 @@
56
56
  "registry": "https://registry.npmjs.org/"
57
57
  },
58
58
  "scripts": {
59
- "build": "tsup src/index.ts --format esm --target node18 --dts --clean",
59
+ "build": "tsup",
60
60
  "dev": "tsup src/index.ts --format esm --target node18 --watch",
61
61
  "type-check": "tsc --noEmit",
62
62
  "start": "node dist/index.js",