Crypto Tax Calculator (MPP + x402): capital gains, cost basis, Form 8949, Canada ACB/Schedule 3 - from $0.01

Pay-per-report crypto tax engine for agents and holders who would rather pay in stablecoins than buy a $49-$199 yearly plan: realized gains with FIFO, LIFO, HIFO, average or Canadian ACB (superficial-loss rule), short/long term, staking and airdrop income, IRS Form 8949 rows with the 2025+ digital-asset boxes G-L and Schedule D line totals, Canada Schedule 3 at 50% inclusion, tax-loss harvesting candidates, and Coinbase / Koinly-universal / generic CSV import. Up to 5,000 transactions per call; nothing stored. Pay with MPP on Tempo (USDC.e/pathUSD) or x402 on Base (USDC). Bad input returns 402 with the row errors and is not charged. Information, not tax advice.

No account and no API key. Pay per successful call with MPP on Tempo (USDC.e or pathUSD). Invalid input or an upstream failure returns 402 and is not charged.

Routes

RoutePriceWhat you get
POST /tax/gains$0.05Crypto capital gains & cost basis (FIFO/LIFO/HIFO/ACB)
Full crypto tax calculation from your transaction history (up to 5,000 rows, JSON or Coinbase/Koinly/generic CSV): realized gains per disposal with lot matching (FIFO, LIFO, HIFO, average or Canadian ACB with the superficial-loss rule), short vs long term (US), per-year totals by asset, staking/airdrop/reward income, remaining holdings and cost basis, unrealized P&L, and warnings for missing purchase history. Crypto-to-crypto trades, crypto fees and spending are taxable disposals. Information, not tax advice.
POST /tax/form-8949$0.1IRS Form 8949 + Schedule D lines for crypto (boxes G-L)
US crypto tax report: Form 8949 rows (description, date acquired, date sold, proceeds, cost basis, gain/loss) split into Part I short-term and Part II long-term with the 2025+ digital-asset boxes G/H/I and J/K/L (set form_1099da per row; default I/L = no 1099-DA), plus per-box totals mapped to Schedule D lines 1b/2/3/8b/9/10. JSON or CSV. Uses your chosen lot method (FIFO default, HIFO, LIFO). Information, not tax advice.
POST /tax/schedule-3$0.1Canada crypto capital gains: ACB + Schedule 3 (superficial-loss aware)
Canadian crypto report: adjusted cost base (ACB) pooled per coin, proceeds of disposition, gain/loss per disposition, superficial-loss denial (30-day rule) added back to ACB, Schedule 3 totals and taxable capital gain at the 50% inclusion rate, business-vs-capital not decided for you. Values must be in CAD. JSON or CSV. Information, not tax advice.
POST /tax/harvest$0.05Crypto tax-loss harvesting candidates
From your history and current prices, list the lots (or ACB pools) sitting at an unrealized loss, largest first, with short/long term if sold today, plus total harvestable loss and the rules to watch (Canada superficial loss; US wash-sale check). Information, not tax advice.
POST /tax/import$0.01Normalize exchange CSV (Coinbase, Koinly universal, generic) to transactions JSON
Parse a Coinbase transaction report, a Koinly universal-format CSV or a generic CSV into clean, dated, typed transaction JSON (buy/sell/trade/income/transfer, fees split out) that the other /tax routes accept. Catches bad dates, unknown types and missing valuations before you pay for a report.

Copy-paste examples

These call POST /tax/import ($0.01) — Normalize exchange CSV (Coinbase, Koinly universal, generic) to transactions JSON. Swap the path for any other route in the table.

mppx CLI

npx mppx https://mpp-cryptotax.fmf-x402.workers.dev/tax/import -X POST -H 'content-type: application/json' -d '{"csv":"date,type,asset,amount,price,fee\n2025-01-02,buy,BTC,0.1,90000,5\n2025-03-01,sell,BTC,0.05,95000,3\n"}'

The CLI creates or reuses a Tempo account in your keychain and pays the 402 automatically. See mpp.dev/sdk.

curl (unpaid — shows the 402, not charged)

curl -i -X POST https://mpp-cryptotax.fmf-x402.workers.dev/tax/import -H 'content-type: application/json' -d '{"csv":"date,type,asset,amount,price,fee\n2025-01-02,buy,BTC,0.1,90000,5\n2025-03-01,sell,BTC,0.05,95000,3\n"}'

TypeScript SDK (mppx)

import { Mppx, tempo } from 'mppx/client'
import { privateKeyToAccount } from 'viem/accounts'

Mppx.create({
  methods: [tempo({ account: privateKeyToAccount(process.env.TEMPO_PRIVATE_KEY) })],
})

// Global fetch now pays the 402 automatically.
const res = await fetch('https://mpp-cryptotax.fmf-x402.workers.dev/tax/import', {
  method: 'POST',  headers: {
    'content-type': 'application/json',
  },
  body: JSON.stringify({"csv":"date,type,asset,amount,price,fee\n2025-01-02,buy,BTC,0.1,90000,5\n2025-03-01,sell,BTC,0.05,95000,3\n"}),
})
console.log(await res.json())

Python SDK (pympp)

# pip install pympp
# Docs: https://mpp.dev/sdk/python
import asyncio
from mpp.client import Mpp
from mpp.methods.tempo import TempoAccount
from mpp.methods.tempo import client as tempo

account = TempoAccount.from_key("0x...")

async def main():
    async with Mpp(methods=[tempo.charge(account=account)]) as mpp:
        response = await mpp.fetch("https://mpp-cryptotax.fmf-x402.workers.dev/tax/import", method="POST", json={"csv":"date,type,asset,amount,price,fee\n2025-01-02,buy,BTC,0.1,90000,5\n2025-03-01,sell,BTC,0.05,95000,3\n"})
        print(await response.json())

asyncio.run(main())

MCP config (Cursor, Claude Desktop, VS Code)

{
  "mcpServers": {
    "fmf-mpp-cryptotax": {
      "url": "https://mpp-cryptotax.fmf-x402.workers.dev/mcp"
    }
  }
}

Transport is Streamable HTTP at https://mpp-cryptotax.fmf-x402.workers.dev/mcp. tools/list is free. Paid tools/call needs an MPP Payment header, or just use mppx against the HTTP route.

Sources and licences

No upstream data sources: every number is computed in the Worker from the transactions you send (papaparse, MIT). Rules: IRS Form 8949 (2025) instructions, boxes G-L for digital assets; CRA superficial-loss rule (ITA s.54) and 50% capital-gains inclusion rate.

Sister services