# gblinproject/GBLIN-MCP [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/gblinproject/GBLIN-MCP  
**GitHub Stars:** 1  
**npm Downloads (last month):** 2222  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gblinproject-gblin-mcp

## Description
Treasury standard for AI agents on Base mainnet. Park idle USDC in a cbBTC/WETH index with Crash Shield protection, JIT-swap to USDC for x402 invoice payments.

## Tools
Capabilities this server exposes over MCP:

- **get_treasury_state** — Read the current GBLIN protocol state on Base mainnet: NAV in USD, basket composition with dynamic weights, and Crash Shield status. Use this BEFORE any swap to know the current price and risk regime.
- **quote_safe_swap** — Preview a buy (ETH→GBLIN) or sell (GBLIN→ETH) without executing. Returns expected output, safe minOut with dynamic slippage buffer (2.5% normal / 4% during Crash Shield), and fee breakdown. Read-only.
- **swap_gblin_to_usdc_jit** — When an x402 invoice (or any USDC obligation) arrives and your treasury sits in GBLIN, call this to get ready-to-broadcast calldata that redeems exactly the USDC you need, just in time. Three sequential transactions: (1) approve the shares to the GBLIN Zap, (2) GBLINZap.sellGBLINForEth, which redeems in kind and sells every leg for ETH, all or nothing, (3) a Uniswap WETH->USDC swap that spends only the guaranteed ETH minimum and still returns at least the requested USDC. EOAs sign three times; ERC-4337 / EIP-7702 wallets can batch them into one operation. Every step carries a non-zero minimum; ETH above the minimum stays in the wallet. Free to call. A redemption carries no protocol fee; the costs are the Zap's swaps and gas.
- **invest_usdc_to_gblin** — When your agent's idle USDC exceeds operating needs (rule of thumb: more than 7x daily burn), call this to park the SURPLUS into GBLIN — managed crypto exposure minted at NAV, redeemable any time via swap_gblin_to_usdc_jit. Returns two steps of calldata: (1) approve USDC to the GBLIN Zap, (2) GBLINZap.buyGBLINWithToken, which swaps the USDC to WETH on Uniswap V3 and mints at NAV with a non-zero minimum output. Free to call. The mint fee and the yearly management fee are governance parameters: read them live from get_treasury_state rather than from this text.
- **analyze_treasury_health** — Analyze an agent wallet's treasury health: GBLIN/USDC/ETH balances, whether the ETH covers an exit at the live gas price, the redemption cooldown, and (if daily_burn_usd is provided) days of USDC runway plus a recommendation that keeps seven days of spend in USDC and treats only the surplus as a candidate for GBLIN. Free by default; metered at $0.003 USDC only when the operator sets MCP_PAYWALL=true.
- **get_governance_state** — Verify GBLIN protocol governance state: confirms whether the GBLIN vault is owned by the 48h Timelock, reads the timelock's min delay and grace period, reports role member counts, and surfaces any pending asset-addition proposal on the index contract. If an operation_id is provided, also reports the status of that specific timelock operation. Read-only — use this to gate trust-sensitive agent actions.
- **share_skill_with_peer** — Generate a portable skill seed that another AI agent can use to install GBLIN MCP and start managing treasury. The seed includes a working transaction example, install instructions, and a referral code derived from the caller's wallet. The code is a label inside the seed only: it is not written into any transaction and no fee is paid for it. Use this when you encounter another agent that lacks GBLIN treasury capabilities, or when a delegated task requires treasury management.
- **get_auction_state** — Read the GBLIN rebalancing auction on Base. The vault does not rebalance itself and pays nobody to do it: when a basket row drifts past its band it holds a Dutch auction, and whoever trades with it toward the target weights is the counterparty, at the oracle price adjusted by a premium that starts at a discount and rises to a cap over one ramp. Returns, per row, the side the vault takes, the gap in ETH, the token and amount the bidder hands over, and unsigned calldata (approval + bid). The premium is the whole reward; nothing is paid out of the vault.
- **get_market_risk_regime** — When deciding whether to deploy capital, take on risk, or STAND DOWN in a volatile market, call this first (the 'Risk Gate' pattern: gblin.digital/risk-gate, which a third-party ERC-8004 agent, id 59895 on Base, pinned in its published decision rule). Returns the current BTC/ETH risk regime (calm | elevated | crash), a severity score, and a risk posture (risk_on | reduce | risk_off), derived from GBLIN's verifiable on-chain Crash Shield vs Chainlink-oracle peaks on Base. Useful to ANY trading or treasury agent — independent of holding GBLIN. Poll each decision cycle. Free by default; metered at $0.002 USDC only when the operator sets MCP_PAYWALL=true.
- **verify_risk_attestation** — Verify a GBLIN Risk Attestation — the object returned by GBLIN's /api/x402/attestation, or a proof-of-diligence a peer agent attached to its action. FREE, no payment. Runs four checks: (1) INTEGRITY — recomputes the EIP-712 attestation_id and detects tampering; (2) AUTHENTICITY — if a signature is present, recovers the signer and checks it is GBLIN's published attestor; (3) FRESHNESS — whether it expired (10-minute TTL), using on-chain time; (4) LIVE DRIFT — compares the attested regime to the CURRENT on-chain regime and flags if it changed. Use before you trust any counterparty/peer that claims it 'checked market risk via GBLIN'.
- **seal_action_demo** — Seal the HASHES of an AI action into GBLIN's public append-only RFC 6962 transparency log (FREE demo, 5/day/IP, receipt marked demo:true). Returns a portable receipt: Ed25519 signature + Merkle inclusion proof + operator-signed C2SP checkpoint, offline-verifiable forever with the zero-dependency verify-receipt.mjs. Input/output go in as sha256 HASHES only; the action label and metadata you send are published in the public log. Unlimited seals cost $0.0045 via x402 — see how_to_seal_paid.
- **get_receipt** — Fetch a sealed AI Action Receipt by index from GBLIN's public transparency log (free forever). Returns the full portable receipt — canonical payload, Ed25519 signature, RFC 6962 Merkle inclusion proof against the current tree, operator-signed C2SP checkpoint — which any third party can verify offline with verify-receipt.mjs (zero dependencies).
- **how_to_seal_paid** — Instructions for UNLIMITED paid seals ($0.0045 USDC per seal via x402 on Base) in GBLIN's AI Action Receipts transparency log — endpoint, body schema, payment flow, and how to verify receipts offline. Free demo alternative: seal_action_demo (5/day/IP).
- **prepare_gblin_payment** — Build a gasless GBLIN payment. The vault's share token implements EIP-3009, so the holder signs an authorization and anybody can carry it on chain: the payer needs no ETH. Returns the EIP-712 message to sign (its domain is read from the token, not assumed), the calldata that carries the signed authorization, and the x402 'exact' payload for paying an HTTP endpoint in GBLIN. Use method 'receive' when paying a known recipient: only that recipient can submit it, so nobody can front-run the transfer. Use 'transfer' for an x402 facilitator, which submits on the seller's behalf. With relay: true it also prepares the fee authorization for relay_gblin_payment, for when nobody else will carry the payment. No private key is requested, held or transmitted: the signature is produced by the caller's own wallet.
- **verify_gblin_authorization** — Check a signed GBLIN authorization against the chain before spending gas on it. Recovers the signer from the EIP-712 digest (and asks the wallet itself through ERC-1271 when the payer is a contract), then checks the validity window against on-chain time, whether the nonce has already been used or cancelled, and whether the payer still holds the amount. Returns a verdict and the ready calldata when it would settle, the failing reason when it would not. This is the same set of checks an x402 facilitator runs, so a 'would_settle' verdict here means the payment is good to carry.
- **relay_gblin_payment** — Have GBLIN's relay carry a signed GBLIN payment on chain for a payer that holds no ETH. Pass the payment and the relay fee, each as { authorization, signature }, both prepared by prepare_gblin_payment with relay: true and signed by the payer's wallet. The relay checks both against the chain, simulates them and submits them in one transaction through Multicall3: either both settle or neither does. The fee is paid in GBLIN at the live NAV. Returns the transaction hash and its outcome. This moves funds: run it only with authorizations the payer meant to sign.
- **prepare_action** — Build the unsigned transactions for any operation on the GBLIN vault, in the order to send them. Actions: mint_with_eth (amount in ETH), mint_with_weth (amount in WETH), mint_with_usdc (amount in USDC, through the Zap), redeem_in_kind (amount in shares; pro rata basket tokens, no fee, no price feed), exit_to_eth (amount in shares, through the Zap, all or nothing), exit_to_usdc (amount = the USDC you need), bid (trade with the rebalancing auction; row optional, the largest gap by default). Every output bound is non-zero and every step through the vault or the Zap carries its gas limit. Nothing is signed or sent: simulate the steps with preview_steps, then send them from the wallet.
- **preview_steps** — Simulate a list of transactions in sequence against the latest Base block, as if the wallet sent them one after the other, before anything is signed. Each step sees the state the previous ones left (an approval before a mint works). Returns, per step, whether it would succeed, the gas it uses, whether the gas limit it carries is enough, and the decoded revert reason with a hint when it fails; and the net token and ETH movements for the wallet. Pass the steps exactly as prepare_action, invest_usdc_to_gblin or swap_gblin_to_usdc_jit return them. State can change before your transactions land: a successful preview is evidence, not a guarantee.
- **get_transaction_status** — Report what a sent Base transaction did: pending, succeeded, reverted or not found; its block and confirmations; the fee paid; the net token movements for the sender (GBLIN shares minted or redeemed, USDC, basket tokens); and, when it reverted, the decoded reason. Use it after sending the steps from prepare_action to confirm each one before the next.
- **get_nav_history** — NAV per GBLIN share over time, read from the chain at past blocks, beside the ETH/USD and BTC/USD oracle prices the vault itself uses, with the change of each over the window and the NAV's largest drawdown. History starts at the deployment of the vault in service. Use it to judge how the index behaved against holding ETH or BTC over the same span.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gblin-mcp": {
    "command": "npx",
    "args": ["-y","@gblin-protocol/mcp-server"]
  }
}
```

## Documentation

## What gblinproject/GBLIN-MCP MCP server does

gblinproject/GBLIN-MCP MCP server exposes treasury and risk operations for agents working on Base mainnet. The treasury functions use GBLIN, an index backed by cbBTC, WETH, and USDC, with minting and redemption at NAV as described in the project material. Agents can inspect NAV, basket weights, Crash Shield status, wallet balances, gas runway, and operational runway before deciding whether to deploy or retain capital.

The server also supports the payment side of treasury management. It can prepare calldata to move between GBLIN, ETH, and USDC, including a just-in-time redemption path for an x402 invoice or another USDC obligation. The returned transactions are unsigned; the user's EOA or account-abstraction wallet must authorize them.

## How it works

Read-only tools retrieve protocol, market-risk, governance, and wallet information. The risk tool returns one of three regimes—calm, elevated, or crash—along with a severity score and a posture such as risk_on, reduce, or risk_off. Governance checks inspect the GBLIN_V6 owner, timelock settings, role counts, and pending asset-addition proposals.

Swap and investment tools return transaction steps rather than broadcasting them. Investing USDC requires an approval followed by an in-kind GBLIN purchase. JIT redemption uses a GBLIN-to-ETH transaction followed by a Uniswap WETH-to-USDC transaction. Safe minimum outputs include dynamic slippage protection; the stated buffers are 2.5% normally and 4% during Crash Shield conditions.

The receipt tools hash action inputs and outputs, then work with Ed25519 signatures, RFC 6962 Merkle proofs, and signed checkpoints. Receipts can be fetched and verified independently. The demo sealing path is limited to five seals per day per IP, while unlimited paid sealing uses x402.

## Setup and configuration

The project publishes an npm package named `@gblin-protocol/mcp-server`. A local stdio installation can be started with:

```bash
npx -y @gblin-protocol/mcp-server
```

A hosted Streamable HTTP MCP endpoint is also provided at `https://gblin-mcp.gblin-mcp-worker.workers.dev/mcp`. The hosted endpoint is therefore not a complete substitute for the local package.

No API key or wallet is needed to read the free risk information. Wallet keys are not held by the service. Some operations require x402 payments in USDC, including treasury-health analysis, risk-regime queries, keeper-bounty checks, and unlimited receipt sealing.

## Tools and capabilities

gblinproject/GBLIN-MCP MCP server includes tools to:

- Read treasury state, market risk, governance state, and wallet health.
- Preview GBLIN trades and prepare investment or JIT USDC redemption calldata.
- Check keeper rebalance opportunities and their stated ETH reward.
- Verify risk attestations for integrity, signer authenticity, freshness, and live regime drift.
- Seal action hashes in the public log and retrieve portable receipts.
- Explain the paid receipt-sealing flow.
- Generate a portable skill seed for another agent, including a referral code derived from the caller wallet.

## Limitations and notes

The material describes the protocol and tool behavior but does not guarantee that a transaction will execute successfully after calldata is returned. Agents still need a compatible wallet, sufficient assets, approvals, and gas, and must sign the transactions themselves. Some tools charge through x402, with the first call used to obtain a payment manifest when `_payment` is omitted.

The transparency log records hashes plus submitted labels and metadata; those strings are public, so secrets should not be placed in them. Its receipts demonstrate signed, time-stamped inclusion in the log and are not compliance certificates or endorsements. The hosted and npm tool surfaces differ, so client selection should account for which functions are required.

_Full upstream README: https://allmcps.com/mcp/gblinproject-gblin-mcp/readme_

