mcp-server-insumer 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/LICENSE +21 -0
- package/README.md +114 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +292 -0
- package/build/index.js.map +1 -0
- package/package.json +47 -0
- package/server.json +12 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Douglas Borthwick
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# mcp-server-insumer
|
|
2
|
+
|
|
3
|
+
MCP server for [InsumerAPI](https://insumermodel.com/developers/) — on-chain token verification across 31 blockchains.
|
|
4
|
+
|
|
5
|
+
Enables AI agents (Claude Desktop, Cursor, Windsurf, and any MCP-compatible client) to autonomously discover merchants, verify token holdings, generate discount codes, and onboard new merchants.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### Claude Desktop
|
|
10
|
+
|
|
11
|
+
Add to your `claude_desktop_config.json`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"insumer": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["-y", "mcp-server-insumer"],
|
|
19
|
+
"env": {
|
|
20
|
+
"INSUMER_API_KEY": "insr_live_..."
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Cursor / Windsurf
|
|
28
|
+
|
|
29
|
+
Add to your MCP settings:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"insumer": {
|
|
34
|
+
"command": "npx",
|
|
35
|
+
"args": ["-y", "mcp-server-insumer"],
|
|
36
|
+
"env": {
|
|
37
|
+
"INSUMER_API_KEY": "insr_live_..."
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Get an API Key
|
|
44
|
+
|
|
45
|
+
1. Go to [insumermodel.com/developers](https://insumermodel.com/developers/#pricing)
|
|
46
|
+
2. Sign up for a free key (instant, no credit card)
|
|
47
|
+
3. Set it as `INSUMER_API_KEY`
|
|
48
|
+
|
|
49
|
+
## Tools (16)
|
|
50
|
+
|
|
51
|
+
### On-Chain Verification (cost credits)
|
|
52
|
+
|
|
53
|
+
| Tool | Description |
|
|
54
|
+
|------|-------------|
|
|
55
|
+
| `insumer_attest` | Verify token balances / NFT ownership across 31 chains. ECDSA-signed boolean result. 1 credit. |
|
|
56
|
+
| `insumer_verify` | Create signed discount code (INSR-XXXXX, 30-min expiry) for a wallet at a merchant. 1 credit. |
|
|
57
|
+
|
|
58
|
+
### Discovery (free)
|
|
59
|
+
|
|
60
|
+
| Tool | Description |
|
|
61
|
+
|------|-------------|
|
|
62
|
+
| `insumer_list_merchants` | Browse the merchant directory. Filter by token, verification status. |
|
|
63
|
+
| `insumer_get_merchant` | Get full public merchant profile. |
|
|
64
|
+
| `insumer_list_tokens` | List all registered tokens and NFTs. Filter by chain, symbol, type. |
|
|
65
|
+
| `insumer_check_discount` | Calculate discount for a wallet at a merchant. |
|
|
66
|
+
|
|
67
|
+
### Credits
|
|
68
|
+
|
|
69
|
+
| Tool | Description |
|
|
70
|
+
|------|-------------|
|
|
71
|
+
| `insumer_credits` | Check credit balance and tier. |
|
|
72
|
+
| `insumer_buy_credits` | Buy verification credits with USDC (25 credits / 1 USDC). |
|
|
73
|
+
| `insumer_confirm_payment` | Confirm USDC payment for a discount code. |
|
|
74
|
+
|
|
75
|
+
### Merchant Onboarding (owner-only)
|
|
76
|
+
|
|
77
|
+
| Tool | Description |
|
|
78
|
+
|------|-------------|
|
|
79
|
+
| `insumer_create_merchant` | Create new merchant. Receives 100 free credits. |
|
|
80
|
+
| `insumer_merchant_status` | Get full private merchant details. |
|
|
81
|
+
| `insumer_configure_tokens` | Set token discount tiers. |
|
|
82
|
+
| `insumer_configure_nfts` | Set NFT collection discounts. |
|
|
83
|
+
| `insumer_configure_settings` | Set discount mode, cap, USDC payments. |
|
|
84
|
+
| `insumer_publish_directory` | Publish merchant to public directory. |
|
|
85
|
+
| `insumer_buy_merchant_credits` | Buy merchant verification credits with USDC. |
|
|
86
|
+
|
|
87
|
+
## Supported Chains (31)
|
|
88
|
+
|
|
89
|
+
**EVM**: Ethereum, BNB Chain, Base, Avalanche, Polygon, Arbitrum, Optimism, Chiliz, Soneium, Plume, Sonic, Gnosis, Mantle, Scroll, Linea, zkSync Era, Blast, Taiko, Ronin, Celo, Moonbeam, Moonriver, Viction, opBNB, World Chain, Unichain, Ink, Sei, Berachain, ApeChain
|
|
90
|
+
|
|
91
|
+
**Non-EVM**: Solana
|
|
92
|
+
|
|
93
|
+
## Example Agent Workflow
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
1. insumer_list_merchants → find merchants accepting UNI
|
|
97
|
+
2. insumer_check_discount → calculate discount for user's wallet
|
|
98
|
+
3. insumer_verify → generate discount code
|
|
99
|
+
4. insumer_confirm_payment → confirm USDC payment (if applicable)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Development
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm install
|
|
106
|
+
npm run build
|
|
107
|
+
|
|
108
|
+
# Test with MCP Inspector
|
|
109
|
+
npx @modelcontextprotocol/inspector node build/index.js
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
const API_BASE = "https://us-central1-insumer-merchant.cloudfunctions.net/insumerApi/v1";
|
|
6
|
+
const apiKey = process.env.INSUMER_API_KEY;
|
|
7
|
+
if (!apiKey) {
|
|
8
|
+
console.error("INSUMER_API_KEY environment variable is required");
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
// --- Shared API helper ---
|
|
12
|
+
async function apiCall(method, path, body) {
|
|
13
|
+
const url = `${API_BASE}${path}`;
|
|
14
|
+
const res = await fetch(url, {
|
|
15
|
+
method,
|
|
16
|
+
headers: {
|
|
17
|
+
"Content-Type": "application/json",
|
|
18
|
+
"X-API-Key": apiKey,
|
|
19
|
+
},
|
|
20
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
21
|
+
});
|
|
22
|
+
return res.json();
|
|
23
|
+
}
|
|
24
|
+
function formatResult(result) {
|
|
25
|
+
if (result.ok) {
|
|
26
|
+
return {
|
|
27
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
// --- Reusable Zod schemas ---
|
|
36
|
+
const ChainId = z
|
|
37
|
+
.union([
|
|
38
|
+
z.number().int().describe("EVM chain ID"),
|
|
39
|
+
z.literal("solana"),
|
|
40
|
+
])
|
|
41
|
+
.describe("Chain identifier: EVM chain ID (integer) or 'solana'");
|
|
42
|
+
const OnboardingChainId = z
|
|
43
|
+
.union([
|
|
44
|
+
z.enum(["1", "56", "8453", "43114", "137", "42161", "10", "88888", "1868", "98866"]).transform(Number),
|
|
45
|
+
z.number().int().refine((n) => [1, 56, 8453, 43114, 137, 42161, 10, 88888, 1868, 98866].includes(n), "Must be a supported onboarding chain"),
|
|
46
|
+
z.literal("solana"),
|
|
47
|
+
])
|
|
48
|
+
.describe("Onboarding chain: 1, 56, 8453, 43114, 137, 42161, 10, 88888, 1868, 98866, or 'solana'");
|
|
49
|
+
const UsdcChainId = z
|
|
50
|
+
.union([
|
|
51
|
+
z.enum(["1", "8453", "137", "42161", "10", "56", "43114"]).transform(Number),
|
|
52
|
+
z.number().int().refine((n) => [1, 8453, 137, 42161, 10, 56, 43114].includes(n), "Must be a supported USDC chain"),
|
|
53
|
+
z.literal("solana"),
|
|
54
|
+
])
|
|
55
|
+
.describe("USDC chain: 1, 8453, 137, 42161, 10, 56, 43114, or 'solana'");
|
|
56
|
+
const TierSchema = z.object({
|
|
57
|
+
name: z.string().max(30).describe("Tier name, e.g. 'Gold', 'Silver'"),
|
|
58
|
+
threshold: z.number().positive().describe("Minimum token balance for this tier"),
|
|
59
|
+
discount: z.number().int().min(1).max(50).describe("Discount percentage (1-50)"),
|
|
60
|
+
});
|
|
61
|
+
const TokenConfigSchema = z.object({
|
|
62
|
+
symbol: z.string().max(10).describe("Token symbol, e.g. 'UNI'"),
|
|
63
|
+
chainId: OnboardingChainId,
|
|
64
|
+
contractAddress: z.string().describe("Token contract address"),
|
|
65
|
+
decimals: z.number().int().min(0).max(18).optional().describe("Token decimals (0-18, default 18)"),
|
|
66
|
+
tiers: z.array(TierSchema).min(1).max(4).describe("1-4 discount tiers"),
|
|
67
|
+
});
|
|
68
|
+
const NftCollectionSchema = z.object({
|
|
69
|
+
name: z.string().max(50).describe("NFT collection name"),
|
|
70
|
+
contractAddress: z.string().describe("NFT contract address"),
|
|
71
|
+
chainId: OnboardingChainId,
|
|
72
|
+
discount: z.number().int().min(1).max(50).describe("Discount percentage (1-50)"),
|
|
73
|
+
});
|
|
74
|
+
// --- Server setup ---
|
|
75
|
+
const server = new McpServer({
|
|
76
|
+
name: "insumer",
|
|
77
|
+
version: "1.0.0",
|
|
78
|
+
});
|
|
79
|
+
// ============================================================
|
|
80
|
+
// ON-CHAIN VERIFICATION
|
|
81
|
+
// ============================================================
|
|
82
|
+
server.tool("insumer_attest", "Create on-chain verification (attestation). Verify 1-10 conditions (token balances, NFT ownership) across 31 chains. Returns ECDSA-signed boolean results — never exposes actual balances. Consumes 1 credit.", {
|
|
83
|
+
wallet: z.string().optional().describe("EVM wallet address (0x...)"),
|
|
84
|
+
solanaWallet: z.string().optional().describe("Solana wallet address (base58)"),
|
|
85
|
+
conditions: z
|
|
86
|
+
.array(z.object({
|
|
87
|
+
type: z.enum(["token_balance", "nft_ownership"]).describe("Condition type"),
|
|
88
|
+
contractAddress: z.string().describe("Token or NFT contract address"),
|
|
89
|
+
chainId: ChainId,
|
|
90
|
+
threshold: z.number().optional().describe("Minimum balance required (for token_balance)"),
|
|
91
|
+
decimals: z.number().int().min(0).max(18).optional().describe("Token decimals (default 18)"),
|
|
92
|
+
label: z.string().max(100).optional().describe("Human-readable label"),
|
|
93
|
+
}))
|
|
94
|
+
.min(1)
|
|
95
|
+
.max(10)
|
|
96
|
+
.describe("1-10 on-chain conditions to verify"),
|
|
97
|
+
}, async (args) => {
|
|
98
|
+
const result = await apiCall("POST", "/attest", args);
|
|
99
|
+
return formatResult(result);
|
|
100
|
+
});
|
|
101
|
+
server.tool("insumer_verify", "Create signed discount code (INSR-XXXXX, 30-min expiry) for a wallet at a merchant. Checks on-chain balances and generates a verification code. Consumes 1 merchant credit. If merchant has Stripe Connect, a coupon is auto-created.", {
|
|
102
|
+
merchantId: z.string().describe("Merchant ID"),
|
|
103
|
+
wallet: z.string().optional().describe("EVM wallet address (0x...)"),
|
|
104
|
+
solanaWallet: z.string().optional().describe("Solana wallet address (base58)"),
|
|
105
|
+
}, async (args) => {
|
|
106
|
+
const result = await apiCall("POST", "/verify", args);
|
|
107
|
+
return formatResult(result);
|
|
108
|
+
});
|
|
109
|
+
// ============================================================
|
|
110
|
+
// DISCOVERY
|
|
111
|
+
// ============================================================
|
|
112
|
+
server.tool("insumer_list_merchants", "Browse merchants in the public directory. Filter by accepted token, verification status. Returns company name, website, tokens accepted, and discount info.", {
|
|
113
|
+
token: z.string().optional().describe("Filter by accepted token symbol, e.g. 'UNI'"),
|
|
114
|
+
verified: z.enum(["true", "false"]).optional().describe("Filter by domain verification status"),
|
|
115
|
+
limit: z.number().int().min(1).max(200).optional().describe("Results per page (default 50, max 200)"),
|
|
116
|
+
offset: z.number().int().min(0).optional().describe("Pagination offset (default 0)"),
|
|
117
|
+
}, async (args) => {
|
|
118
|
+
const params = new URLSearchParams();
|
|
119
|
+
if (args.token)
|
|
120
|
+
params.set("token", args.token);
|
|
121
|
+
if (args.verified)
|
|
122
|
+
params.set("verified", args.verified);
|
|
123
|
+
if (args.limit !== undefined)
|
|
124
|
+
params.set("limit", String(args.limit));
|
|
125
|
+
if (args.offset !== undefined)
|
|
126
|
+
params.set("offset", String(args.offset));
|
|
127
|
+
const qs = params.toString();
|
|
128
|
+
const result = await apiCall("GET", `/merchants${qs ? `?${qs}` : ""}`);
|
|
129
|
+
return formatResult(result);
|
|
130
|
+
});
|
|
131
|
+
server.tool("insumer_get_merchant", "Get full public merchant profile including token tiers, NFT collections, discount mode, and verification status.", {
|
|
132
|
+
id: z.string().describe("Merchant ID"),
|
|
133
|
+
}, async (args) => {
|
|
134
|
+
const result = await apiCall("GET", `/merchants/${encodeURIComponent(args.id)}`);
|
|
135
|
+
return formatResult(result);
|
|
136
|
+
});
|
|
137
|
+
server.tool("insumer_list_tokens", "List all registered tokens and NFT collections in the Insumer registry. Filter by chain, symbol, or asset type.", {
|
|
138
|
+
chain: z.union([z.number().int(), z.literal("solana")]).optional().describe("Filter by chain ID"),
|
|
139
|
+
symbol: z.string().optional().describe("Filter by token symbol"),
|
|
140
|
+
type: z.enum(["token", "nft"]).optional().describe("Filter by asset type"),
|
|
141
|
+
}, async (args) => {
|
|
142
|
+
const params = new URLSearchParams();
|
|
143
|
+
if (args.chain !== undefined)
|
|
144
|
+
params.set("chain", String(args.chain));
|
|
145
|
+
if (args.symbol)
|
|
146
|
+
params.set("symbol", args.symbol);
|
|
147
|
+
if (args.type)
|
|
148
|
+
params.set("type", args.type);
|
|
149
|
+
const qs = params.toString();
|
|
150
|
+
const result = await apiCall("GET", `/tokens${qs ? `?${qs}` : ""}`);
|
|
151
|
+
return formatResult(result);
|
|
152
|
+
});
|
|
153
|
+
server.tool("insumer_check_discount", "Calculate discount for a wallet at a merchant. Checks on-chain balances and returns total discount with breakdown. Free — does not consume credits.", {
|
|
154
|
+
merchant: z.string().describe("Merchant ID"),
|
|
155
|
+
wallet: z.string().optional().describe("EVM wallet address (0x...)"),
|
|
156
|
+
solanaWallet: z.string().optional().describe("Solana wallet address (base58)"),
|
|
157
|
+
}, async (args) => {
|
|
158
|
+
const params = new URLSearchParams();
|
|
159
|
+
params.set("merchant", args.merchant);
|
|
160
|
+
if (args.wallet)
|
|
161
|
+
params.set("wallet", args.wallet);
|
|
162
|
+
if (args.solanaWallet)
|
|
163
|
+
params.set("solanaWallet", args.solanaWallet);
|
|
164
|
+
const result = await apiCall("GET", `/discount/check?${params.toString()}`);
|
|
165
|
+
return formatResult(result);
|
|
166
|
+
});
|
|
167
|
+
// ============================================================
|
|
168
|
+
// CREDITS
|
|
169
|
+
// ============================================================
|
|
170
|
+
server.tool("insumer_credits", "Check verification credit balance, tier (free/pro/enterprise), and daily rate limit for the current API key.", {}, async () => {
|
|
171
|
+
const result = await apiCall("GET", "/credits");
|
|
172
|
+
return formatResult(result);
|
|
173
|
+
});
|
|
174
|
+
server.tool("insumer_buy_credits", "Buy verification credits with USDC. Rate: 25 credits per 1 USDC. Minimum: 5 USDC. Send USDC first, then provide the transaction hash.", {
|
|
175
|
+
txHash: z.string().describe("USDC transaction hash"),
|
|
176
|
+
chainId: UsdcChainId,
|
|
177
|
+
amount: z.number().min(5).describe("USDC amount sent (minimum 5)"),
|
|
178
|
+
}, async (args) => {
|
|
179
|
+
const result = await apiCall("POST", "/credits/buy", args);
|
|
180
|
+
return formatResult(result);
|
|
181
|
+
});
|
|
182
|
+
server.tool("insumer_confirm_payment", "Confirm USDC payment for a discount code. After calling insumer_verify, confirm that the USDC payment was made on-chain. The server verifies the transaction receipt.", {
|
|
183
|
+
code: z.string().describe("Verification code from insumer_verify (e.g. INSR-A7K3M)"),
|
|
184
|
+
txHash: z.string().describe("On-chain transaction hash or Solana signature"),
|
|
185
|
+
chainId: UsdcChainId,
|
|
186
|
+
amount: z.union([z.string(), z.number()]).describe("USDC amount sent"),
|
|
187
|
+
}, async (args) => {
|
|
188
|
+
const result = await apiCall("POST", "/payment/confirm", args);
|
|
189
|
+
return formatResult(result);
|
|
190
|
+
});
|
|
191
|
+
// ============================================================
|
|
192
|
+
// MERCHANT ONBOARDING
|
|
193
|
+
// ============================================================
|
|
194
|
+
server.tool("insumer_create_merchant", "Create a new merchant. Receives 100 free verification credits. The API key that creates the merchant owns it. Max 10 merchants per API key.", {
|
|
195
|
+
companyName: z.string().max(100).describe("Company display name"),
|
|
196
|
+
companyId: z
|
|
197
|
+
.string()
|
|
198
|
+
.min(2)
|
|
199
|
+
.max(50)
|
|
200
|
+
.regex(/^[a-zA-Z0-9_-]+$/)
|
|
201
|
+
.describe("Unique merchant ID (alphanumeric, dashes, underscores)"),
|
|
202
|
+
location: z.string().max(200).optional().describe("City or region"),
|
|
203
|
+
}, async (args) => {
|
|
204
|
+
const result = await apiCall("POST", "/merchants", args);
|
|
205
|
+
return formatResult(result);
|
|
206
|
+
});
|
|
207
|
+
server.tool("insumer_merchant_status", "Get full private merchant details: credits, token configs, NFT collections, directory status, verification status, USDC settings. Owner only.", {
|
|
208
|
+
id: z.string().describe("Merchant ID"),
|
|
209
|
+
}, async (args) => {
|
|
210
|
+
const result = await apiCall("GET", `/merchants/${encodeURIComponent(args.id)}/status`);
|
|
211
|
+
return formatResult(result);
|
|
212
|
+
});
|
|
213
|
+
server.tool("insumer_configure_tokens", "Configure merchant token discount tiers. Set own token and/or partner tokens. Max 8 tokens total. Owner only.", {
|
|
214
|
+
id: z.string().describe("Merchant ID"),
|
|
215
|
+
ownToken: TokenConfigSchema.nullable()
|
|
216
|
+
.optional()
|
|
217
|
+
.describe("Merchant's own token configuration, or null to remove"),
|
|
218
|
+
partnerTokens: z
|
|
219
|
+
.array(TokenConfigSchema)
|
|
220
|
+
.optional()
|
|
221
|
+
.describe("Partner token configurations"),
|
|
222
|
+
}, async (args) => {
|
|
223
|
+
const { id, ...body } = args;
|
|
224
|
+
const result = await apiCall("PUT", `/merchants/${encodeURIComponent(id)}/tokens`, body);
|
|
225
|
+
return formatResult(result);
|
|
226
|
+
});
|
|
227
|
+
server.tool("insumer_configure_nfts", "Configure NFT collections that grant discounts at the merchant. Max 4 collections. Owner only.", {
|
|
228
|
+
id: z.string().describe("Merchant ID"),
|
|
229
|
+
nftCollections: z
|
|
230
|
+
.array(NftCollectionSchema)
|
|
231
|
+
.min(0)
|
|
232
|
+
.max(4)
|
|
233
|
+
.describe("NFT collection configurations (0-4)"),
|
|
234
|
+
}, async (args) => {
|
|
235
|
+
const { id, ...body } = args;
|
|
236
|
+
const result = await apiCall("PUT", `/merchants/${encodeURIComponent(id)}/nfts`, body);
|
|
237
|
+
return formatResult(result);
|
|
238
|
+
});
|
|
239
|
+
server.tool("insumer_configure_settings", "Update merchant settings: discount stacking mode, cap, and USDC payment configuration. All fields optional. Owner only.", {
|
|
240
|
+
id: z.string().describe("Merchant ID"),
|
|
241
|
+
discountMode: z
|
|
242
|
+
.enum(["highest", "stack"])
|
|
243
|
+
.optional()
|
|
244
|
+
.describe("'highest' uses best single discount, 'stack' adds them together"),
|
|
245
|
+
discountCap: z
|
|
246
|
+
.number()
|
|
247
|
+
.int()
|
|
248
|
+
.min(1)
|
|
249
|
+
.max(100)
|
|
250
|
+
.optional()
|
|
251
|
+
.describe("Maximum total discount percentage (1-100)"),
|
|
252
|
+
usdcPayment: z
|
|
253
|
+
.object({
|
|
254
|
+
enabled: z.boolean().describe("Enable or disable USDC payments"),
|
|
255
|
+
evmAddress: z.string().optional().describe("EVM wallet for USDC (0x...)"),
|
|
256
|
+
solanaAddress: z.string().optional().describe("Solana wallet for USDC"),
|
|
257
|
+
preferredChainId: UsdcChainId.optional().describe("Preferred USDC chain"),
|
|
258
|
+
})
|
|
259
|
+
.nullable()
|
|
260
|
+
.optional()
|
|
261
|
+
.describe("USDC payment settings, or null to disable"),
|
|
262
|
+
}, async (args) => {
|
|
263
|
+
const { id, ...body } = args;
|
|
264
|
+
const result = await apiCall("PUT", `/merchants/${encodeURIComponent(id)}/settings`, body);
|
|
265
|
+
return formatResult(result);
|
|
266
|
+
});
|
|
267
|
+
server.tool("insumer_publish_directory", "Publish (or refresh) the merchant's listing in the public directory. Call again after updating tokens or settings. Owner only.", {
|
|
268
|
+
id: z.string().describe("Merchant ID"),
|
|
269
|
+
}, async (args) => {
|
|
270
|
+
const result = await apiCall("POST", `/merchants/${encodeURIComponent(args.id)}/directory`, {});
|
|
271
|
+
return formatResult(result);
|
|
272
|
+
});
|
|
273
|
+
server.tool("insumer_buy_merchant_credits", "Buy merchant verification credits with USDC. Rate: 25 credits per 1 USDC ($0.04/credit). Minimum: 5 USDC. Owner only.", {
|
|
274
|
+
id: z.string().describe("Merchant ID"),
|
|
275
|
+
txHash: z.string().describe("USDC transaction hash"),
|
|
276
|
+
chainId: UsdcChainId,
|
|
277
|
+
amount: z.number().min(5).describe("USDC amount sent (minimum 5)"),
|
|
278
|
+
}, async (args) => {
|
|
279
|
+
const { id, ...body } = args;
|
|
280
|
+
const result = await apiCall("POST", `/merchants/${encodeURIComponent(id)}/credits`, body);
|
|
281
|
+
return formatResult(result);
|
|
282
|
+
});
|
|
283
|
+
// --- Start server ---
|
|
284
|
+
async function main() {
|
|
285
|
+
const transport = new StdioServerTransport();
|
|
286
|
+
await server.connect(transport);
|
|
287
|
+
}
|
|
288
|
+
main().catch((err) => {
|
|
289
|
+
console.error("Fatal error:", err);
|
|
290
|
+
process.exit(1);
|
|
291
|
+
});
|
|
292
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,QAAQ,GAAG,uEAAuE,CAAC;AAEzF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;IACZ,OAAO,CAAC,KAAK,CAAC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AAa,CAAC;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACpD,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8BAA8B,CAAC;CACnE,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;IACb,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAC7B,MAAM,MAAM,GAAG,MAAM,OAAO,CAC1B,MAAM,EACN,cAAc,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAC9C,IAAI,CACL,CAAC;IACF,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC,CACF,CAAC;AAEF,uBAAuB;AAEvB,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-server-insumer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for InsumerAPI — on-chain token verification across 31 blockchains",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Douglas Borthwick",
|
|
7
|
+
"homepage": "https://insumermodel.com/developers/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/douglasborthwick-crypto/mcp-server-insumer"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"mcp-server",
|
|
15
|
+
"insumer",
|
|
16
|
+
"blockchain",
|
|
17
|
+
"token-verification",
|
|
18
|
+
"attestation",
|
|
19
|
+
"ecdsa",
|
|
20
|
+
"web3",
|
|
21
|
+
"ai-agents"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"bin": {
|
|
25
|
+
"mcp-server-insumer": "build/index.js"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"build",
|
|
29
|
+
"server.json"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"start": "node build/index.js",
|
|
34
|
+
"prepare": "npm run build"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
38
|
+
"zod": "^3.24.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^20.0.0",
|
|
42
|
+
"typescript": "^5.8.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18.0.0"
|
|
46
|
+
}
|
|
47
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "io.github.douglasborthwick-crypto/insumer",
|
|
3
|
+
"description": "On-chain token verification across 31 blockchains. ECDSA-signed boolean attestations, discount code generation, merchant onboarding — full autonomous agent workflow.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"packages": [
|
|
6
|
+
{
|
|
7
|
+
"registry_type": "npm",
|
|
8
|
+
"identifier": "mcp-server-insumer",
|
|
9
|
+
"version": "1.0.0"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|