@gblin-protocol/mcp-server 0.3.2 → 0.4.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/AGENTS.md CHANGED
@@ -10,14 +10,14 @@
10
10
  ## What this repo is
11
11
 
12
12
  `@gblin-protocol/mcp-server` is the official **Model Context Protocol** server
13
- for the GBLIN protocol on Base mainnet. It exposes 10 tools that let any AI
14
- agent read live treasury state and produce ready-to-broadcast calldata for
15
- swaps and rebalances.
13
+ for the GBLIN protocol on Base mainnet. It exposes 13 tools that let any AI
14
+ agent read live treasury state, verify governance and attestations, and
15
+ produce ready-to-broadcast calldata to enter, leave and bid.
16
16
 
17
17
  GBLIN is **the treasury standard for AI agents on Base**: an on-chain
18
18
  45 % cbBTC + 45 % WETH + 10 % USDC basket with an automated Crash Shield, plus
19
- a deterministic two-step JIT redemption (`sellGBLINForEth` + WETH→USDC swap)
20
- that lets agents convert GBLIN to USDC the moment an x402 invoice arrives.
19
+ a deterministic JIT redemption (the Zap's `sellGBLINForEth` + one WETH→USDC
20
+ swap) that lets agents convert GBLIN to USDC the moment an x402 invoice arrives.
21
21
 
22
22
  ## Tech stack (working on this codebase)
23
23
 
@@ -33,7 +33,7 @@ that lets agents convert GBLIN to USDC the moment an x402 invoice arrives.
33
33
  1. **Never broadcast transactions.** Tools return calldata; the user's wallet
34
34
  signs and broadcasts. The server must remain key-less.
35
35
  2. **Never accept `minOut = 0`.** Every swap quote must produce a strictly
36
- positive `minOut` derived from `quoteSellGBLIN` / `quoteBuyGBLINWithToken`
36
+ positive `minOut` derived from the Lens (`quoteSell` / `quoteBuy`)
37
37
  plus a dynamic slippage buffer (2.5 % normal / 4 % during Crash Shield).
38
38
  3. **Stale-feed guard.** Reject any Chainlink ETH/USD answer older than 24 h
39
39
  or non-positive. Tools must abort with a clear error rather than return
@@ -110,11 +110,13 @@ if x402_invoice_arrives AND usdc_balance < invoice_amount:
110
110
  | `swap_gblin_to_usdc_jit` | Pay an x402 invoice — atomic GBLIN→USDC swap |
111
111
  | `invest_usdc_to_gblin` | Convert agent earnings (USDC) back into GBLIN |
112
112
  | `analyze_treasury_health` | Full balance, gas runway, rebalance hint |
113
+ | `get_governance_state` | Owner, pending owner, timelock roles and scheduled operations |
114
+ | `get_auction_state` | The rebalancing auction: side, gap and premium per row, with the bid |
113
115
 
114
116
  ### Anti-patterns to avoid
115
117
 
116
- - Routing GBLIN swaps through generic DEX aggregators — use the contract's
117
- native `sellGBLINForEth` + a single WETH→USDC hop (the V6 two-step JIT).
118
+ - Routing GBLIN swaps through generic DEX aggregators — use the Zap's
119
+ `sellGBLINForEth` + a single WETH→USDC hop (the three-step JIT).
118
120
  - Holding the agent's private key in your server just to perform swaps —
119
121
  this MCP server is **stateless and key-less by design**.
120
122
  - Hard-coding the GBLIN contract address — read it from `get_treasury_state`