Skip to content

Reference for the MCP builder tools. Install, client configs, every tool with its key params, workflows, resources, and the CLI access path.

The MCP builder tools let an AI assistant build, review, simulate, and query BitBadges transactions. The CLI is the primary entry point; MCP adapts the shared tool registry for clients that prefer structured tool calls. The installed registry in bitbadgesjs-sdk/src/builder/tools/ is authoritative when this reference and an installed version differ.

bash
# Install globally (SDK + MCP bins; 0.45.9+ also adds `bb` as an alias of bitbadges-cli, SDK verbs only)
npm install -g bitbadges

# Start the MCP server from that same installation
bitbadges-builder

# Prefer the combined installer when you also want the chain binary (it symlinks `bb` to bitbadgeschaind):
# curl -fsSL https://install.bitbadges.io | sh

To build from your own Node code with the same tools and no MCP client, use the Programmatic Agent. For terminal workflows without an MCP client, use the CLI.

Schemas and Examples

bash
bb dev capabilities
bb dev capabilities build_subscription
bb dev tools call build_subscription --args-file subscription.json
# SDK-only before 0.45.9: bitbadges-cli dev capabilities …

The compact catalog lists operation IDs and CLI/MCP entry points. Requesting one ID includes its inputSchema; the standard builders also include a sample in inputSchema.examples. The equivalent MCP call is get_capabilities with {"id":"build_subscription"}. schemaVersion identifies the catalog format and catalogHash identifies its installed definitions.

Standard builders are exposed through this adapter, including subscriptions, auctions, bounties, crowdfunds, product catalogs, smart tokens, credits, and approval templates. They use the same core functions as the CLI. PaymentRequestV2 remains available as build_payment_request_v2, including invoice substandards. The catalog also exposes standard actions through the installed CLI, including standard_credit_tokens_quote for legacy credit purchase units and standard_spendable_credits_quote for exact whole service-credit packs. Native Cosmos commands remain CLI-only; inspect the installed catalog rather than guessing a tool name.

The schemas enforce JSON shape and unknown-field rejection. Each builder also applies its existing runtime rules; schema validity alone does not prove a payment is authorized or will succeed on chain. IDs and integer base-unit amounts use strings where declared; older display-unit builder parameters use numbers. Returned approval amounts are encoded as decimal strings. Examples are unsigned proposals with sample addresses, IDs and metadata URLs; replace them, set the real signer, review, and simulate before requesting a signature.

Client Configuration

Hosted Remote MCP (Streamable HTTP — Zero Install)

Connect directly to the hosted BitBadges remote MCP server without installing a local binary:

  • URL: https://mcp.bitbadges.io/mcp (root https://mcp.bitbadges.io is also aliased)
  • Transport: MCP Streamable HTTP (POST JSON-RPC 2.0, GET SSE with Mcp-Session-Id, DELETE session teardown)
  • Profiles: Append ?profile=core (default), codemode, readonly, session, queries, or full
  • Discovery: https://mcp.bitbadges.io/.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server
  • Auth headers: x-api-key: <your-key> (from bitbadges.io/developer) or Authorization: Bearer <siwbb-token>
bash
# Claude Code (remote Streamable HTTP)
claude mcp add --transport http bitbadges https://mcp.bitbadges.io/mcp
json
{
  "mcpServers": {
    "bitbadges": {
      "type": "http",
      "url": "https://mcp.bitbadges.io/mcp",
      "headers": {
        "x-api-key": "YOUR_BITBADGES_API_KEY"
      }
    }
  }
}

Remote mode runs statelessly with Redis-isolated Mcp-Session-Id sessions per principal and disables local filesystem, keyring, and CLI subprocess tools. Unsigned transactions are handed off to your browser wallet via request_browser_review.

Claude Desktop (Local Stdio)

Add to claude_desktop_config.json:

json
{
  "mcpServers": {
    "bitbadges-builder": {
      "command": "bitbadges-builder",
      "args": [],
      "env": {
        "BITBADGES_API_KEY": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
      }
    }
  }
}

The key is a fake example. Configure your own key from bitbadges.io/developer locally. Building proposals does not require a mnemonic. Use main-wallet requests for browser signing.

Claude Code

After the chain and CLI install (curl -fsSL https://install.bitbadges.io | sh), add the server by hand:

bash
claude mcp add bitbadges-builder -- bitbadges-builder

Or install the Claude Code Plugin, which wires the same server and adds 8 workflow skills plus /bitbadges:setup and /bitbadges:status:

text
/plugin marketplace add BitBadges/bitbadges-plugin
/plugin install bitbadges

The plugin is a convenience layer. The CLI install is what runs underneath.

Cursor

Add to .cursor/mcp.json:

json
{
  "mcpServers": {
    "bitbadges-builder": {
      "command": "bitbadges-builder",
      "args": [],
      "env": {
        "BITBADGES_API_KEY": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
      }
    }
  }
}

Environment Variables

VariableRequiredDescription
BITBADGES_API_KEYFor queries, simulation, broadcast, and review linksYour BitBadges API key (get one)
BITBADGES_API_URLNoOverride the API base (default https://api.bitbadges.io)
BITBADGES_FRONTEND_URLNoOverride the site base used in review links (default https://bitbadges.io)
BITBADGES_CONFIG_DIRNoSeparate CLI configuration, sessions, and signing-request files; useful for isolated agent environments
BITBADGES_CLI_PATHNoTrusted installed CLI executable for standard actions; defaults to bitbadges-cli on PATH
BITBADGES_MCP_TOOLSETSNoComma-separated toolset filter for tools/list (build, session, query, standards, validate, docs, utilities, signing); unset exposes every tool

bitbadges-builder --version (-v) prints the package version and --help (-h) prints usage and the main environment variables, both without starting the stdio server (since 0.45.15). The server reports the same package version in MCP serverInfo.version.

When a standard_* tool cannot run the CLI, the error says which case it hit (since 0.45.15): bitbadges-cli is not installed or not executable (ENOENT) means the binary is missing or not executable (install the bitbadges package or set BITBADGES_CLI_PATH); CLI rejected the input without a JSON result means the CLI ran and rejected an argument, often a malformed address or option value. Check the arguments against bb <group> <action> --help. CLI stderr is never forwarded.

The MCP server does not need wallet private keys or mnemonics. Signing happens through the separately authorized CLI or wallet flow. It does not read ANTHROPIC_API_KEY or OPENAI_API_KEY; your client provides the model.

Tools

Params marked * are required. Session tools also accept sessionId and creatorAddress (bb1 or 0x form) for per-request isolation; those two are omitted from the tables.

A complete call, as the client sends it and as bb dev tools call add_approval --args-file ./approval.json reads it. This adds a public mint of Demo Coin (collection token ID 1) with at most 10 units per address:

json
{
  "sessionId": "demo-coin",
  "creatorAddress": "bb1p0rrel3365scadq5k9pv0x0zp9j22js6dnw70d",
  "approvalId": "public-mint",
  "fromListId": "Mint",
  "toListId": "All",
  "initiatedByListId": "All",
  "tokenIds": [{ "start": "1", "end": "1" }],
  "transferTimes": [{ "start": "1", "end": "18446744073709551615" }],
  "ownershipTimes": [{ "start": "1", "end": "18446744073709551615" }],
  "approvalCriteria": {
    "overridesFromOutgoingApprovals": true,
    "overridesToIncomingApprovals": true,
    "approvalAmounts": {
      "overallApprovalAmount": "0",
      "perToAddressApprovalAmount": "10",
      "perFromAddressApprovalAmount": "0",
      "perInitiatedByAddressApprovalAmount": "0",
      "amountTrackerId": "public-mint",
      "resetTimeIntervals": { "startTime": "0", "intervalLength": "0" }
    }
  }
}

The tool answers with the approval as stored in the session plus any validation notes.

Standard Action Usage

Prefer the high-level builder or action when it fits. The standard_* tools cover payment requests, subscriptions, smart tokens, vaults, IBC token factory, issuer-controlled tokens, credits, products, auctions, crowdfunds, bounties, and prediction markets. Inputs come from the CLI command definitions, and results preserve the CLI JSON envelope. They query state or prepare unsigned messages; they never sign or broadcast.

bash
bb dev capabilities standard_pay_requests_pay
bb pay-requests pay 46 --creator "$PAYER" --obligation payment-1 --units 1 --mainnet

Equivalent MCP arguments for standard_pay_requests_pay:

json
{
  "collectionId": "46",
  "creator": "bb1zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zql3w7",
  "obligation": "payment-1",
  "units": "1",
  "mainnet": true
}

Replace the sample collection and payer. Action amounts are strings, preserving CLI decimal text; units follow that command's help. Signing, credential, endpoint, shell, and file-output arguments are excluded. The adapter starts bitbadges-cli directly with literal arguments and checks its capability hash before running the action. Install CLI and MCP from the same SDK version. BITBADGES_CLI_PATH can select a trusted installed CLI executable when the client cannot find it on PATH; it is operator configuration, not a tool argument.

For subscriptions, standard_subscriptions_claim prepares one payment; standard_subscriptions_subscribe also requests recurring consent. Renewal and cancellation require a successful read of existing approvals so unrelated consent is preserved. Do not infer refunds or prorations from cancellation.

For browser handoff use the CLI's --browser flow. list_signing_requests lists local request IDs; signing_request_status accepts requestId and optional resume: true. Resume returns the original signing URL only while its listener is active. These tools do not initiate payment or verify chain execution. See request recovery.

Registry snapshot: 164 tools (bitbadges 0.45.15, revision f5253c8d7619, catalog hash f4283b2aadce41f1…). Filter exposed MCP tools with BITBADGES_MCP_TOOLSETS (build, session, query, standards, validate, docs, utilities, signing). Full flat inventory: Capability Catalog.

Session Builders

Each tool sets one field on a session-scoped transaction. Calls in the same round can run in parallel. All session tools also accept optional sessionId and creatorAddress (omitted from the table for readability).

ToolWhat it doesKey params
add_alias_pathAdd an alias path for ICS20-backed tokens or liquidity pools. Required for smart tokens. Decimals must match the IBC denom decimals.aliasPath*, pathName, pathDescription, pathImage, denomUnitName, denomUnitDescription, denomUnitImage
add_approvalAdd a collection approval to the session. Each approval defines WHO can transfer WHAT tokens WHEN and under WHAT conditions. Use one approval per purpose with clear approvalIds.approvalId*, fromListId*, toListId, initiatedByListId, tokenIds, transferTimes, ownershipTimes, approvalCriteria
add_cosmos_wrapper_pathAdd a Cosmos coin wrapper path for wrapping BitBadges tokens to a NEW ICS20 denomination. This mints/burns a custom ICS20 coin — NOT wrapping to an existing coin like USDC.wrapperPath*, pathName, pathDescription, pathImage, denomUnitName, denomUnitDescription, denomUnitImage
add_preset_approvalAdd a collection approval using a named preset (canonical skill shape) instead of hand-writing the 60-line approvalCriteria JSON.presetId*, params*, overrides
add_transferAppend a MsgTransferTokens to the session (after the collection message). Use this for auto-mint: mint tokens to specific addresses at creation time.transfers*
get_review_urlFINAL STEP after building: upload the transaction and get a short bitbadges.io link the user opens to review and sign it with their wallet. Give the user reviewUrl.transaction, frontendUrl
get_transactionGet the assembled transaction JSON with metadataPlaceholders. Call this after building to retrieve the final output. Numbers are auto-converted to strings.none
list_presetsList named approval presets available for a skill. Each descriptor includes presetId, name, description, and paramsSchema.skill
remove_alias_pathRemove an alias path by denom.denom*
remove_approvalRemove an approval by approvalId. To replace an approval, remove then re-add with the same approvalId — it will be inserted at the same position (order preserved).approvalId*
remove_cosmos_wrapper_pathRemove a Cosmos wrapper path by denom.denom*
remove_transferRemove a MsgTransferTokens from the session by message index. Index must be >= 1 (messages[0] is always the collection and cannot be removed).index*
reset_sessionClear all session state and start from a blank collection. Call this BEFORE building a second collection in the same conversation: session state is global and persists, so without it the new collection inherits the…none
set_approval_metadataSet metadata for an approval. Image is always empty string for approvals. Call this after add_approval to set descriptive names.approvalId*, name*, description*
set_collection_metadataSet collection metadata (name, description, image). Auto-creates a metadata placeholder URI. Names and descriptions must be specific and user-facing.name*, description*, image*
set_custom_dataSet custom data string on the collection. Can be any JSON or text, stored on-chain.customData*
set_default_balancesSet default balances for all users. In almost all cases, use empty balances/approvals with all auto-approve flags true. autoApproveAllIncomingTransfers MUST be true for any collection with mint approvals.defaultBalances*
set_invariantsSet collection invariants (on-chain constraints). Cannot be removed after creation.invariants*
set_is_archivedArchive or unarchive a collection. Archived collections are hidden from browsing but still exist on-chain.isArchived*
set_managerSet the collection manager address. Manager controls collection updates within permission bounds. Defaults to creator address.manager*
set_mint_escrow_coinsSet coins to fund the mint escrow address on collection creation. Required for quest rewards and escrow payouts where coinTransfers use overrideFromWithApproverAddress.coins*
set_permissionsSet collection permissions. Use a preset ("locked-approvals" recommended) or provide custom permissions. Fields are either FROZEN (permanentlyForbiddenTimes: FOREVER) or NEUTRAL (empty []).preset, permissions
set_standardsSet the standards array for the collection. Standards signal to the frontend which dedicated views to show and define structural conventions.standards*
set_token_metadataSet token metadata for specific token ID ranges. Auto-creates placeholder URI. The {id} placeholder works in the URI only (not in name/description/image fields).tokenIds*, name*, description*, image*
set_valid_token_idsSet the valid token ID ranges for the collection. Defines which token IDs can exist. Fungible tokens and subscriptions use a single ID; NFTs use a range.tokenIds*

Standard Builders

One-shot builders for shipping standards. Each accepts validated builder parameters and returns an unsigned proposal. Inspect full JSON schemas and sample payloads with bb dev capabilities <tool>.

ToolWhat it doesKey params
build_address_listPrepare a address-list proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.uri, name, image, description, manager, creator
build_auctionPrepare a auction proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.bidDeadline, acceptWindow, uri, name, description, image, seller, creator
build_bidPrepare a bid proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.address*, collectionId*, price*, denom*, tokenIds, tokenAmount, expiration
build_bountyPrepare a bounty proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.amount*, denom*, verifier*, recipient*, submitter*, expiration, uri, name, description, image
build_credit_tokenPrepare a credit-token proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.paymentDenom*, recipient*, symbol, tokensPerUnit, uri, name, description, image
build_crowdfundPrepare a crowdfund proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.goal*, denom*, crowdfunder, deadline, uri, name, description, image, creator
build_custom_2faPrepare a custom-2fa proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.uri, name, image, description, burnable, transferable, creator
build_intentPrepare a intent proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.address*, collectionId*, payDenom*, payAmount*, receiveDenom*, receiveAmount*, expiration
build_listingPrepare a listing proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.address*, collectionId*, tokenIds*, price*, denom*, maxSales, expiration
build_payment_requestPrepare a payment-request proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.amount*, denom*, payer*, recipient*, expiration, uri, name, image, context
build_payment_request_v2Build frozen invoice obligations or reusable payment links using native approvals. Supports eligible payer lists, all-of shares, distinct K-of-N, installments, partial targets and atomic recipient splits.version*, kind*, obligations*, uri, name, image, description
build_pm_buy_intentPrepare a pm-buy-intent proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.address*, collectionId*, token*, amount*, price*, denom*, expiration
build_pm_sell_intentPrepare a pm-sell-intent proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.address*, collectionId*, token*, amount*, price*, denom*, expiration
build_prediction_marketPrepare a prediction-market proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.verifier*, denom, uri, name, description, image
build_product_catalogPrepare a product-catalog proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.products*, storeAddress*, uri, name, description, image
build_questsPrepare a quests proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.reward*, denom*, maxClaims*, uri, name, description, image
build_smart_tokenPrepare a smart-token proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.backingCoin*, symbol, uri, name, description, image, tradable, aiAgentVault, allowForcefulPostMintTransfers
build_spendable_creditPrepare a spendable-credit proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.paymentDenom*, provider*, serviceId*, pricePerPack, creditsPerPack, purchaseOptions, expiresAt, uri, name, description, image
build_subscriptionPrepare a subscription proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.interval*, price, denom, recipient, payouts, tiers, transferable, updatableMint, uri, name, description, image
build_vaultPrepare a vault proposal using the same core builder as the CLI. Input schema is generated from its parameter type; runtime rules still apply.backingCoin*, uri, name, symbol, image, description, dailyWithdrawLimit, require2fa, emergencyRecovery

Standard Actions

The 75 standard_* tools adapt the installed CLI standard verbs over MCP. They return read-only state or unsigned transaction proposals and never sign or broadcast. Signing, credential, endpoint, and file-output flags are excluded; network flags (mainnet, testnet, local) are optional on remote actions.

ToolCLI equivalentParams
standard_auctions_accept_bidbb auctions accept-bidcollectionId*, bidApprovalId*, creator*, bidder*
standard_auctions_cancel_bidbb auctions cancel-bidcollectionId*, approvalId*, creator*
standard_auctions_listbb auctions listopen
standard_auctions_place_bidbb auctions place-bidcollectionId*, creator*, amount*, denom*, baseUnits, approvalId
standard_auctions_showbb auctions showcollectionId*
standard_auctions_statusbb auctions statuscollectionId*
standard_bounties_acceptbb bounties acceptcollectionId*, creator*
standard_bounties_claim_refundbb bounties claim-refundcollectionId*, creator*
standard_bounties_denybb bounties denycollectionId*, creator*
standard_bounties_listbb bounties listmine, open
standard_bounties_showbb bounties showcollectionId*
standard_bounties_statusbb bounties statuscollectionId*
standard_credit_tokens_listbb credit-tokens listcollectionId*
standard_credit_tokens_purchasebb credit-tokens purchasecreator*, units*, collectionId, tier, apiCredits
standard_credit_tokens_quotebb credit-tokens quotecollectionId*, units*, tier
standard_credit_tokens_showbb credit-tokens showcollectionId*
standard_crowdfunds_contributebb crowdfunds contributecollectionId*, creator*, amount*, baseUnits
standard_crowdfunds_listbb crowdfunds listmine, open
standard_crowdfunds_refundbb crowdfunds refundcollectionId*, creator*, amount*, baseUnits
standard_crowdfunds_showbb crowdfunds showcollectionId*
standard_crowdfunds_statusbb crowdfunds statuscollectionId*
standard_crowdfunds_withdrawbb crowdfunds withdrawcollectionId*, creator*
standard_ibc_token_showbb ibc-token showcollectionId*
standard_ibc_token_statusbb ibc-token statuscollectionId*
standard_ibc_token_unwrapbb ibc-token unwrapcollectionId*, creator*, amount*, denom, tokenId, baseUnits, approvalId
standard_ibc_token_wrapbb ibc-token wrapcollectionId*, creator*, amount*, denom, tokenId, baseUnits, approvalId
standard_issuer_controlled_freezebb issuer-controlled freezecollectionId*, creator*
standard_issuer_controlled_mintbb issuer-controlled mintcollectionId*, creator*, to*, tokenId, amount, approvalId
standard_issuer_controlled_revokebb issuer-controlled revokecollectionId*, creator*, from*, tokenId, amount, approvalId
standard_issuer_controlled_showbb issuer-controlled showcollectionId*
standard_issuer_controlled_statusbb issuer-controlled statuscollectionId*
standard_issuer_controlled_transferbb issuer-controlled transfercollectionId*, creator*, from*, to*, tokenId, amount, approvalId
standard_pay_requests_denybb pay-requests denycollectionId*, creator*
standard_pay_requests_listbb pay-requests listmine, open
standard_pay_requests_paybb pay-requests paycollectionId*, creator*, obligation, units
standard_pay_requests_showbb pay-requests showcollectionId*
standard_pay_requests_statusbb pay-requests statuscollectionId*
standard_prediction_markets_buy_nobb prediction-markets buy-nocollectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId
standard_prediction_markets_buy_yesbb prediction-markets buy-yescollectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId
standard_prediction_markets_cancelbb prediction-markets cancelcollectionId*, approvalId*, creator*, side*
standard_prediction_markets_depositbb prediction-markets depositcollectionId*, creator*, amount*
standard_prediction_markets_listbb prediction-markets listopen
standard_prediction_markets_quotebb prediction-markets quotecollectionId*, state*, pairAmount, yesAmount, noAmount, yesBalance, noBalance
standard_prediction_markets_redeembb prediction-markets redeemcollectionId*, creator*, state*, pairAmount, yesAmount, noAmount, yesBalance, noBalance
standard_prediction_markets_resolvebb prediction-markets resolvecollectionId*, creator*, outcome*
standard_prediction_markets_sell_nobb prediction-markets sell-nocollectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId
standard_prediction_markets_sell_yesbb prediction-markets sell-yescollectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId
standard_prediction_markets_showbb prediction-markets showcollectionId*
standard_prediction_markets_statusbb prediction-markets statuscollectionId*
standard_products_listbb products listcollectionId*
standard_products_purchasebb products purchasecollectionId*, creator*, tokenId*
standard_products_showbb products showcollectionId*
standard_smart_tokens_depositbb smart-tokens depositcollectionId*, creator*, amount*, baseUnits, approvalId
standard_smart_tokens_listbb smart-tokens listnone
standard_smart_tokens_showbb smart-tokens showcollectionId*
standard_smart_tokens_statusbb smart-tokens statuscollectionId*
standard_smart_tokens_withdrawbb smart-tokens withdrawcollectionId*, creator*, amount*, baseUnits, approvalId
standard_spendable_credits_consumebb spendable-credits consumecollectionId*, creator*, units*, requestId*
standard_spendable_credits_purchasebb spendable-credits purchasecollectionId*, creator*, units*, approvalId
standard_spendable_credits_quotebb spendable-credits quotecollectionId*, units*, approvalId
standard_spendable_credits_showbb spendable-credits showcollectionId*
standard_standards_inspectbb standards inspectcollectionId*, family*
standard_subscriptions_cancelbb subscriptions cancelcollectionId*, creator*, tier
standard_subscriptions_charge_duebb subscriptions charge-duecollectionId*, creator*, tier, dryRun
standard_subscriptions_claimbb subscriptions claimcollectionId*, creator*, tier
standard_subscriptions_enable_renewalbb subscriptions enable-renewalcollectionId*, creator*, tier, tip, approvalId
standard_subscriptions_listbb subscriptions listcollectionId*
standard_subscriptions_statusbb subscriptions statuscollectionId*, address*
standard_subscriptions_subscribebb subscriptions subscribecollectionId*, creator*, tier, tip, approvalId
standard_vault_depositbb vault depositcollectionId*, creator*, amount*, baseUnits, approvalId
standard_vault_emergency_migratebb vault emergency-migratecollectionId*, creator*, from*, amount*, baseUnits
standard_vault_listbb vault listnone
standard_vault_showbb vault showcollectionId*
standard_vault_statusbb vault statuscollectionId*
standard_vault_withdrawbb vault withdrawcollectionId*, creator*, amount*, baseUnits, approvalId

Helper Builders

ToolWhat it doesKey params
build_claimBuild a claim document for the BitBadges API. Supports code-gated, password-gated, whitelist-gated, and open claims. Returns JSON ready for POST /api/v0/claims.claimType*, name*, maxUses*, description, numCodes, password, whitelist, maxUsesPerAddress, action, showInSearchResults, categories
build_dynamic_storeBuild transaction JSON for dynamic store operations: create a new boolean address map, update settings, delete, or set values for addresses.action*, creator*, storeId, defaultValue, globalEnabled, uri, customData, address, value, entries
build_transferBuild a MsgTransferTokens by auto-querying the collection, analyzing its approvals, and constructing the correct transaction with proper prioritizedApprovals, coinTransfers, etc.collectionId*, fromAddress*, toAddress*, tokenIds, amount, intent

Review and Analysis

ToolWhat it doesKey params
analyze_collectionQuery a collection and produce a structured analysis of its transferability, approvals, permissions, and how to obtain/transfer tokens. Returns actionable information for constructing MsgTransferTokens.collectionId*
explain_collectionGenerate a human-readable explanation of a collection. Works on build results, transaction JSON, or on-chain query results.collection*, question, audience
flag_review_itemFlag something the user should review before broadcast. Call whenever you are NOT fully confident in a decision: (a) assumptions you made to interpret ambiguous phrasing, (b) user requests the underlying standard cannot…kind*, severity*, message*, chosen*, alternative, fieldPath, sessionId
review_collectionRun the unified deterministic review on a collection transaction or on-chain collection. Returns audit + standards + UX findings merged into one ReviewResult with a single verdict.collection*, context

Simulation and Validation

ToolWhat it doesKey params
simulate_transactionDry-run a transaction to check validity and estimate gas. Returns raw events, parsed transfer events (coin, badge, IBC), and per-address net balance changes.transactionJson, transaction, sessionId, creatorAddress
validate_transactionValidate BitBadges transaction JSON against critical rules. Checks for common errors like numbers not being strings, missing required fields, and invalid list IDs.transactionJson, transaction, sessionId, creatorAddress

Queries

All query tools need BITBADGES_API_KEY.

ToolWhat it doesKey params
lookup_token_infoGet token info by symbol or IBC denom. Returns symbol, IBC denom, decimals, and pre-generated backing address.query*
query_balanceCheck token balance for an address in a collection. Without tokenId, returns the full balance array with amounts, token ID ranges, and ownership time ranges.collectionId*, address*, tokenId
query_collectionFetch collection details from BitBadges API. Requires BITBADGES_API_KEY environment variable. Use the "fields" parameter to return only specific top-level fields and reduce response size.collectionId*, includeMetadata, fields
query_dynamic_storeQuery on-chain dynamic store data. Actions: get_store (store details), get_value (check if an address is true/false), list_values (paginated list of all set values), list_by_creator (all stores created by an address).action*, storeId, address, bookmark
searchSearch collections, accounts, and tokens. Requires BITBADGES_API_KEY environment variable.query*
search_pluginsSearch for off-chain claim plugins or fetch specific plugins by ID. Can also list public plugins by a specific creator address.searchValue, pluginIds, creatorAddress, bookmark
verify_ownershipVerify if an address meets ownership requirements (AND/OR/NOT). Use the collectionId shorthand for a single-collection check, or pass a full requirements JSON for advanced logic.address*, collectionId, tokenId, tokenIdEnd, minAmount, requirements

Component Generators

Stateless helpers that return one piece of a collection.

ToolWhat it doesKey params
generate_alias_pathBuild alias path for liquidity pools and token display. Creates properly formatted alias path for swappable tokens.symbol*, decimals*, tokenId, metadataUri, name, description
generate_approvalBuild approval structures by type. Generates properly formatted approvals for common use cases like minting, Smart Tokens, and transfers.approvalType*, approvalId*, tokenIds, backingAddress, paymentAmount, paymentDenom, paymentRecipient, maxPerUser, totalMax, fromListId, toListId, initiatedByListId
generate_backing_addressCompute deterministic backing address for an IBC denom. Returns the backing address and pre-computed list IDs for Smart Token approvals.ibcDenom*
generate_permissionsBuild permission presets for collections. Generates properly formatted collection permissions for common configurations.preset*, customPermissions
generate_unique_idGenerate unique IDs for new approvals, trackers, etc. Returns IDs like "prefix_a1b2c3d4". Use this for ALL new approval IDs to prevent collisions.prefix*, count
generate_wrapper_addressGenerate the deterministic wrapper address for a Cosmos coin wrapper path denom. Use this when building wrap/unwrap approvals. The wrapper address has no private key — it is protocol-controlled.denom*

Utilities

ToolWhat it doesKey params
convert_addressConvert between ETH (0x) and BitBadges (bb1) address formatsaddress*, targetFormat
diagnose_errorDiagnose BitBadges transaction errors and get suggested fixes. Pass the error message and optionally the context of what you were doing.error*, context
get_current_timestampGet current timestamp in milliseconds for time-dependent configurations. Includes helper values for common time offsets and durations.offsetMs, offsetDays, offsetHours
search_knowledge_baseSearch across all BitBadges knowledge — embedded docs, learnings, recipes, error patterns, and critical rules. Returns ranked, relevant snippets. Use this before asking questions or when debugging.query*, category
validate_addressCheck if an address is valid and detect its chain typeaddress*

Discovery, Instructions, and Docs

Rendered skill pages: Skills.

ToolWhat it doesKey params
fetch_docsUse topic="task:<skill-id>" for a bounded installed offline bundle with executable example, exact schema and lifecycle limits (subscription, payment-request, smart-token, credit-token, spendable-credit).topic*
get_capabilitiesDiscover installed CLI/MCP operations without fetching full schemas. Supply id for one operation schema. Equivalent to bb dev capabilities [id].id
get_skill_instructionsGet detailed instructions for a specific skill. Skills: address-list, auction, auto-mint, bb-402, bounty, burnable, credit-token, crowdfund, custom-2fa, fungible-token, immutability, liquidity-pools, minting…skillId*
get_standardsDiscover installed standard lifecycle support and limitations. Supply id for builders, actions, required inputs, and unsupported operations. Equivalent to bb dev standards [id].id
list_skillsList installed canonical skill summaries. Equivalent to bb dev skills; read details with get_skill_instructions using skillId.none

Intent Verification

Compare an explicit artifact (a { messages } transaction) with a version 1 intent sidecar. Static evidence never establishes lifecycle or external-service success; unmatched requirements stay unverified.

ToolWhat it doesKey params
validate_intentValidate an intent sidecar, reject contradictory constraints, and list decisions requiring clarification.intent*
verify_intentCompare exact user requirements against an explicit artifact. Returns satisfied, violated or unverified per requirement. Static evidence never establishes lifecycle or external-service success.artifact*, intent*
verify_repairsCheck at most three candidate repairs against unchanged original intent. Preserve every attempted evidence revision. Unsupported requirements stop repair; never signs or submits.intent*, original*, candidates*

Browser Signing Requests

ToolWhat it doesKey params
list_signing_requestsList saved local browser request IDs. Does not sign or submit.none
request_browser_reviewCreate a pending general transaction request using the existing browser signing bridge. Returns request ID, URL, expiry and recovery instructions immediately. Human wallet signing is separate.artifact*, expectedAddress*, network*, signOnly, timeoutSeconds, review
signing_request_statusInspect a saved browser request. With resume=true, returns the same URL only while its original listener is live. Never creates or submits another transaction; unknown outcomes require reconciliation.requestId*, resume, verify

Lifecycle (Experimental)

Local lifecycle runs execute caller-supplied assertions in isolated module state. They never sign or broadcast and are not product certification. Most need the optional local runner executable.

ToolWhat it doesKey params
environment_diagnosticsInspect local lifecycle runner availability and configured service readiness without returning credentials or making network calls.none
get_lifecycle_capabilitiesDiscover experimental local lifecycle reference coverage for every installed standard, exclusions, and use/avoid guidance. Offline; no runner required. Not product certification.none
get_lifecycle_templateRead a revision-pinned synthetic lifecycle reference and runnable input. Discover IDs with get_lifecycle_capabilities. Modified scenarios are caller-authored; references do not certify products.id*
lifecycle_schemaRead the installed local runner scenario schema, including assertions and time controls. Offline; requires the optional runner executable.none
run_lifecycleExperimental: execute supplied assertions in isolated local module state. Not product certification. Never signs or broadcasts. Required external coverage remains unverified.scenario*, requiredCoverage
verify_lifecycle_intentExperimental: execute a scenario bound to the exact artifact and retain per-requirement static findings beside observed lifecycle evidence.artifact*, intent*, scenario*, requiredCoverage

generate_placeholder_art (seed*, style, monogram) still exists in source but is not in the MCP catalog: get_transaction fills blank images for you.

Workflows

Session-Based Build

Ask your agent:

text
Build a fungible token called Demo Coin with a 1,000,000 supply cap and a public mint of up to 10 per address. Use the session tools, run validate, review, and simulate in parallel, fix any critical findings, then call get_review_url and give me the link.

The prompt above produces this chain:

text
set_standards + set_valid_token_ids + set_invariants + add_approval + set_permissions + set_default_balances + set_collection_metadata + set_token_metadata
  -> (optional) add_transfer (auto-mint at creation)
  -> validate_transaction + review_collection + simulate_transaction (in parallel)
  -> fix errors with remove_approval + re-add (max 3 attempts)
  -> get_transaction (final JSON)
  -> get_review_url (link the user opens to review and sign)
  1. Build. Call the per-field tools in parallel: standards, token IDs, invariants, approvals, permissions, metadata, balances.
  2. Auto-mint (optional). Call add_transfer to append a MsgTransferTokens next to the collection creation.
  3. Verify. Call validate_transaction, review_collection, and simulate_transaction in parallel. Fix errors with a targeted remove_approval and re-add.
  4. Export. Call get_transaction for the final JSON.
  5. Hand off. Call get_review_url and give the user reviewUrl. Prefer the link over pasting JSON: it is short and cannot be corrupted in transit.

Query and Verification (No Signing)

text
query_collection -> verify_ownership -> (act on the result)

Auto-Mint at Creation

add_transfer mints to specific addresses in the same transaction as the collection creation. The transaction then holds two messages: MsgCreateCollection and MsgTransferTokens. (The session holds it as MsgUniversalUpdateCollection; get_transaction narrows it on the way out.) Use it for "mint 100 tokens to myself", "distribute tokens to the team", or "auto-mint at creation".

  1. Build the collection with a mint approval (add_approval with fromListId: "Mint" and initiatedByListId: <creator address>).
  2. Call add_transfer with the recipient addresses, balances, and prioritizedApprovals that reference the mint approval.
  3. Verify and export as normal. The transaction contains both messages.

Maximum 4 transfer messages per transaction.

Hand Off to the Browser

The builder never signs or broadcasts. Three exits:

  • get_review_url returns reviewUrl, where the user reviews and signs with a browser wallet. It is backed by a prv_ code from POST /api/v0/builder/preview. Uploading the preview needs BITBADGES_API_KEY; opening the returned link needs none, because the unguessable code is the secret. The code expires in 1 hour. BITBADGES_FRONTEND_URL or the frontendUrl param points the link at testnet or a local site; a testnet BITBADGES_API_URL infers https://testnet.bitbadges.io.
  • Save get_transaction output to a file and run bb preview tx.json --open, or bb deploy --browser / --burner from the CLI.
  • Sign with the SDK signing client.

Resources

The server also exposes embedded documents as MCP resources. Read them with your client's resource support or with bb dev resources read bitbadges://recipes/all.

Resource URINameDescription
bitbadges://tokens/registryToken RegistryIBC denoms, symbols, decimals, and pre-generated backing addresses for BitBadges
bitbadges://rules/criticalCritical RulesCritical rules that must be followed when building BitBadges transactions
bitbadges://skills/allSkill InstructionsInstructions for all builder skills
bitbadges://docs/conceptsCore ConceptsCore BitBadges concepts: transferability, approvals, permissions, balances, and address lists
bitbadges://docs/examplesFull ExamplesComplete transaction JSON examples for NFT collections, fungible tokens, and Smart Tokens
bitbadges://recipes/allCode Recipes & Decision MatricesCode snippets and decision matrices for common BitBadges operations
bitbadges://learnings/allLearnings & GotchasKnown gotchas, tips, and discoveries from building with BitBadges
bitbadges://errors/patternsError PatternsCommon error messages mapped to diagnoses and fixes
bitbadges://docs/frontendReference Frontend PatternsPatterns from the BitBadges reference frontend (Next.js + Ant Design). Adapt to your own stack as needed.
bitbadges://workflows/allWorkflow ChainsStep-by-step tool chains for common multi-step BitBadges operations
bitbadges://schema/token-builderToken Builder SchemaAnnotated schema for collection building: design axes, field reference, approval patterns, permission presets, and validation checklist

Call Tools from the CLI

The same registry is reachable from bb dev as plain function calls, with no MCP round-trip.

bash
bb dev tools list                              # full schemas, as JSON
bb dev tools list --names                      # `{ ok, data: { names: [...] } }` envelope; pipe to jq -r '.data.names[]'
bb dev tools call get_current_timestamp
bb dev tools call get_skill_instructions --args '{"skillId":"smart-token"}'
bb dev tools call set_collection_metadata --args-file ./metadata.json --session demo
FlagDescription
--args <json>Tool arguments as inline JSON
--args-file <path>Tool arguments from a JSON file
--session <id>Session id for stateful tools, persisted to ~/.bitbadges/sessions/<id>.json. Defaults to --args.sessionId or the built-in default session
--rawPrint the structured result instead of the formatted text block

Stateful tools (set_*, add_*, remove_*, get_transaction) read and write the named session. Sessions survive across invocations, so an agent can compose a collection across many calls:

bash
SESSION=demo-coin
bb dev tools call set_standards --session $SESSION --args '{"standards":["Fungible Tokens"]}'
bb dev tools call set_valid_token_ids --session $SESSION --args '{"tokenIds":[{"start":"1","end":"1"}]}'
bb dev tools call set_collection_metadata --session $SESSION --args '{"name":"Demo Coin","description":"One million units of token ID 1.","image":"ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/coin.png"}'
bb dev tools call add_approval --session $SESSION --args-file ./approval.json     # the public-mint call from the Tools section
bb dev tools call get_transaction --session $SESSION

Unknown tool names exit 1 and print the available tools on stderr.

bash
bb session list                       # session ids on disk
bb session show demo                  # snapshot as JSON
bb session reset demo                 # delete the file

bb dev resources list                 # full metadata as JSON
bb dev resources list --uris          # URIs only
bb dev resources read bitbadges://recipes/all

Flag-based template builders (bb build <template>) are faster than composing tool calls when a template fits: Build.

Edit this page on GitHub

For agents

How agents read these docs