btctx-mcp

v2.0.3
btctx-mcp Checked 38 minutes ago Published 3 days ago

MCP server that lets an AI assistant add and correct transactions in a BitcoinTX ledger

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_ledger_guide

How to map exchange emails, wallet history and plain English onto BitcoinTX accounts, transaction types and tax fields. Read this before adding transactions.

get_portfolio

Current balance of every account, the user's accounts (each by id, name, kind: bank, wallet or exchange, currency, its exchange's name, and whether it's hidden in Settings), average cost basis per BTC, the live BTC price and where it came from (or, when there's none, BitcoinTX's reason in btc_price_unavailable), and the user's tax timezone (dates without a timezone are interpreted in it). Useful to reconcile against what the user's cold wallet or exchange actually shows.

list_transactions

Find recorded transactions, newest first. Filter by date range (YYYY-MM-DD, inclusive, days in the user's tax timezone), type, and an account on either side. Use it to find an id before updating or deleting. A transaction with values BitcoinTX filled in from a price has from_price: which values, and that price's hour (or day) in UTC, source and USD per BTC.

ParameterTypeDescription
account
end_date
limitinteger
start_date
type

get_btc_price

BTC price in USD. For a transaction, pass its date and time as you would to add_transactions (e.g. 2025-07-31T21:05:00, in the tax timezone unless an offset is given): you get the price BitcoinTX itself uses for income, spending and fees, the price when that hour began (UTC), or that day's 00:00 UTC price where it has no hourly one ("moment" says which). A date alone (YYYY-MM-DD) gives that UTC day's 00:00 price; with no date, the price right now. Use it to value income, spending, or gifts when the user doesn't know the USD amount. "source" says where the price came fro…

ParameterTypeDescription
date

review_ledger

Read-only Ledger review: saved transactions worth a second look (transactions naming an account that doesn't exist, or none, which the owner edits into an account or deletes; figures Recalculate Ledger would change; Spent withdrawals saved with $0 proceeds; Lost withdrawals still carrying a loss; BTC withdrawals whose purpose isn't Spent, Gift, Donation or Lost (each counts as Spent until the owner chooses; only the owner knows which it was: ask, never guess; as Spent with none recorded, its proceeds are what the owner got for it); BTC deposits, not income or a rebate,…

preview_transactions

Dry run: validate transactions, auto-fill missing USD values from historical prices (each row's simulated.from_price says which of simulated's values and the price: its hour or day in UTC, source and USD per BTC; gross_proceeds_usd is before the fee), flag rows already in the ledger (duplicate: the same type, accounts, BTC amount, source or purpose, a Buy's cost basis, and minute, or day for a date alone) or like one (possible_duplicate: the same amount within 48 hours, the warning says what differs), and simulate the result, Per-wallet FIFO (gain/loss, holding period,…

ParameterTypeDescription
transactions *array

add_transactions

Save transactions to the ledger, all-or-nothing. Only call after preview_transactions and the user's confirmation, with the previewed rows. Each created row's from_price says which values came from a price and its hour, source and USD per BTC. Duplicates are skipped (keep them in the list: dropping one can leave an identical row beside it skipped instead), unless the user says one is another transaction: then send that row with not_a_duplicate_of set to the matched_transaction_id the preview gave it (and each identical row beside it too, or send that row in a call of it…

ParameterTypeDescription
transactions *array
confirmOnly after the user said yes to this change of an earlier tax year: the confirm this tool's earlier answer gave (saved: false), with the same arguments as then. Never set it on your own.

update_transaction

Change fields of one existing transaction (only the fields you pass). The whole ledger is recalculated, so gains on later sales may change. Confirm with the user first. A change that would move the figures of an earlier tax year (one the user may already have filed) isn't saved at first: the answer is saved: false with the years, the changes and a confirm. Show them to the user, and only if they say yes, call again with the same arguments and confirm set to that confirm. date is read as add_transactions reads it: without a timezone, in the user's tax timezone (a bar…

ParameterTypeDescription
transaction_id *integer
acquired_at
amount
broker_reporting
chosen_coinsOnly for a Transfer to another account, or a BTC Withdrawal, from one of the user's wallets, and only when the user says they chose which coins to send by the time they left, with a record from then (…
confirmOnly after the user said yes to this change of an earlier tax year: the confirm this tool's earlier answer gave (saved: false), with the same arguments as then. Never set it on your own.
confirm_moveconfirm's older name, the same value: send confirm.
cost_basis_usd
date
fee_amount
fee_currency
fee_usd
fmv_usd
from_account
proceeds_usd
purpose
source
to_account
type

get_coins_moved

The coins a saved Transfer, Sell or BTC Withdrawal takes, as BitcoinTX works them out: each piece's date acquired, BTC, cost and whether it was inherited, in the order taken, and the BTC its network fee disposes of. A sale's or a spend's pieces also give proceeds_usd, gain_usd and term (LONG or SHORT), as Form 8949 prints them; a gift's, donation's or lost coins' give the term only. A BTC network fee is a disposal of its own, on Form 8949 apart (taxable even for a gift), never among the pieces. Without a choice, the From account's oldest coins first; with one (chosen_co…

ParameterTypeDescription
transaction_id *integer

delete_transaction

Permanently delete one transaction. The ledger is recalculated afterward. Confirm with the user first and tell them what you're deleting. A deletion that would change the figures of an earlier tax year isn't made at first: the answer is saved: false with the years, the changes and a confirm. Show them to the user, and only if they say yes, call again with confirm.

ParameterTypeDescription
transaction_id *integer
confirmOnly after the user said yes to this change of an earlier tax year: the confirm this tool's earlier answer gave (saved: false), with the same arguments as then. Never set it on your own.

recalculate_ledger

Rebuild all cost-basis lots, disposals and gains from the recorded transactions. Run it only when the user asks (after an upgrade, review_ledger shows first what it would change). Transactions themselves are not changed. When it would change the figures of an earlier tax year (rules fixed since rows were saved), it doesn't run at first: the answer is saved: false with the years, what changes (pending) and a confirm. Show them to the user, and only if they say yes, call again with confirm.

ParameterTypeDescription
confirmOnly after the user said yes to this change of an earlier tax year: the confirm this tool's earlier answer gave (saved: false), with the same arguments as then. Never set it on your own.

backup_ledger

Save a copy of the whole BitcoinTX database next to it on the user's server (in its backups folder), as a safety net. Offer it before a large import or before deleting or changing many entries. BitcoinTX keeps the newest 3 copies (and for a week the oldest and the first copy of each day it made before you changed anything that day, and for a day the first copy of each hour it made before a change) and makes at most one a minute; only the file name comes back. Restoring a copy is done by the user, not by you.