mcp-server-insumer 1.5.1 → 1.5.2
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 +90 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Enables AI agents (Claude Desktop, Cursor, Windsurf, and any MCP-compatible clie
|
|
|
6
6
|
|
|
7
7
|
**In production:** [DJD Agent Score](https://github.com/jacobsd32-cpu/djdagentscore) (Coinbase x402 ecosystem) uses InsumerAPI for AI agent wallet trust scoring. [Case study](https://insumermodel.com/blog/djd-agent-score-insumer-api-integration.html).
|
|
8
8
|
|
|
9
|
-
Also available as: [LangChain](https://pypi.org/project/langchain-insumer/) (
|
|
9
|
+
Also available as: [LangChain](https://pypi.org/project/langchain-insumer/) (25 tools, PyPI) | [OpenAI GPT](https://chatgpt.com/g/g-699c5e43ce2481918b3f1e7f144c8a49-insumerapi-verify) (GPT Store) | [insumer-verify](https://www.npmjs.com/package/insumer-verify) (client-side verification, npm)
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
@@ -44,13 +44,93 @@ Add to your MCP settings:
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
### Get an API Key
|
|
48
48
|
|
|
49
49
|
1. Go to [insumermodel.com/developers](https://insumermodel.com/developers/#pricing)
|
|
50
50
|
2. Sign up for a free key (instant, no credit card)
|
|
51
51
|
3. Set it as `INSUMER_API_KEY`
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## What You Get Back
|
|
54
|
+
|
|
55
|
+
When your agent calls `insumer_attest`, you get an ECDSA-signed attestation:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"ok": true,
|
|
60
|
+
"data": {
|
|
61
|
+
"attestation": {
|
|
62
|
+
"id": "ATST-A7C3E",
|
|
63
|
+
"pass": true,
|
|
64
|
+
"results": [
|
|
65
|
+
{
|
|
66
|
+
"condition": 0,
|
|
67
|
+
"met": true,
|
|
68
|
+
"label": "USDC >= 1000 on Ethereum",
|
|
69
|
+
"type": "token_balance",
|
|
70
|
+
"chainId": 1,
|
|
71
|
+
"evaluatedCondition": {
|
|
72
|
+
"chainId": 1,
|
|
73
|
+
"contractAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
74
|
+
"decimals": 6,
|
|
75
|
+
"operator": "gte",
|
|
76
|
+
"threshold": 1000,
|
|
77
|
+
"type": "token_balance"
|
|
78
|
+
},
|
|
79
|
+
"conditionHash": "0x8a3b...",
|
|
80
|
+
"blockNumber": "0x129e3f7",
|
|
81
|
+
"blockTimestamp": "2026-02-28T12:34:56.000Z"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"passCount": 1,
|
|
85
|
+
"failCount": 0,
|
|
86
|
+
"attestedAt": "2026-02-28T12:34:57.000Z",
|
|
87
|
+
"expiresAt": "2026-02-28T13:04:57.000Z"
|
|
88
|
+
},
|
|
89
|
+
"sig": "MEUCIQD...(base64 ECDSA signature)...",
|
|
90
|
+
"kid": "insumer-attest-v1"
|
|
91
|
+
},
|
|
92
|
+
"meta": {
|
|
93
|
+
"version": "1.0",
|
|
94
|
+
"timestamp": "2026-02-28T12:34:57.000Z",
|
|
95
|
+
"creditsCharged": 1,
|
|
96
|
+
"creditsRemaining": 99
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The `sig` is an ECDSA P-256 signature over `{id, pass, results, attestedAt}`. The `kid` identifies which key signed it. The `conditionHash` is a SHA-256 of the exact condition logic that was evaluated.
|
|
102
|
+
|
|
103
|
+
No balances. No amounts. Just a cryptographically signed true/false.
|
|
104
|
+
|
|
105
|
+
## Verify the Response
|
|
106
|
+
|
|
107
|
+
Your agent gets the attestation. Your application should verify it. Install [insumer-verify](https://www.npmjs.com/package/insumer-verify):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm install insumer-verify
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
import { verifyAttestation } from "insumer-verify";
|
|
115
|
+
|
|
116
|
+
// attestationResponse = the JSON your agent received from insumer_attest
|
|
117
|
+
const result = await verifyAttestation(attestationResponse, {
|
|
118
|
+
jwksUrl: "https://insumermodel.com/.well-known/jwks.json",
|
|
119
|
+
maxAge: 120, // reject if block data is older than 2 minutes
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
if (result.valid) {
|
|
123
|
+
// Signature verified, condition hashes match, not expired
|
|
124
|
+
const pass = attestationResponse.data.attestation.pass;
|
|
125
|
+
console.log(`Attestation ${pass ? "passed" : "failed"} all conditions`);
|
|
126
|
+
} else {
|
|
127
|
+
console.log("Verification failed:", result.checks);
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
This runs 4 independent checks: ECDSA signature, condition hash integrity, block freshness, and attestation expiry. Zero runtime dependencies, uses Web Crypto API.
|
|
132
|
+
|
|
133
|
+
## Tools (25)
|
|
54
134
|
|
|
55
135
|
### Key Discovery (free)
|
|
56
136
|
|
|
@@ -97,6 +177,13 @@ Add to your MCP settings:
|
|
|
97
177
|
| `insumer_publish_directory` | Publish merchant to public directory. |
|
|
98
178
|
| `insumer_buy_merchant_credits` | Buy merchant verification credits with USDC. |
|
|
99
179
|
|
|
180
|
+
### Domain Verification (owner-only)
|
|
181
|
+
|
|
182
|
+
| Tool | Description |
|
|
183
|
+
|------|-------------|
|
|
184
|
+
| `insumer_request_domain_verification` | Request a verification token for a merchant's domain. Returns token and 3 methods (DNS TXT, meta tag, file upload). |
|
|
185
|
+
| `insumer_verify_domain` | Complete domain verification after placing the token. Verified merchants get a trust badge. |
|
|
186
|
+
|
|
100
187
|
### Commerce Protocol Integration
|
|
101
188
|
|
|
102
189
|
| Tool | Description |
|
|
@@ -111,15 +198,6 @@ Add to your MCP settings:
|
|
|
111
198
|
|
|
112
199
|
**Non-EVM**: Solana
|
|
113
200
|
|
|
114
|
-
## Example Agent Workflow
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
1. insumer_list_merchants → find merchants accepting UNI
|
|
118
|
-
2. insumer_check_discount → calculate discount for user's wallet
|
|
119
|
-
3. insumer_verify → generate discount code
|
|
120
|
-
4. insumer_confirm_payment → confirm USDC payment (if applicable)
|
|
121
|
-
```
|
|
122
|
-
|
|
123
201
|
## Development
|
|
124
202
|
|
|
125
203
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-server-insumer",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "MCP server for InsumerAPI — on-chain verification across 31 blockchains. ECDSA-signed booleans, wallet trust profiles, EAS attestations, Gitcoin Passport, Farcaster ID, staking positions, compliance templates, optional Merkle proofs, ACP/UCP commerce protocol integration, domain verification, 25 tools. Used by DJD Agent Score (Coinbase x402).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Douglas Borthwick",
|