MCP Builder Tools
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.
# 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 | shTo 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
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(roothttps://mcp.bitbadges.iois also aliased) - Transport: MCP Streamable HTTP (
POSTJSON-RPC 2.0,GETSSE withMcp-Session-Id,DELETEsession teardown) - Profiles: Append
?profile=core(default),codemode,readonly,session,queries, orfull - Discovery:
https://mcp.bitbadges.io/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-server - Auth headers:
x-api-key: <your-key>(from bitbadges.io/developer) orAuthorization: Bearer <siwbb-token>
# Claude Code (remote Streamable HTTP)
claude mcp add --transport http bitbadges https://mcp.bitbadges.io/mcp{
"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:
{
"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:
claude mcp add bitbadges-builder -- bitbadges-builderOr install the Claude Code Plugin, which wires the same server and adds 8 workflow skills plus /bitbadges:setup and /bitbadges:status:
/plugin marketplace add BitBadges/bitbadges-plugin
/plugin install bitbadgesThe plugin is a convenience layer. The CLI install is what runs underneath.
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"bitbadges-builder": {
"command": "bitbadges-builder",
"args": [],
"env": {
"BITBADGES_API_KEY": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
}
}
}Environment Variables
| Variable | Required | Description |
|---|---|---|
BITBADGES_API_KEY | For queries, simulation, broadcast, and review links | Your BitBadges API key (get one) |
BITBADGES_API_URL | No | Override the API base (default https://api.bitbadges.io) |
BITBADGES_FRONTEND_URL | No | Override the site base used in review links (default https://bitbadges.io) |
BITBADGES_CONFIG_DIR | No | Separate CLI configuration, sessions, and signing-request files; useful for isolated agent environments |
BITBADGES_CLI_PATH | No | Trusted installed CLI executable for standard actions; defaults to bitbadges-cli on PATH |
BITBADGES_MCP_TOOLSETS | No | Comma-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:
{
"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.
bb dev capabilities standard_pay_requests_pay
bb pay-requests pay 46 --creator "$PAYER" --obligation payment-1 --units 1 --mainnetEquivalent MCP arguments for standard_pay_requests_pay:
{
"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).
| Tool | What it does | Key params |
|---|---|---|
add_alias_path | Add 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_approval | Add 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_path | Add 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_approval | Add a collection approval using a named preset (canonical skill shape) instead of hand-writing the 60-line approvalCriteria JSON. | presetId*, params*, overrides |
add_transfer | Append 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_url | FINAL 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_transaction | Get the assembled transaction JSON with metadataPlaceholders. Call this after building to retrieve the final output. Numbers are auto-converted to strings. | none |
list_presets | List named approval presets available for a skill. Each descriptor includes presetId, name, description, and paramsSchema. | skill |
remove_alias_path | Remove an alias path by denom. | denom* |
remove_approval | Remove 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_path | Remove a Cosmos wrapper path by denom. | denom* |
remove_transfer | Remove a MsgTransferTokens from the session by message index. Index must be >= 1 (messages[0] is always the collection and cannot be removed). | index* |
reset_session | Clear 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_metadata | Set 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_metadata | Set 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_data | Set custom data string on the collection. Can be any JSON or text, stored on-chain. | customData* |
set_default_balances | Set 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_invariants | Set collection invariants (on-chain constraints). Cannot be removed after creation. | invariants* |
set_is_archived | Archive or unarchive a collection. Archived collections are hidden from browsing but still exist on-chain. | isArchived* |
set_manager | Set the collection manager address. Manager controls collection updates within permission bounds. Defaults to creator address. | manager* |
set_mint_escrow_coins | Set coins to fund the mint escrow address on collection creation. Required for quest rewards and escrow payouts where coinTransfers use overrideFromWithApproverAddress. | coins* |
set_permissions | Set collection permissions. Use a preset ("locked-approvals" recommended) or provide custom permissions. Fields are either FROZEN (permanentlyForbiddenTimes: FOREVER) or NEUTRAL (empty []). | preset, permissions |
set_standards | Set the standards array for the collection. Standards signal to the frontend which dedicated views to show and define structural conventions. | standards* |
set_token_metadata | Set 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_ids | Set 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>.
| Tool | What it does | Key params |
|---|---|---|
build_address_list | Prepare 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_auction | Prepare 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_bid | Prepare 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_bounty | Prepare 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_token | Prepare 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_crowdfund | Prepare 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_2fa | Prepare 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_intent | Prepare 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_listing | Prepare 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_request | Prepare 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_v2 | Build 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_intent | Prepare 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_intent | Prepare 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_market | Prepare 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_catalog | Prepare 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_quests | Prepare 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_token | Prepare 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_credit | Prepare 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_subscription | Prepare 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_vault | Prepare 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.
| Tool | CLI equivalent | Params |
|---|---|---|
standard_auctions_accept_bid | bb auctions accept-bid | collectionId*, bidApprovalId*, creator*, bidder* |
standard_auctions_cancel_bid | bb auctions cancel-bid | collectionId*, approvalId*, creator* |
standard_auctions_list | bb auctions list | open |
standard_auctions_place_bid | bb auctions place-bid | collectionId*, creator*, amount*, denom*, baseUnits, approvalId |
standard_auctions_show | bb auctions show | collectionId* |
standard_auctions_status | bb auctions status | collectionId* |
standard_bounties_accept | bb bounties accept | collectionId*, creator* |
standard_bounties_claim_refund | bb bounties claim-refund | collectionId*, creator* |
standard_bounties_deny | bb bounties deny | collectionId*, creator* |
standard_bounties_list | bb bounties list | mine, open |
standard_bounties_show | bb bounties show | collectionId* |
standard_bounties_status | bb bounties status | collectionId* |
standard_credit_tokens_list | bb credit-tokens list | collectionId* |
standard_credit_tokens_purchase | bb credit-tokens purchase | creator*, units*, collectionId, tier, apiCredits |
standard_credit_tokens_quote | bb credit-tokens quote | collectionId*, units*, tier |
standard_credit_tokens_show | bb credit-tokens show | collectionId* |
standard_crowdfunds_contribute | bb crowdfunds contribute | collectionId*, creator*, amount*, baseUnits |
standard_crowdfunds_list | bb crowdfunds list | mine, open |
standard_crowdfunds_refund | bb crowdfunds refund | collectionId*, creator*, amount*, baseUnits |
standard_crowdfunds_show | bb crowdfunds show | collectionId* |
standard_crowdfunds_status | bb crowdfunds status | collectionId* |
standard_crowdfunds_withdraw | bb crowdfunds withdraw | collectionId*, creator* |
standard_ibc_token_show | bb ibc-token show | collectionId* |
standard_ibc_token_status | bb ibc-token status | collectionId* |
standard_ibc_token_unwrap | bb ibc-token unwrap | collectionId*, creator*, amount*, denom, tokenId, baseUnits, approvalId |
standard_ibc_token_wrap | bb ibc-token wrap | collectionId*, creator*, amount*, denom, tokenId, baseUnits, approvalId |
standard_issuer_controlled_freeze | bb issuer-controlled freeze | collectionId*, creator* |
standard_issuer_controlled_mint | bb issuer-controlled mint | collectionId*, creator*, to*, tokenId, amount, approvalId |
standard_issuer_controlled_revoke | bb issuer-controlled revoke | collectionId*, creator*, from*, tokenId, amount, approvalId |
standard_issuer_controlled_show | bb issuer-controlled show | collectionId* |
standard_issuer_controlled_status | bb issuer-controlled status | collectionId* |
standard_issuer_controlled_transfer | bb issuer-controlled transfer | collectionId*, creator*, from*, to*, tokenId, amount, approvalId |
standard_pay_requests_deny | bb pay-requests deny | collectionId*, creator* |
standard_pay_requests_list | bb pay-requests list | mine, open |
standard_pay_requests_pay | bb pay-requests pay | collectionId*, creator*, obligation, units |
standard_pay_requests_show | bb pay-requests show | collectionId* |
standard_pay_requests_status | bb pay-requests status | collectionId* |
standard_prediction_markets_buy_no | bb prediction-markets buy-no | collectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId |
standard_prediction_markets_buy_yes | bb prediction-markets buy-yes | collectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId |
standard_prediction_markets_cancel | bb prediction-markets cancel | collectionId*, approvalId*, creator*, side* |
standard_prediction_markets_deposit | bb prediction-markets deposit | collectionId*, creator*, amount* |
standard_prediction_markets_list | bb prediction-markets list | open |
standard_prediction_markets_quote | bb prediction-markets quote | collectionId*, state*, pairAmount, yesAmount, noAmount, yesBalance, noBalance |
standard_prediction_markets_redeem | bb prediction-markets redeem | collectionId*, creator*, state*, pairAmount, yesAmount, noAmount, yesBalance, noBalance |
standard_prediction_markets_resolve | bb prediction-markets resolve | collectionId*, creator*, outcome* |
standard_prediction_markets_sell_no | bb prediction-markets sell-no | collectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId |
standard_prediction_markets_sell_yes | bb prediction-markets sell-yes | collectionId*, creator*, tokenAmount*, paymentAmount*, denom*, baseUnits, approvalId |
standard_prediction_markets_show | bb prediction-markets show | collectionId* |
standard_prediction_markets_status | bb prediction-markets status | collectionId* |
standard_products_list | bb products list | collectionId* |
standard_products_purchase | bb products purchase | collectionId*, creator*, tokenId* |
standard_products_show | bb products show | collectionId* |
standard_smart_tokens_deposit | bb smart-tokens deposit | collectionId*, creator*, amount*, baseUnits, approvalId |
standard_smart_tokens_list | bb smart-tokens list | none |
standard_smart_tokens_show | bb smart-tokens show | collectionId* |
standard_smart_tokens_status | bb smart-tokens status | collectionId* |
standard_smart_tokens_withdraw | bb smart-tokens withdraw | collectionId*, creator*, amount*, baseUnits, approvalId |
standard_spendable_credits_consume | bb spendable-credits consume | collectionId*, creator*, units*, requestId* |
standard_spendable_credits_purchase | bb spendable-credits purchase | collectionId*, creator*, units*, approvalId |
standard_spendable_credits_quote | bb spendable-credits quote | collectionId*, units*, approvalId |
standard_spendable_credits_show | bb spendable-credits show | collectionId* |
standard_standards_inspect | bb standards inspect | collectionId*, family* |
standard_subscriptions_cancel | bb subscriptions cancel | collectionId*, creator*, tier |
standard_subscriptions_charge_due | bb subscriptions charge-due | collectionId*, creator*, tier, dryRun |
standard_subscriptions_claim | bb subscriptions claim | collectionId*, creator*, tier |
standard_subscriptions_enable_renewal | bb subscriptions enable-renewal | collectionId*, creator*, tier, tip, approvalId |
standard_subscriptions_list | bb subscriptions list | collectionId* |
standard_subscriptions_status | bb subscriptions status | collectionId*, address* |
standard_subscriptions_subscribe | bb subscriptions subscribe | collectionId*, creator*, tier, tip, approvalId |
standard_vault_deposit | bb vault deposit | collectionId*, creator*, amount*, baseUnits, approvalId |
standard_vault_emergency_migrate | bb vault emergency-migrate | collectionId*, creator*, from*, amount*, baseUnits |
standard_vault_list | bb vault list | none |
standard_vault_show | bb vault show | collectionId* |
standard_vault_status | bb vault status | collectionId* |
standard_vault_withdraw | bb vault withdraw | collectionId*, creator*, amount*, baseUnits, approvalId |
Helper Builders
| Tool | What it does | Key params |
|---|---|---|
build_claim | Build 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_store | Build 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_transfer | Build 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
| Tool | What it does | Key params |
|---|---|---|
analyze_collection | Query 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_collection | Generate a human-readable explanation of a collection. Works on build results, transaction JSON, or on-chain query results. | collection*, question, audience |
flag_review_item | Flag 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_collection | Run 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
| Tool | What it does | Key params |
|---|---|---|
simulate_transaction | Dry-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_transaction | Validate 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.
| Tool | What it does | Key params |
|---|---|---|
lookup_token_info | Get token info by symbol or IBC denom. Returns symbol, IBC denom, decimals, and pre-generated backing address. | query* |
query_balance | Check 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_collection | Fetch 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_store | Query 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 |
search | Search collections, accounts, and tokens. Requires BITBADGES_API_KEY environment variable. | query* |
search_plugins | Search 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_ownership | Verify 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.
| Tool | What it does | Key params |
|---|---|---|
generate_alias_path | Build alias path for liquidity pools and token display. Creates properly formatted alias path for swappable tokens. | symbol*, decimals*, tokenId, metadataUri, name, description |
generate_approval | Build 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_address | Compute deterministic backing address for an IBC denom. Returns the backing address and pre-computed list IDs for Smart Token approvals. | ibcDenom* |
generate_permissions | Build permission presets for collections. Generates properly formatted collection permissions for common configurations. | preset*, customPermissions |
generate_unique_id | Generate 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_address | Generate 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
| Tool | What it does | Key params |
|---|---|---|
convert_address | Convert between ETH (0x) and BitBadges (bb1) address formats | address*, targetFormat |
diagnose_error | Diagnose BitBadges transaction errors and get suggested fixes. Pass the error message and optionally the context of what you were doing. | error*, context |
get_current_timestamp | Get current timestamp in milliseconds for time-dependent configurations. Includes helper values for common time offsets and durations. | offsetMs, offsetDays, offsetHours |
search_knowledge_base | Search 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_address | Check if an address is valid and detect its chain type | address* |
Discovery, Instructions, and Docs
Rendered skill pages: Skills.
| Tool | What it does | Key params |
|---|---|---|
fetch_docs | Use 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_capabilities | Discover installed CLI/MCP operations without fetching full schemas. Supply id for one operation schema. Equivalent to bb dev capabilities [id]. | id |
get_skill_instructions | Get 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_standards | Discover installed standard lifecycle support and limitations. Supply id for builders, actions, required inputs, and unsupported operations. Equivalent to bb dev standards [id]. | id |
list_skills | List 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.
| Tool | What it does | Key params |
|---|---|---|
validate_intent | Validate an intent sidecar, reject contradictory constraints, and list decisions requiring clarification. | intent* |
verify_intent | Compare 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_repairs | Check 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
| Tool | What it does | Key params |
|---|---|---|
list_signing_requests | List saved local browser request IDs. Does not sign or submit. | none |
request_browser_review | Create 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_status | Inspect 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.
| Tool | What it does | Key params |
|---|---|---|
environment_diagnostics | Inspect local lifecycle runner availability and configured service readiness without returning credentials or making network calls. | none |
get_lifecycle_capabilities | Discover experimental local lifecycle reference coverage for every installed standard, exclusions, and use/avoid guidance. Offline; no runner required. Not product certification. | none |
get_lifecycle_template | Read 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_schema | Read the installed local runner scenario schema, including assertions and time controls. Offline; requires the optional runner executable. | none |
run_lifecycle | Experimental: execute supplied assertions in isolated local module state. Not product certification. Never signs or broadcasts. Required external coverage remains unverified. | scenario*, requiredCoverage |
verify_lifecycle_intent | Experimental: 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:
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:
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)- Build. Call the per-field tools in parallel: standards, token IDs, invariants, approvals, permissions, metadata, balances.
- Auto-mint (optional). Call
add_transferto append aMsgTransferTokensnext to the collection creation. - Verify. Call
validate_transaction,review_collection, andsimulate_transactionin parallel. Fix errors with a targetedremove_approvaland re-add. - Export. Call
get_transactionfor the final JSON. - Hand off. Call
get_review_urland give the userreviewUrl. Prefer the link over pasting JSON: it is short and cannot be corrupted in transit.
Query and Verification (No Signing)
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".
- Build the collection with a mint approval (
add_approvalwithfromListId: "Mint"andinitiatedByListId: <creator address>). - Call
add_transferwith the recipient addresses, balances, andprioritizedApprovalsthat reference the mint approval. - 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_urlreturnsreviewUrl, where the user reviews and signs with a browser wallet. It is backed by aprv_code fromPOST /api/v0/builder/preview. Uploading the preview needsBITBADGES_API_KEY; opening the returned link needs none, because the unguessable code is the secret. The code expires in 1 hour.BITBADGES_FRONTEND_URLor thefrontendUrlparam points the link at testnet or a local site; a testnetBITBADGES_API_URLinfershttps://testnet.bitbadges.io.- Save
get_transactionoutput to a file and runbb preview tx.json --open, orbb deploy --browser/--burnerfrom 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 URI | Name | Description |
|---|---|---|
bitbadges://tokens/registry | Token Registry | IBC denoms, symbols, decimals, and pre-generated backing addresses for BitBadges |
bitbadges://rules/critical | Critical Rules | Critical rules that must be followed when building BitBadges transactions |
bitbadges://skills/all | Skill Instructions | Instructions for all builder skills |
bitbadges://docs/concepts | Core Concepts | Core BitBadges concepts: transferability, approvals, permissions, balances, and address lists |
bitbadges://docs/examples | Full Examples | Complete transaction JSON examples for NFT collections, fungible tokens, and Smart Tokens |
bitbadges://recipes/all | Code Recipes & Decision Matrices | Code snippets and decision matrices for common BitBadges operations |
bitbadges://learnings/all | Learnings & Gotchas | Known gotchas, tips, and discoveries from building with BitBadges |
bitbadges://errors/patterns | Error Patterns | Common error messages mapped to diagnoses and fixes |
bitbadges://docs/frontend | Reference Frontend Patterns | Patterns from the BitBadges reference frontend (Next.js + Ant Design). Adapt to your own stack as needed. |
bitbadges://workflows/all | Workflow Chains | Step-by-step tool chains for common multi-step BitBadges operations |
bitbadges://schema/token-builder | Token Builder Schema | Annotated 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.
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| Flag | Description |
|---|---|
--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 |
--raw | Print 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:
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 $SESSIONUnknown tool names exit 1 and print the available tools on stderr.
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/allFlag-based template builders (bb build <template>) are faster than composing tool calls when a template fits: Build.