MCP server · Finance and crypto
Canadian ACB and Capital Gains MCP server
by haiiibin
Ask your AI to work out your Canadian adjusted cost base, capital gains, and superficial losses from your trade history.

This is a helper for people who invest in a regular Canadian taxable account and have to report capital gains. It lets your AI do the math on your trades: average cost, gains per sale, and the tricky 30-day superficial loss rule. Handy if you have a pile of buy and sell rows and no wish to fight a spreadsheet.
What is an MCP server? The 30-second version
On its own, your AI can only chat. An MCP server is a small helper program that gives it a new skill. This one gives your AI a Canadian tax calculator for your trades. You paste in your transactions, and the AI runs the CRA average-cost rules and hands you the numbers.
What this MCP server does
You give your AI a list of trades, either typed out or as a CSV or JSON file. The AI passes them to this helper. The helper pools all the buys and sells of the same ticker, works out your average cost per share, and figures the gain or loss on each sale. It also checks for superficial losses, where a loss is denied because you bought the same security again within 30 days. Then it hands back a clean summary you can read in the chat.
Click to zoomWhat you can do with it
- Calculate your adjusted cost base and capital gains from a list of trades
- Get a Schedule 3 style report for one tax year
- See your current holdings and their book cost
- Check whether any sales triggered a superficial loss
- Work out unrealized gains against market prices you supply
- Clean up a raw broker CSV export before running the numbers
Try asking your AI
- “Calculate the ACB and capital gains for the trades in my trades.csv file”
- “What's my capital gains report for 2024?”
- “Did any of these sales trigger a superficial loss?”
- “XEQT is at $35.20 and VTI at $305.40 USD with a 1.37 exchange rate, what are my unrealized gains?”
What it gives back to you
You get structured numbers back in the chat: your current holdings with shares and total cost, each sale with its proceeds, cost, and gain, and a yearly summary with your net and taxable capital gain. It also flags any superficial losses and shows the denied amount. If a row in your file could not be used, it tells you why.
Before you start
What you need
- Python 3.10 or newer
- Your trade history as a list, a CSV file, or a JSON file
- An MCP client such as Claude Desktop, Claude Code, or Cursor
Good to know
This is a calculation aid, not tax advice, and it does not yet handle things like return of capital, stock splits, or ETF phantom distributions, so check every number before you file.
Install it with your AI
Add Canadian ACB and Capital Gains MCP server to your AI, no technical skills needed
You don't install anything by hand. You copy one prompt, paste it into an AI that can work on your computer, and it checks, installs and connects the server for you, asking you when it needs something.
Sign in to get the install prompt
Members get a ready-made prompt that lets the Claude desktop app check Canadian ACB and Capital Gains MCP server, install it and connect it for them, step by step. You don't need any technical skills: you copy, paste and answer a few questions. Your connected AI can also find and install any of the 4,066 MCP servers here for you.
Who it's for
Canadian do-it-yourself investors and anyone who files their own capital gains on a taxable account.





