Thanks for your interest in contributing! bitcoin-mcp is the most comprehensive Bitcoin MCP server — 49 tools, 6 prompts, 7 resources, zero config. Every contribution makes AI agents smarter about Bitcoin.
git clone https://github.com/Bortlesboat/bitcoin-mcp.git
cd bitcoin-mcp
pip install -e ".[dev]"
pytestAll tests pass without a Bitcoin node — everything is mocked.
Browse issues labeled good first issue — these are well-scoped with clear expected inputs/outputs and pointers to the relevant code.
help wanted issues are slightly more involved but still approachable. Read the issue description — it will tell you exactly which files to edit and what pattern to follow.
Not sure what to build? Here are always-useful contributions:
- New tools that expose Bitcoin data AI agents frequently need
- Better error messages that help agents self-recover
- Test coverage for edge cases (invalid addresses, empty mempool, etc.)
- Usage examples in
examples/
- Find a similar tool in
src/bitcoin_mcp/server.pyand use it as a template - Add your tool with the
@mcp.tool()decorator - Write a clear docstring — the LLM uses this to decide when to call your tool
- Add at least 2 tests in
tests/test_server.py - Update the tool count in
README.mdbadges if your PR adds tools
- Return structured JSON, not prose
- Keep responses compact — no
indent=2(saves LLM tokens) - Cap large list responses (e.g., max 20 peers, max 50 transactions)
- Include an
errorkey with a human-readable message on failures - Tool descriptions should be specific enough that an LLM picks the right tool
@mcp.tool()
async def get_something(param: str) -> str:
"""
One sentence: what this tool does and when to use it.
Args:
param: What this parameter controls.
Returns structured JSON with: field1, field2, ...
"""
try:
data = await _rpc("method", [param])
return json.dumps({"result": data})
except Exception as e:
return json.dumps({"error": str(e)})Resources provide always-available context (no tool call needed). Use @mcp.resource("bitcoin://category/name").
See existing resources near the bottom of server.py for examples.
- One tool per PR — easier to review and merge
- Tests required — every new tool needs at least 2 tests (happy path + error case)
- No breaking changes — don't rename existing tools or change their output schema
- Commit style —
feat: add get_address_transactions toolorfix: handle empty mempool in analyze_mempool
pytest tests/ -v # all tests
pytest tests/ -k "test_fees" -v # specific tests
pytest tests/ --tb=short # compact output- Tests pass locally (
pytest) - New tool/resource has at least 2 tests
- README badge counts updated (if adding tools/resources/prompts)
- Docstring is clear and specific
- Response is compact JSON (no extra whitespace)
Open an issue or reach out at https://bitcoinsapi.com.