@gblin-protocol/mcp-server 0.5.2 → 0.6.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/README.md CHANGED
@@ -50,6 +50,25 @@ Fees: 0.10% on every mint with ETH or WETH (0.05% stays in the vault and lifts t
50
50
 
51
51
  A stateless Streamable HTTP server runs at `https://gblin-mcp.gblin-mcp-worker.workers.dev/mcp` — no install, no auth, no session, 60 requests per minute per IP. It serves the vault, action and payment tools of this package under two-level names (`treasury.*`, `actions.*`, `payments.*`, `governance.state`, `auction.state`, `attestation.verify`), built from the same source, plus the risk, receipts and coherence tools; the snake_case names below are accepted there as aliases. GET-only audit surfaces: [`/meta`](https://gblin-mcp.gblin-mcp-worker.workers.dev/meta), [`/tools.json`](https://gblin-mcp.gblin-mcp-worker.workers.dev/tools.json), [`/resources.json`](https://gblin-mcp.gblin-mcp-worker.workers.dev/resources.json), [`/conformance`](https://gblin-mcp.gblin-mcp-worker.workers.dev/conformance). Also listed on [Smithery](https://smithery.ai/servers/gblin-protocol/mcp).
52
52
 
53
+ ## Agent treasury (library and CLI)
54
+
55
+ `packages/agent-treasury` — npm `@gblin-protocol/agent-treasury`. Operating cash stays in USDC, the surplus above a
56
+ reserve is parked in GBLIN, and USDC is pulled back from GBLIN just in time when an x402 invoice arrives. The x402 client is
57
+ Coinbase's reference `x402Client` with the refill attached to its `onBeforePaymentCreation` hook, so a 402 for USDC on Base
58
+ triggers the refill before the authorization is signed and a price above the cap is refused before anything is signed.
59
+ Self-custody, no key leaves the process. Verified end to end on a fork of Base (24 checks: park, refill, cooldown, a
60
+ mock invoice with the challenge bytes of gblin.digital and a verified EIP-712 signature, the cap).
61
+
62
+ ```bash
63
+ export GBLIN_AGENT_PRIVATE_KEY=0x...
64
+ npx @gblin-protocol/agent-treasury status --json
65
+ npx @gblin-protocol/agent-treasury park --json
66
+ npx @gblin-protocol/agent-treasury pay https://gblin.digital/api/x402/attestation --max-amount 3000 --json
67
+ ```
68
+
69
+ The matching agent skill is `skills/gblin-agent-treasury` (`npx skills add gblinproject/gblin-treasury-risk-regime`).
70
+ Details: [packages/agent-treasury/README.md](packages/agent-treasury/README.md).
71
+
53
72
  ## API
54
73
 
55
74
  ### Tools
@@ -89,6 +108,16 @@ A stateless Streamable HTTP server runs at `https://gblin-mcp.gblin-mcp-worker.w
89
108
  - `wallet_address` (string)
90
109
  - `daily_burn_usd` (number, optional): average daily spend, enables the runway estimate
91
110
 
111
+ - **plan_treasury**
112
+ - Idle USDC to a reviewable plan in one call: the operating cash to keep liquid (`max(reserve_usd, daily_burn_usd × days)`), the surplus above it, a simulation of minting that surplus at NAV with every fee read live and the estimated value of exiting the same position today (round-trip cost included), the same simulation for a trial amount, the blockers (crash shield, cooldown, ETH for the exit) and the tools to call after a human confirms. Reads only; nothing is executed and nothing is advised
113
+ - Inputs:
114
+ - `wallet_address` (string)
115
+ - `daily_burn_usd` (number, optional): average daily spend in USD
116
+ - `days` (number, optional): days of spend to keep liquid, default 7
117
+ - `reserve_usd` (number, optional): USD to keep liquid regardless of the burn rate; one of `daily_burn_usd` or `reserve_usd` is required
118
+ - `trial_usdc` (number, optional): trial amount to simulate beside the surplus, default 100
119
+ - The same plan is served over HTTP at `https://gblin.digital/api/x402/plan`
120
+
92
121
  - **get_governance_state**
93
122
  - Owner and pending owner of the vault, the fee recipient, the timelock's minimum delay and roles, and, when the pending owner is the timelock, the deterministic id and state of the scheduled `acceptOwnership` operation
94
123
  - Inputs:
@@ -289,12 +318,12 @@ Pay-per-call data lives on HTTP, settled in USDC on Base through the Coinbase CD
289
318
 
290
319
  | Endpoint | Price | Returns |
291
320
  |---|---|---|
292
- | `GET gblin.digital/api/x402/treasury-state` | $0.001 | NAV, basket weights, Crash Shield status |
293
- | `GET gblin.digital/api/x402/quote` | $0.001 | Mint or redemption preview with the dynamic slippage buffer |
294
- | `GET gblin.digital/api/x402/governance` | $0.001 | Owner, timelock, pending operations |
295
- | `GET gblin.digital/api/x402/health` | $0.002 | Wallet balances, gas runway, allocation advice |
296
- | `GET gblin.digital/api/x402/invest` | $0.002 | Unsigned calldata: USDC → GBLIN |
297
- | `GET gblin.digital/api/x402/jit` | $0.005 | Unsigned calldata: GBLIN → USDC just in time |
321
+ | `GET gblin.digital/api/x402/treasury-state` | free | NAV, basket weights, Crash Shield status |
322
+ | `GET gblin.digital/api/x402/quote` | free | Mint or redemption preview with the dynamic slippage buffer |
323
+ | `GET gblin.digital/api/x402/governance` | free | Owner, timelock, pending operations |
324
+ | `GET gblin.digital/api/x402/health` | free | Wallet balances, gas runway, allocation advice |
325
+ | `GET gblin.digital/api/x402/invest` | free | Unsigned calldata: USDC → GBLIN |
326
+ | `GET gblin.digital/api/x402/jit` | free | Unsigned calldata: GBLIN → USDC just in time |
298
327
  | `GET gblin.digital/api/x402/attestation` | $0.003 | Signed EIP-712 Risk Attestation, valid ten minutes |
299
328
  | `POST gblin.digital/api/x402/seal` | $0.0045 | A sealed AI Action Receipt |
300
329