@gblin-protocol/mcp-server 0.3.1 → 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 +10 -8
- package/README.md +194 -374
- package/dist/abi.d.ts +541 -74
- package/dist/abi.d.ts.map +1 -1
- package/dist/abi.js +56 -25
- package/dist/abi.js.map +1 -1
- package/dist/auction.d.ts +81 -0
- package/dist/auction.d.ts.map +1 -0
- package/dist/auction.js +161 -0
- package/dist/auction.js.map +1 -0
- package/dist/client.d.ts +12 -12
- package/dist/config.d.ts +6 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -9
- package/dist/config.js.map +1 -1
- package/dist/helpers.d.ts +3 -7
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +34 -34
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/init.js +2 -2
- package/dist/paywall.d.ts.map +1 -1
- package/dist/paywall.js +1 -2
- package/dist/paywall.js.map +1 -1
- package/dist/receipts.d.ts +8 -0
- package/dist/receipts.d.ts.map +1 -1
- package/dist/receipts.js +5 -6
- package/dist/receipts.js.map +1 -1
- package/dist/tools.d.ts +28 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +184 -149
- package/dist/tools.js.map +1 -1
- package/llms.txt +56 -40
- package/package.json +1 -1
- package/dist/keeper.d.ts +0 -16
- package/dist/keeper.d.ts.map +0 -1
- package/dist/keeper.js +0 -180
- package/dist/keeper.js.map +0 -1
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
|
|
14
|
-
agent read live treasury state
|
|
15
|
-
|
|
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
|
|
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 `
|
|
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
|
|
117
|
-
|
|
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`
|