forgemesh-imagegen 1.0.1 → 2.0.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.
- package/README.md +5 -5
- package/index.js +35 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,10 +10,10 @@ Part of the [ForgeMesh](https://github.com/forgemeshlabs/forgemesh) ecosystem
|
|
|
10
10
|
|
|
11
11
|
| Tool | What it does | Price |
|
|
12
12
|
|---|---|---|
|
|
13
|
-
| `generate_image` |
|
|
14
|
-
| `generate_clean` | Generate + background removal | $0.
|
|
15
|
-
| `generate_hd` |
|
|
16
|
-
| `generate_pro` |
|
|
13
|
+
| `generate_image` | Standard text-to-image generation | $0.25 USDC |
|
|
14
|
+
| `generate_clean` | Generate + background removal | $0.35 USDC |
|
|
15
|
+
| `generate_hd` | Premium generate + 4x upscale (HD) | $0.50 USDC |
|
|
16
|
+
| `generate_pro` | Top-tier generate + bg removal + 4x upscale | $0.75 USDC |
|
|
17
17
|
|
|
18
18
|
All tools accept `prompt` (required) and `aspect` (optional: `1:1`, `16:9`, `9:16`, `4:3`).
|
|
19
19
|
`generate_image` also accepts `affiliate_id` for Pyrimid attribution, or uses `PYRIMID_AFFILIATE_ID` from the environment.
|
|
@@ -57,7 +57,7 @@ export WALLET_PRIVATE_KEY=0x...
|
|
|
57
57
|
## Requirements
|
|
58
58
|
|
|
59
59
|
- A Base mainnet wallet private key with USDC
|
|
60
|
-
- $1 USDC ≈
|
|
60
|
+
- $1 USDC ≈ 4 base images, 2 clean, 2 HD, or 1 pro
|
|
61
61
|
- No other API keys needed
|
|
62
62
|
|
|
63
63
|
Get USDC on Base: [Coinbase](https://coinbase.com) → Bridge to Base, or buy directly on Base.
|
package/index.js
CHANGED
|
@@ -23,13 +23,19 @@ const USDC_ABI = parseAbi([
|
|
|
23
23
|
"function approve(address spender, uint256 amount) external returns (bool)",
|
|
24
24
|
]);
|
|
25
25
|
const PYRIMID_PRODUCTS = {
|
|
26
|
-
"/generate": { productId: 3n, priceUsdc:
|
|
26
|
+
"/generate": { productId: 3n, priceUsdc: 250000n },
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const TOOLS = [
|
|
30
30
|
{
|
|
31
31
|
name: "generate_image",
|
|
32
|
-
|
|
32
|
+
annotations: {
|
|
33
|
+
readOnlyHint: false,
|
|
34
|
+
destructiveHint: false,
|
|
35
|
+
idempotentHint: false,
|
|
36
|
+
openWorldHint: true,
|
|
37
|
+
},
|
|
38
|
+
description: "Generate a standard AI image from a text prompt. Returns a PNG image URL. Costs $0.25 USDC on Base mainnet — paid automatically.",
|
|
33
39
|
inputSchema: {
|
|
34
40
|
type: "object",
|
|
35
41
|
properties: {
|
|
@@ -42,7 +48,13 @@ const TOOLS = [
|
|
|
42
48
|
},
|
|
43
49
|
{
|
|
44
50
|
name: "generate_clean",
|
|
45
|
-
|
|
51
|
+
annotations: {
|
|
52
|
+
readOnlyHint: false,
|
|
53
|
+
destructiveHint: false,
|
|
54
|
+
idempotentHint: false,
|
|
55
|
+
openWorldHint: true,
|
|
56
|
+
},
|
|
57
|
+
description: "Generate an AI image with background removed. Returns a transparent PNG URL. Costs $0.35 USDC on Base mainnet.",
|
|
46
58
|
inputSchema: {
|
|
47
59
|
type: "object",
|
|
48
60
|
properties: {
|
|
@@ -54,7 +66,13 @@ const TOOLS = [
|
|
|
54
66
|
},
|
|
55
67
|
{
|
|
56
68
|
name: "generate_hd",
|
|
57
|
-
|
|
69
|
+
annotations: {
|
|
70
|
+
readOnlyHint: false,
|
|
71
|
+
destructiveHint: false,
|
|
72
|
+
idempotentHint: false,
|
|
73
|
+
openWorldHint: true,
|
|
74
|
+
},
|
|
75
|
+
description: "Generate a premium AI image upscaled 4x HD. Returns a high-resolution image URL. Costs $0.50 USDC on Base mainnet.",
|
|
58
76
|
inputSchema: {
|
|
59
77
|
type: "object",
|
|
60
78
|
properties: {
|
|
@@ -66,7 +84,13 @@ const TOOLS = [
|
|
|
66
84
|
},
|
|
67
85
|
{
|
|
68
86
|
name: "generate_pro",
|
|
69
|
-
|
|
87
|
+
annotations: {
|
|
88
|
+
readOnlyHint: false,
|
|
89
|
+
destructiveHint: false,
|
|
90
|
+
idempotentHint: false,
|
|
91
|
+
openWorldHint: true,
|
|
92
|
+
},
|
|
93
|
+
description: "Generate a top-tier AI image with background removal and 4x HD upscale. Costs $0.75 USDC on Base mainnet.",
|
|
70
94
|
inputSchema: {
|
|
71
95
|
type: "object",
|
|
72
96
|
properties: {
|
|
@@ -79,10 +103,10 @@ const TOOLS = [
|
|
|
79
103
|
];
|
|
80
104
|
|
|
81
105
|
const TOOL_ENDPOINTS = {
|
|
82
|
-
generate_image: { path: "/generate", price: "$0.
|
|
83
|
-
generate_clean: { path: "/generate/clean", price: "$0.
|
|
84
|
-
generate_hd: { path: "/generate/hd", price: "$0.
|
|
85
|
-
generate_pro: { path: "/generate/pro", price: "$0.
|
|
106
|
+
generate_image: { path: "/generate", price: "$0.25" },
|
|
107
|
+
generate_clean: { path: "/generate/clean", price: "$0.35" },
|
|
108
|
+
generate_hd: { path: "/generate/hd", price: "$0.50" },
|
|
109
|
+
generate_pro: { path: "/generate/pro", price: "$0.75" },
|
|
86
110
|
};
|
|
87
111
|
|
|
88
112
|
function buildHttpClient() {
|
|
@@ -90,7 +114,7 @@ function buildHttpClient() {
|
|
|
90
114
|
if (!key) {
|
|
91
115
|
throw new Error(
|
|
92
116
|
"WALLET_PRIVATE_KEY required — set a Base wallet private key funded with USDC.\n" +
|
|
93
|
-
" generate_image = $0.
|
|
117
|
+
" generate_image = $0.25 | generate_clean = $0.35 | generate_hd = $0.50 | generate_pro = $0.75"
|
|
94
118
|
);
|
|
95
119
|
}
|
|
96
120
|
const pk = key.startsWith("0x") ? key : "0x" + key;
|
|
@@ -190,7 +214,7 @@ async function main() {
|
|
|
190
214
|
}
|
|
191
215
|
|
|
192
216
|
const server = new Server(
|
|
193
|
-
{ name: "forgemesh-imagegen", version: "1.0.
|
|
217
|
+
{ name: "forgemesh-imagegen", version: "1.0.2" },
|
|
194
218
|
{ capabilities: { tools: {} } }
|
|
195
219
|
);
|
|
196
220
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forgemesh-imagegen",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"mcpName": "io.github.forgemeshlabs/imagegen-mcp",
|
|
5
5
|
"description": "MCP server for AI image generation — generate, clean (bg removal), HD (4x upscale), Pro. Pay per image in USDC via x402 on Base. No API key needed.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"start": "node index.js"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
18
|
+
"node": ">=20"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
21
21
|
"mcp",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"url": "https://github.com/forgemeshlabs/imagegen-mcp/issues"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
51
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
52
52
|
"@x402/core": "^2.11.0",
|
|
53
53
|
"@x402/evm": "^2.11.0",
|
|
54
54
|
"viem": "^2.0.0"
|