Skip to main content
Glama
@gblin-protocol/mcp-server

@gblin-protocol/mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GBLIN_RPC_URLNoThe RPC URL for Base mainnet. Falls back to a public endpoint if not set.https://base-rpc.publicnode.com

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

GBLIN stdio MCP (gblin-treasury-mcp v0.6.6). GBLIN is an on-chain index of cbBTC, WETH and USDC on Base, minted and redeemed at NAV. This server holds no keys and never sends a transaction: tools that act return unsigned calldata or typed data for your own wallet to sign. Read: get_treasury_state, get_governance_state, get_auction_state (the vault rebalances by Dutch auction), get_market_risk_regime (calm|elevated|crash), analyze_treasury_health, quote_safe_swap, get_nav_history (NAV beside ETH and BTC). Plan: plan_treasury (idle USDC to operating cash, surplus, a mint simulation with live fees and today's exit estimate, and the blockers; nothing executed). Act, in this order: prepare_action (any operation: mint with ETH, WETH or USDC, redeem in kind, exit to ETH or USDC, bid), preview_steps (simulate the steps before signing; it finds the gas each vault step really needs), send from your wallet, then get_transaction_status. Shortcuts: swap_gblin_to_usdc_jit (exit to USDC to pay an invoice), invest_usdc_to_gblin. Pay in GBLIN with a signature and no ETH (EIP-3009, x402 'exact'): prepare_gblin_payment, then verify_gblin_authorization; when nobody else will carry it, prepare with relay: true and hand both signatures to relay_gblin_payment (fee in GBLIN, one atomic transaction). Verify: verify_risk_attestation (pure EIP-712 math). Receipts: seal_action_demo, get_receipt, how_to_seal_paid. Prompts: risk_gate, pay_in_gblin, pay_invoice_just_in_time, seal_and_verify. Resources: gblin://contracts, gblin://payments, gblin://keys, gblin://limits. Every tool is free; paid data lives on x402 HTTP endpoints at https://gblin.digital (docs: https://gblin.digital/llms.txt).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_treasury_stateA

Reads the current GBLIN protocol state on Base mainnet: NAV in USD, basket composition with dynamic weights, Crash Shield status and whether the NAV is reliable.

quote_safe_swapA

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_jitA

Returns ready-to-broadcast calldata that redeems exactly the USDC requested from a GBLIN position, just in time for an x402 invoice or any other USDC obligation. 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 and 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. A redemption carries no protocol fee; the costs are the Zap's swaps and gas.

invest_usdc_to_gblinA

Returns calldata that converts a USDC amount into GBLIN, a basket of cbBTC, WETH and USDC minted at NAV and redeemable at any time. Two steps: (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. The mint fee and the yearly management fee are governance parameters read live from the vault, not fixed in this text.

analyze_treasury_healthA

Analyzes an agent wallet's treasury: GBLIN, USDC and ETH balances, whether the ETH covers an exit at the live gas price, and the redemption cooldown. When daily_burn_usd is given it adds days of USDC runway and a split that keeps seven days of spend in USDC and treats only the surplus as a candidate for GBLIN. Free by default; a 0.003 USDC charge applies only when the server operator sets MCP_PAYWALL=true.

get_governance_stateA

Reads GBLIN protocol governance: whether the GBLIN vault is owned by the 48-hour timelock, the timelock's minimum delay and grace period, role member counts, and any pending asset-addition proposal on the vault. With an operation_id it also reports the status of that timelock operation. Read-only.

share_skill_with_peerA

Generates a portable skill seed that another AI agent can use to install the GBLIN MCP server. 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.

get_auction_stateA

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_regimeA

Returns the current BTC/ETH risk regime (calm | elevated | crash), a severity score and the matching risk posture (risk_on | reduce | risk_off), derived from GBLIN's on-chain Crash Shield against Chainlink oracle peaks on Base. Independent of holding GBLIN. Free by default; a 0.002 USDC charge applies only when the server operator sets MCP_PAYWALL=true.

verify_risk_attestationA

Verifies a GBLIN Risk Attestation, the object returned by GBLIN's /api/x402/attestation, or a proof-of-diligence attached by a peer agent. Free. Runs four checks: (1) integrity, by recomputing the EIP-712 attestation_id; (2) authenticity, by recovering the signer when a signature is present and comparing it with GBLIN's published attestor; (3) freshness, against on-chain time (10-minute validity); (4) live drift, by comparing the attested regime with the current on-chain regime.

plan_treasuryA

Turns idle USDC into a reviewable plan in one call: operating cash = max(reserve_usd, daily_burn_usd x days), the surplus above it, a simulation of minting that surplus into GBLIN at NAV (fees read live from the vault, estimated exit value today, round-trip cost), the same simulation for a trial amount (100 USDC by default), and the blockers (Crash Shield, redemption cooldown, ETH for the exit). Read-only: nothing is executed and nothing is advised. GBLIN is crypto exposure (cbBTC, WETH, USDC), not cash and not yield.

seal_action_demoA

Seals the hashes of an AI action into GBLIN's public append-only RFC 6962 transparency log (free demo, 5 per day per IP, receipt marked demo: true). Returns a portable receipt: Ed25519 signature, Merkle inclusion proof and operator-signed C2SP checkpoint, verifiable offline with the zero-dependency verify-receipt.mjs. Input and output go in as sha256 hashes only; the action label and metadata are published in the public log. Unlimited sealing is a separate paid x402 HTTP endpoint (0.0045 USDC per seal).

get_receiptA

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_paidA

Returns the reference 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 offline verification of receipts. The free demo allows 5 seals per day per IP.

prepare_gblin_paymentA

Builds 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. Method 'receive' lets only the named recipient submit the authorization, so nobody can front-run the transfer; method 'transfer' suits an x402 facilitator, which submits on the seller's behalf. With relay: true it also returns a second authorization that pays a relayer's fee in GBLIN. No private key is requested, held or transmitted: the signature is produced by the caller's own wallet.

verify_gblin_authorizationA

Checks a signed GBLIN authorization against the chain before any gas is spent 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. These are the checks an x402 facilitator runs, so a 'would_settle' verdict means the payment can be carried.

relay_gblin_paymentA

GBLIN's relay carries a signed GBLIN payment on chain for a payer that holds no ETH. Takes the payment and the relay fee, each as { authorization, signature }, both 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 tool moves funds: it carries the authorizations exactly as signed.

prepare_actionA

Builds the unsigned transactions for an operation on the GBLIN vault, in the order they are sent. 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 needed), 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: the steps are returned to the caller.

preview_stepsA

Simulates 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). Accepts steps with target or to, calldata or data, and optional value and gas. Returns, per step, whether it would succeed, the gas it uses, whether the gas limit it carries is enough, and the decoded revert reason when it fails; and the net token and ETH movements for the wallet. State can change before transactions land: a successful preview is evidence, not a guarantee.

get_transaction_statusA

Reports 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.

get_nav_historyA

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. The series starts at the deployment of the vault in service and can be compared with holding ETH or BTC over the same span.

Prompts

Interactive templates invoked by user choice

NameDescription
risk_gateRead the live on-chain risk regime and decide whether to deploy capital, reduce, or stand down, with the rule stated up front so the decision is auditable.
pay_in_gblinPrepare a gasless GBLIN payment, sign it with your own wallet, verify it against the chain, and only then hand it on. The private key never leaves the wallet.
pay_invoice_just_in_timeWhen an invoice in USDC arrives and the treasury sits in GBLIN, exit just enough to pay it, checking the cooldown and the gas first.
seal_and_verifySeal the hashes of an action into the public transparency log, fetch the receipt back, and state plainly what the receipt does and does not prove.

Resources

Contextual data attached and managed by the client

NameDescription
contractsEvery contract of the deployment in service, with its role and explorer link, and the earlier deployments that must not be used.
paymentsHow GBLIN is paid with a signature and no ETH (EIP-3009): the EIP-712 domain read live from the token, the x402 payload shape, and the accepts block a seller publishes to be paid in GBLIN.
keysThe address that signs GBLIN risk attestations, which a verifier must pin, and where the transparency-log and witness keys are published.
limitsThis server runs locally and holds no keys. Which tools could be metered, at what price, and what limits come from the RPC rather than from the server.

TDQS

A3.8/5.0

Scored across 21 tools

Disambiguation3/5

The core read/prepare/simulate/verify split is clear, but several tools overlap: invest_usdc_to_gblin and swap_gblin_to_usdc_jit are essentially special cases of prepare_action's mint_with_usdc and exit_to_usdc, and quote_safe_swap overlaps both preview_steps and the mint/redeem previews. analyze_treasury_health and plan_treasury also both compute runway/surplus/blockers, so an agent can plausibly pick either for the same question. Descriptions do help disambiguate intent (convenience calldata vs. generic builder), which keeps this from scoring lower.

Naming Consistency4/5

Nearly all tools are snake_case and verb-led (get_*, prepare_*, verify_*, analyze_*, plan_*), with a readable get_/prepare_/verify_ role split. Deviations exist: how_to_seal_paid is a question rather than an action, and quote_safe_swap / swap_gblin_to_usdc_jit / relay_gblin_payment mix different verb-noun shapes. Still broadly predictable.

Tool Count3/5

21 tools sits in the heavy band for a protocol SDK surface, and a few earn their place only marginally: how_to_seal_paid is pure documentation, share_skill_with_peer is a referral helper, and the two convenience swap tools duplicate prepare_action paths. The domain genuinely spans vault ops, x402 payments, receipts, risk and governance, so the breadth is defensible, but the set could shed 3-5 tools without loss.

Completeness4/5

Coverage is strong end-to-end: state/history/governance reads, quotes, plan and prepare, step simulation, relay execution, and post-hoc transaction status, plus receipt sealing and offline-verifiable attestations. Gaps are minor: governance is read-only (no propose/execute/cancel timelock operations), receipts are fetch-by-index only with no enumeration, and signed authorizations can be verified but not cancelled. These are workaroundable rather than dead ends.

Maintenance

ActivityActive
ResponsivenessOutdated data