Skip to main content
Glama
MatiasJF

minter-mcp

by MatiasJF

minter-mcp

Get BSV test tokens into your wallet in seconds, by asking.

An MCP server whose only job is to mint tokens into a running BSV Desktop wallet. Ask Claude for "a STAS token" and it funds a throwaway minter from your own wallet, mints, and registers the result — the token shows up in Assets within seconds.

Supports classic STAS, DSTAS, and BSV-21.

Built for the boring-but-real problem: you're testing a token flow and you need a token right now, and hand-rolling a mint means a contract tx, an issue tx, a funding split, an indexer wait, and — for BSV-21 — a GorillaPool activation dance.

How it works

minter_status   → is the wallet up? is the minter funded?
minter_fund     → your wallet pays the minter   (you approve the prompt in-app)
mint_token      → mint → register → visible in Assets in seconds

The minter is a separate throwaway key that does the issuing; your wallet funds it and receives the tokens. Tokens are minted straight to a wallet-owned receive address, then register-by-txid tells the wallet about the mint immediately.

That last call is the whole trick. Without it you wait for a confirmation and a WhatsOnChain scan; with it the wallet knows straight away.

No MessageBox, no peer-to-peer, no overlay round-trip — it talks to the wallet's local HTTP API on 127.0.0.1:3321 and nothing else.

Related MCP server: BCH MCP Server

Install

Requires BSV Desktop running and signed in on mainnet.

Add to your MCP config (~/.claude.json, or a project .mcp.json):

{
  "mcpServers": {
    "minter": {
      "command": "npx",
      "args": ["-y", "minter-mcp@latest"]
    }
  }
}

Or from a clone:

git clone https://github.com/MatiasJF/minter-mcp.git
cd minter-mcp && npm install && npm run build
{ "mcpServers": { "minter": {
  "command": "node",
  "args": ["/absolute/path/to/minter-mcp/dist/index.js"]
}}}

Use

minter_status
minter_fund { satoshis: 50000, dryRun: false }     → approve the prompt in the wallet
mint_token  { protocol: "stas",   dryRun: false }
mint_token  { protocol: "dstas",  dryRun: false }
mint_token  { protocol: "bsv-21", dryRun: false }

Tool

Spends?

What it does

minter_status

no

Funding address, spendable balance, wallet reachable/signed-in/network. Call this first.

minter_fund

yours

Moves satoshis from your wallet to the minter. Raises the wallet's spending prompt.

mint_token

minter's

Mints one token and registers it into the wallet.

mint_activate_bsv21

minter's

Funds a BSV-21 token id's GorillaPool fee address so WOC/overlays surface it.

~50,000 sats covers several mints. A mint costs roughly 250–500 sats.

Safety

This spends real money on mainnet. Read this bit.

  • Every spending tool defaults to dryRun: true and needs an explicit dryRun: false to broadcast. A dry run does full preflight — balance, wallet state, funding sufficiency — and mutates nothing.

  • Spending your wallet always goes through the wallet's own spending-authorization prompt. This server calls /createAction under a plain non-admin origin precisely so that prompt appears. It cannot be bypassed from here, by design.

  • No tool ever returns key material. minter_status reports where the key came from (env / file / generated), never the key. Everything returned is passed through a redactor that strips secret-named fields and WIF-shaped strings, and the key module exports no WIF at all.

  • The minter's key is generated locally on first use at ~/.stas-minter/wallet.json (mode 0600). No key ships with this package — everyone gets their own.

The minter key is throwaway. Anyone with that file can spend its balance. Keep the balance small. It is stored outside the package directory on purpose: under npx the package lives in a temp cache that gets wiped, which would orphan the balance on every run.

Configuration

Env

Default

Purpose

WALLET_URL

http://127.0.0.1:3321

BSV Desktop apps API

WALLET_ORIGIN

http://localhost:8080

Origin sent to the wallet. Must be non-admin so the spending prompt appears.

MINTER_HOME

~/.stas-minter

Where the minter's key lives

MINTER_WIF

Use an existing minter key instead of the generated file

WOC_BASE

mainnet WOC

WhatsOnChain base URL

ALLOW_UNCONFIRMED

true

Let a mint spend the funding tx's change without waiting a confirmation

Notes and rough edges

  • STAS/DSTAS need the wallet on local storage to be visible. Known bsv-desktop limitation, confirmed on mainnet: the wallet's STAS/DSTAS satellite tables are local-SQLite only, while remote ("cloud") storage keeps outputs elsewhere. Registration then can't resolve the output id, silently skips the satellite link, and still reports success — so the token is on-chain, in the right basket and spendable, but the Assets page never shows it. BSV-21 is unaffected (it renders straight from the basket). If your STAS/DSTAS mints don't appear, check your storage mode before suspecting this tool.

  • Registration is retried (4 attempts). The wallet builds a chained BEEF by walking the mint's ancestry for merkle proofs, and moments after broadcast that can transiently produce a BEEF it then rejects. One attempt is not enough.

  • STAS: stas-js signs at 0.05 sat/b, so a STAS mint can take a while to confirm. It is visible and usable in the wallet regardless — registration doesn't wait for a confirmation.

  • STAS needs a UTXO pair (it consumes utxos[0] and utxos[1] by position), which is why minter_fund splits into 2 outputs by default.

  • DSTAS shares the STAS receive-address namespace. BSV-21 has its own — they are not interchangeable, and a BSV-21 sent to a STAS address is silently orphaned. The server handles this for you.

  • BSV-21 activation (mint_activate_bsv21) is only needed for external discovery (WOC, overlays). The wallet shows the token immediately without it.

  • WhatsOnChain lags a broadcast by seconds to minutes. minter_fund waits for the funding to become spendable before returning.

Development

npm run build
npm test

The suite includes a stdout purity check. stdout is the MCP JSON-RPC channel, but the mint engines log freely — including at import time. guard.ts routes console.* to stderr before any engine loads. Break that and the server looks like it hangs rather than failing, so the test guards it. Another test asserts that listing tools never imports the engines, since importing them generates a key.

The mint engines in engines/ are vendored from the BSV Desktop demo faucet and deliberately not reimplemented — they encode a lot of hard-won detail (ord envelope tags, STAS UTXO positioning, WOC indexing-lag defences).

License

MIT © Matias Jackson

Available Tools

4 tools
mint_activate_bsv21A

Activate a BSV-21 token id with GorillaPool so WOC and overlay indexers surface it. Only needed for external discovery — the wallet already shows the token without this. Polls for the fee address, then pays it 2000 sats.

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview only. Defaults to true. Pass false to actually broadcast — this spends real mainnet satoshis.
tokenIdYesBSV-21 token id, formatted "<64-hex-txid>_<vout>".

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses key behavior: 'Polls for the fee address, then pays it 2000 sats,' revealing both the fee payment and the external action. It could mention irreversibility, but the dryRun parameter in the schema partially covers that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences, each serving a distinct purpose: stating the action, clarifying when it is needed, and describing the process. No waste or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two well-documented parameters and no output schema, the description covers the purpose, the condition for use, and the expected behavior. It is fully sufficient for an agent to decide when and how to invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed descriptions for both tokenId and dryRun, so the description does not need to explain them. The description adds no parameter-specific detail beyond what the schema already provides, meriting the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Activate a BSV-21 token id with GorillaPool' – a specific verb and resource. It further distinguishes the tool from siblings by noting it is 'only needed for external discovery,' clarifying it is not for minting or funding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: 'Only needed for external discovery' and 'the wallet already shows the token without this,' indicating when not to use. It does not explicitly name an alternative tool, but the purpose and siblings make the distinction obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

minter_fundA

Top up the minter from the user's own BSV Desktop wallet. The wallet will show a spending-authorization prompt that the user must approve by hand. Waits for the funding to become spendable.

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview only. Defaults to true. Pass false to actually broadcast — this spends real mainnet satoshis.
satoshisYesTotal satoshis to move from your wallet to the minter. ~50000 covers several mints.
splitIntoNoNumber of funding outputs. Default 2 because classic STAS consumes a UTXO pair; 1 forces an extra pre-split tx.

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses two important behavioral traits: the interactive spending-authorization prompt and the blocking wait for spendability. It does not mention failure modes or that it creates an on-chain transaction, but 'top up' and 'user's own wallet' imply a real transfer of funds.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loaded with the primary purpose, and the second sentence adds crucial behavioral detail. Every word earns its place; no fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a state-changing operation with no output schema and no annotations, the description explains the action, the user prompt, and the wait, but it does not describe what the tool returns (e.g., transaction ID) or what happens if the user rejects the prompt. It is adequate for basic understanding but lacks some contextual depth for an agent to fully anticipate tool behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema itself provides excellent semantics (e.g., dryRun preview vs broadcast, satoshis amount with typical guidance, splitInto with STAS context). The tool description adds no additional parameter meaning, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Top up the minter') and the source ('user's own BSV Desktop wallet'), immediately distinguishing it from sibling tools like mint_token or minter_status. The verb-resource pairing is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: top up the minter when it needs funds before minting. However, there is no explicit guidance on when to use this versus alternatives, nor any when-not-to-use conditions. The sibling tools exist but are not referenced in the description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

minter_statusA

Check whether the minter can mint: its funding address and spendable balance, and whether BSV Desktop is running, signed in, and on which network. Read-only, spends nothing. Call this first.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the transparency burden. It states 'Read-only, spends nothing', which is a critical behavioral trait. It also enumerates the exact checks performed, giving the agent a clear picture of what the tool does without side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, the first states the purpose and checks, the second adds the read-only trait and calling order. Every word is informative, with no repetition of schema or annotation data.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only status tool with no parameters and no output schema, the description provides sufficient context: what is checked, that it's safe, and when to call it. It does not describe the return format, but the enumerated checks give a reasonable expectation of the output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema is trivially 100% covered. The description adds no parameter-specific information because none is needed. This aligns with the baseline of 4 for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks minter status, with specific items (funding address, spendable balance, BSV Desktop running/signed in/network). It is easily distinguished from sibling tools like minter_fund, mint_token, and mint_activate_bsv21, which perform actions rather than status checks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Call this first', providing clear guidance on when to use this tool. It does not mention when-not to use it or explicitly compare with alternatives, but the sibling tools' names make their purposes obvious, and the instruction to call first implies it is a prerequisite.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mint_tokenA

Mint one token into the wallet and register it so it appears in Assets within seconds (no Refresh needed). Requires the minter to be funded — check minter_status first.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoHuman-readable token name. Ignored for bsv-21.
amountNoToken supply. For stas/dstas this is also the satoshi value (1 sat = 1 unit); default 1000. For bsv-21 the supply is free of the satoshi value; default 10000.
dryRunNoPreview only. Defaults to true. Pass false to actually broadcast — this spends real mainnet satoshis.
symbolNoTicker, e.g. "EXSTAS". Defaults per protocol.
protocolYesWhich token standard to mint.

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It mentions the funding requirement and fast registration, but fails to disclose that the tool broadcasts a transaction, spends real satoshis, or that dryRun defaults to true—critical information for a minting operation that affects real funds.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that efficiently conveys purpose, outcome, and prerequisite. It is front-loaded with the action and includes no filler or redundant details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core purpose, prerequisite, and post-mint behavior, which is adequate for a moderately complex tool with a rich schema. It omits the dryRun/execution semantics, but these are documented in the input schema, so the description does not need to repeat them.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters are thoroughly documented in the schema itself. The description adds no parameter-specific meaning, meeting the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Mint one token into the wallet') and the outcome ('appears in Assets within seconds'), making the tool's purpose immediately understandable. It distinguishes itself from sibling tools like minter_status, minter_fund, and mint_activate_bsv21 by focusing on the minting action rather than status checks, funding, or protocol activation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs to 'check minter_status first' as a prerequisite, providing clear context for when to use this tool. However, it does not explicitly mention when not to use it or direct users to minter_fund or mint_activate_bsv21, so it falls short of a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedmint_activate_bsv21
    • First observedmint_token
    • First observedminter_fund
    • First observedminter_status

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clear, distinct purpose: status checks readiness, fund supplies the minter, mint_token creates a token, and mint_activate_bsv21 handles external discovery. No overlapping responsibilities.

Naming Consistency4/5

All tools share the 'minter_' prefix, but the suffixes mix nouns (status), verbs (fund), and verb+object patterns (mint_token, mint_activate_bsv21). The consistent prefix helps, but the style is not uniform.

Tool Count5/5

Four tools perfectly cover the minter's lifecycle: check, fund, mint, and activate. Neither sparse nor bloated for the stated purpose.

Completeness5/5

The expected workflow is fully covered: verify status, fund if needed, mint a token, and activate for external visibility. There are no obvious dead ends or missing operations for the domain.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers