@bsv/mcp
OfficialProvides tools and prompts for Bitcoin SV development, enabling code search, function definition lookup, and BRC standard retrieval.
Retrieves Bitcoin Request for Comments (BRC) markdown files directly from the bitcoin-sv/BRCs GitHub repository.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@bsv/mcpfind the definition of the 'sign' function in ts-sdk"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BSV AI DevKit
Tools and dated knowledge for building BSV applications with AI coding agents, testnet first. This repository holds the @bsv/mcp server, the bsv-dev agent skill, the content both of them serve, and sample apps.
What is here
Path | What it is |
| The single source of facts and rules: dated facts ( |
|
|
| The |
| Private build step: renders |
| Sample apps; see |
| The design spec and implementation plans ( |
| Clones the BSV repositories that |
Related MCP server: SkyDeckAI Code
Install
Skill (any agent that reads Agent Skills):
npx skills add bsv-blockchain/bsv-ai-toolkitClaude Code plugin (skill plus MCP):
claude plugin marketplace add bsv-blockchain/bsv-ai-toolkit && claude plugin install bsv-dev@bsvMCP server only, in Claude Code:
claude mcp add bsv-mcp -e BSV_NETWORK=testnet -- npx -y @bsv/mcp@bsv/mcp 2.0.0 is not released yet. Until it is, npx @bsv/mcp resolves the 1.x release, which this README does not describe; run 2.0.0 from a clone instead (see Development).
Other MCP clients take the same command in their JSON configuration:
{
"mcpServers": {
"bsv-mcp": {
"command": "npx",
"args": ["-y", "@bsv/mcp"],
"env": { "BSV_NETWORK": "testnet" }
}
}
}Local code search (optional). code_search and find_function_definition need local clones; brc_lookup uses them when present. Clone them and pass the directory to the server:
./setup.sh ~/bsv-repos # ts-stack, BRCs, broadcaster, bsv-desktop, go-wallet-toolbox, runar (shallow)
./setup.sh --list # just print the repository URLs
claude mcp add bsv-mcp -e BSV_NETWORK=testnet -e BSV_REPOS_DIR="$HOME/bsv-repos" -- npx -y @bsv/mcpThe server starts without BSV_REPOS_DIR; the two search tools then answer with a hint to run setup.sh. Install ripgrep (rg) for faster search; without it they fall back to grep.
Testnet coins. Get them from the faucet at bsvfaucet.com: sign in with a BSV wallet, up to 10M satoshis per request, one request per 24 hours. Mainnet has no faucet.
@bsv/mcp tools
Tool | Input | What it does |
|
| Broadcasts raw or EF hex to BSV Broadcaster (formerly Arcade) |
|
| Reads |
|
| Reads |
|
| Reads |
|
| Statically checks a project against the guardrails and returns findings ( |
|
| Returns a BRC as Markdown: local clone first ( |
| none | Compares the pinned stack in |
|
| Resolves a docs id from |
|
| Regex search with ripgrep ( |
|
| Finds likely definitions of a function, method or constant (TypeScript, JavaScript, Python, Go, Rust, Java) under |
A transaction is final for an app at SEEN_ON_NETWORK or later with no competingTxs; broadcaster_status reports exactly that as isFinalForApp. Nothing in the kit waits for MINED.
Suppress a check_guardrails finding with // bsv-guardrail-ignore G-xx reason (or the #, <!--, /* comment forms) on the flagged line or the line above.
For repo maintainers, node packages/mcp/build/cli/versions-check.js [--json] [--max-age-days N] (after pnpm build) prints the versions_check table and exits 1 on drift or on a verified date older than N days (default 60). With GITHUB_TOKEN set, it sends that token to api.github.com (and nowhere else) to lift GitHub's unauthenticated rate limit.
Resources and prompts
Resources. Each Markdown resource starts with verified: YYYY-MM-DD and source: @bsv/mcp v<version>; bsv://docs/index is JSON carrying the same two fields.
URI | Content |
| Dated facts, one resource per file |
| Every guardrail |
| One guardrail, e.g. |
| Shape A (the user's wallet holds the keys) and shape B (a server wallet does) |
| What a BSV app defends against, what it does not, and what it must tell users |
| Docs ids, paths and titles; resolve an id with |
| The |
| A BRC as Markdown, e.g. |
Prompts.
Prompt | Arguments | Purpose |
|
| Run |
|
| Build BRC-162 1Color token outputs (encoding guidance only) |
|
| Add |
|
| Add one |
|
| Diagnose a |
Environment
Variable | Default | Meaning |
|
|
|
| per network | BSV Broadcaster base URL. Defaults: testnet |
| unset | Deprecated: the old name of |
| unset |
|
| unset | Directory filled by |
| unset | Optional WhatsOnChain key, reserved for |
| unset | Test suite only: |
Safety
Testnet by default. With no configuration the server uses testnet and the testnet BSV Broadcaster. Mainnet is real money and is used only when you configure it.
Set
BSV_NETWORK=mainnetfor any mainnet BSV Broadcaster, including custom and self-hosted hosts. The MCP gates mainnet broadcast on the configured network, not on the URL: it refuses known mainnet hosts while on testnet, but it cannot classify a host it does not know, so an unknown mainnet BSV Broadcaster underBSV_NETWORK=testnetwould be treated as testnet.Mainnet broadcast needs a second switch. On mainnet,
broadcaster_submitalso requiresBSV_MCP_ALLOW_MAINNET_BROADCAST=1; without it the tool returns an error before contacting BSV Broadcaster.Network and host must agree. A
BSV_BROADCASTER_URLthat is a known host of the other network stops the server at startup, andbroadcaster_submitrefuses abroadcasterUrlthat is a known host of the other network. The Teranode test network host (arcade-v2-ttn-us-1.bsvblockchain.tech) is neither testnet nor mainnet; it is accepted only when you name it, with a warning. Read-only tools (broadcaster_status,broadcaster_policy,broadcaster_health) may query any BSV Broadcaster.No keys. No tool takes, stores or signs with a private key, WIF or seed phrase;
broadcaster_submitbroadcasts transactions that are already signed.check_guardrailsonly reads the project, and the prompts tell the agent never to ask for or print a key.Logs. The startup line on stderr shows the BSV Broadcaster origin only, never its path, query or credentials.
Development
Requires Node 22 or later (the tipping sample needs 22.9 or later) and pnpm. The repo pins pnpm 11.22.0 in packageManager; run corepack enable once and corepack picks that version. Node 25 and later no longer bundle corepack; there, or wherever corepack is missing, run npm install -g pnpm@11.22.0 instead.
corepack enable # or, on Node 25+ or without corepack: npm install -g pnpm@11.22.0
pnpm install
pnpm build # every package
pnpm test # every package; live-service tests run only with BSV_MCP_NETWORK_TESTS=1
pnpm sync # render content/ into packages/mcp/content and the skill references
pnpm sync:check # exit 1 and list the paths when a generated file is out of date
pnpm check:facts # every fact carries a verified date (--max-age-days N to bound its age)
pnpm check:links # every URL in content/ answers (calls the network)Edit facts and guardrails in content/, run pnpm sync, and commit the generated files with the change; CI fails when they drift.
To run the local build from Claude Code:
claude mcp add bsv-mcp-dev -e BSV_NETWORK=testnet -- node "$PWD/packages/mcp/build/index.js"Release
Releases are cut by pushing a tag v<version> that matches packages/mcp/package.json. The release.yml workflow runs on v* tags only: it builds, tests, checks that generated content is current, and publishes @bsv/mcp with npm trusted publishing (GitHub OIDC, with provenance), so no long-lived npm token exists anywhere. Pushing to main never publishes. Changes are recorded in CHANGELOG.md.
What must be true before and after the first release is tracked in the phase-1 exit checklist.
License
MIT; see LICENSE.md.
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Search and fetch vibe-coding Agent Skills (SKILL.md files) and prompts from TheSkillVault library.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI-driven development tools including file system operations, multi-language code analysis with tree-sitter, Git operations, code execution, and system information retrieval.MIT
- AlicenseNot gradedqualityDmaintenanceProvides tools for AI-driven development workflows including file system operations, code analysis, code execution, web fetching, and search.Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables LLM-powered IDEs to search PyBaMM documentation and source code, with tools for full-text search, reading doc pages, and browsing source files from a local clone.1-
- FlicenseAqualityDmaintenanceEnables natural language code search across multiple local Git repositories, allowing users to register projects, search for code, and explore file structures through Claude.6-