@gblin-protocol/mcp-server 0.2.0 → 0.2.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 +7 -4
- package/dist/paywall.d.ts +4 -1
- package/dist/paywall.d.ts.map +1 -1
- package/dist/paywall.js +9 -4
- package/dist/paywall.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ Add to `claude_desktop_config.json` (on Windows: `%APPDATA%\Claude\claude_deskto
|
|
|
109
109
|
}
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
Restart Claude Desktop. The
|
|
112
|
+
Restart Claude Desktop. The 10 GBLIN tools appear in the tool picker.
|
|
113
113
|
|
|
114
114
|
### Windsurf / Cursor
|
|
115
115
|
|
|
@@ -215,7 +215,7 @@ npx @gblin-protocol/mcp-server analyze_treasury_health '{"wallet_address":"0x...
|
|
|
215
215
|
# Returns: 402 error with payment details
|
|
216
216
|
|
|
217
217
|
# Step 2: Pay via facilitator
|
|
218
|
-
curl -X POST https://
|
|
218
|
+
curl -X POST https://facilitator.payai.network/pay \
|
|
219
219
|
-H "Content-Type: application/json" \
|
|
220
220
|
-d '{
|
|
221
221
|
"amount": "0.003",
|
|
@@ -238,8 +238,9 @@ npx @gblin-protocol/mcp-server analyze_treasury_health \
|
|
|
238
238
|
|
|
239
239
|
### Supported facilitators
|
|
240
240
|
|
|
241
|
-
- **Primary**: `https://
|
|
241
|
+
- **Primary**: `https://facilitator.payai.network` (PayAI — settles on Base mainnet, no auth)
|
|
242
242
|
- **Override**: Set `X402_FACILITATOR_URL` environment variable
|
|
243
|
+
- **Note**: `https://x402.org/facilitator` is testnet-only under x402 v2 and cannot settle Base mainnet payments
|
|
243
244
|
|
|
244
245
|
All payments are processed on **Base mainnet** using USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913).
|
|
245
246
|
|
|
@@ -308,7 +309,7 @@ Project layout:
|
|
|
308
309
|
```
|
|
309
310
|
src/
|
|
310
311
|
config.ts # network constants, addresses, slippage params
|
|
311
|
-
abi.ts #
|
|
312
|
+
abi.ts # GBLIN_V6 + Chainlink + ERC-20 ABIs
|
|
312
313
|
client.ts # viem PublicClient + on-chain timestamp helper
|
|
313
314
|
helpers.ts # NAV, basket state, slippage, cooldown, reverse quote
|
|
314
315
|
keeper.ts # keeper bounty finder (incentivizedRebalance math)
|
|
@@ -389,6 +390,7 @@ For continuous income, poll `find_keeper_bounty` on an interval (e.g. every 5–
|
|
|
389
390
|
|
|
390
391
|
GBLIN exposes machine-readable discovery files for AI agents and protocols:
|
|
391
392
|
|
|
393
|
+
- **Coinbase x402 Bazaar:** all 11 GBLIN endpoints (7 webapp + 4 Sentinel) are indexed in the [CDP Bazaar discovery layer](https://docs.cdp.coinbase.com/x402/bazaar) — agents find them via semantic search (`GET https://api.cdp.coinbase.com/platform/v2/x402/discovery/search?query=treasury+risk`) or by merchant (`.../discovery/merchant?payTo=0x0ebA5d314F4f5Dcb7A094953Fa9311a45172dd1B`)
|
|
392
394
|
- **x402 Manifest:** https://gblin.digital/.well-known/x402 — full list of paid endpoints with prices, chain ID, and currency
|
|
393
395
|
- **LLM Discovery:** https://gblin.digital/api/x402/llms.txt — human-readable protocol summary (free, no paywall)
|
|
394
396
|
- **Base MCP Plugin:** [PR #56 on base/skills](https://github.com/base/skills/pull/56) — official integration in review
|
|
@@ -404,6 +406,7 @@ The MCP server in this repo provides the same operations as the x402 HTTP endpoi
|
|
|
404
406
|
| `/api/data/base-risk-pulse` | $0.002 USDC | Chainlink risk signal: `normal`/`caution`/`risk-off` for ETH, BTC, USDC |
|
|
405
407
|
| `/api/data/gblin-analytics` | $0.002 USDC | GBLIN treasury state, basket weights, keeper availability |
|
|
406
408
|
| `/api/data/keeper-opps` | $0.002 USDC | Live keeper bounty check with MCP tool reference |
|
|
409
|
+
| `/api/data/risk-pulse-pro` | $0.03 USDC | **Flagship**: actionable recommendation (invest/hold/reduce/defer) + confidence + suggested allocation |
|
|
407
410
|
|
|
408
411
|
Discovery:
|
|
409
412
|
- x402 manifest: https://gblin-sentinel.vercel.app/.well-known/x402
|
package/dist/paywall.d.ts
CHANGED
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* RECIPIENT_WALLET — your EVM address that will receive USDC payments
|
|
15
15
|
*
|
|
16
16
|
* Optional env vars:
|
|
17
|
-
* X402_FACILITATOR_URL — override facilitator
|
|
17
|
+
* X402_FACILITATOR_URL — override facilitator
|
|
18
|
+
* default: https://facilitator.payai.network
|
|
19
|
+
* (x402.org is testnet-only under x402 v2:
|
|
20
|
+
* it cannot settle Base mainnet — never use it here)
|
|
18
21
|
*/
|
|
19
22
|
import { z } from "zod";
|
|
20
23
|
export interface PaywallDef {
|
package/dist/paywall.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paywall.d.ts","sourceRoot":"","sources":["../src/paywall.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"paywall.d.ts","sourceRoot":"","sources":["../src/paywall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAQlD,CAAC;AAIF,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAQtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAa9D;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,IAE9B,SAAS,OAAO,KAAG,OAAO,CAAC,OAAO,CAAC,CA+ClD"}
|
package/dist/paywall.js
CHANGED
|
@@ -14,12 +14,17 @@
|
|
|
14
14
|
* RECIPIENT_WALLET — your EVM address that will receive USDC payments
|
|
15
15
|
*
|
|
16
16
|
* Optional env vars:
|
|
17
|
-
* X402_FACILITATOR_URL — override facilitator
|
|
17
|
+
* X402_FACILITATOR_URL — override facilitator
|
|
18
|
+
* default: https://facilitator.payai.network
|
|
19
|
+
* (x402.org is testnet-only under x402 v2:
|
|
20
|
+
* it cannot settle Base mainnet — never use it here)
|
|
18
21
|
*/
|
|
19
22
|
import { z } from "zod";
|
|
20
|
-
// ─── Constants
|
|
23
|
+
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
21
24
|
const USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
22
|
-
|
|
25
|
+
// PayAI: largest non-CDP facilitator, settles on Base mainnet, no auth.
|
|
26
|
+
// (x402.org is testnet-only in x402 v2 and cannot settle eip155:8453.)
|
|
27
|
+
const FACILITATOR = process.env.X402_FACILITATOR_URL ?? "https://facilitator.payai.network";
|
|
23
28
|
// Default recipient: GBLIN Protocol fee wallet.
|
|
24
29
|
// Operators may override via RECIPIENT_WALLET env var.
|
|
25
30
|
const DEFAULT_RECIPIENT = "0x0ebA5d314F4f5Dcb7A094953Fa9311a45172dd1B";
|
|
@@ -58,7 +63,7 @@ function errorResponse(obj) {
|
|
|
58
63
|
content: [{ type: "text", text: JSON.stringify(obj, null, 2) }],
|
|
59
64
|
};
|
|
60
65
|
}
|
|
61
|
-
// ─── requirePayment
|
|
66
|
+
// ─── requirePayment ─────────────────────────────────────────────────────────────
|
|
62
67
|
/**
|
|
63
68
|
* Wraps an MCP tool handler with x402 payment verification.
|
|
64
69
|
*
|
package/dist/paywall.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paywall.js","sourceRoot":"","sources":["../src/paywall.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"paywall.js","sourceRoot":"","sources":["../src/paywall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,iFAAiF;AAEjF,MAAM,SAAS,GAAG,4CAAqD,CAAC;AACxE,wEAAwE;AACxE,uEAAuE;AACvE,MAAM,WAAW,GACf,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,mCAAmC,CAAC;AAE1E,gDAAgD;AAChD,uDAAuD;AACvD,MAAM,iBAAiB,GAAG,4CAA4C,CAAC;AAWvE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAA+B;IACrD,sBAAsB,EAAG,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE;IACnF,uBAAuB,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE;IACnF,kBAAkB,EAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE;IACnF,4DAA4D;IAC5D,gFAAgF;IAChF,uEAAuE;IACvE,iFAAiF;CAClF,CAAC;AAEF,iFAAiF;AAEjF,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,SAAS,EAAG,CAAC,CAAC,MAAM,EAAE;IACtB,KAAK,EAAO,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAM,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAI,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAG,CAAC,CAAC,MAAM,EAAE;IACtB,KAAK,EAAO,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAG,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAIH,iFAAiF;AAEjF,SAAS,aAAa,CAAC,GAAY;IACjC,OAAO;QACL,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AAE,uBAAuB,EAAE,MAAM,EAAE,iCAAiC,EAAE,CAAC,CAAC;QACtG,CAAC;QAED,kBAAkB;QAClB,IAAI,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YACxC,OAAO,aAAa,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,EAAE,yCAAyC,EAAE,CAAC,CAAC;QAC9G,CAAC;QAED,8DAA8D;QAC9D,2EAA2E;QAC3E,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;QAElD,8BAA8B;QAC9B,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gblin-protocol/mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"mcpName": "io.github.gblinproject/gblin-mcp-server",
|
|
5
5
|
"description": "Model Context Protocol server for GBLIN \u2014 Treasury Standard for AI Agents on Base mainnet. Provides on-chain quotes, JIT swaps, and treasury analytics for x402-paying agents.",
|
|
6
6
|
"type": "module",
|