Server data from the Official MCP Registry
Canadian ACB and capital gains: average-cost, per-disposition gains, superficial-loss detection.
Canadian ACB and capital gains: average-cost, per-disposition gains, superficial-loss detection.
This is a well-designed MCP server for Canadian tax calculations with clean, maintainable code and appropriate security posture. Input validation is thorough, calculations use Decimal for precision, and file handling is straightforward. No authentication is required because the server is stateless and processes user-provided transaction data locally; no credentials are stored, no external APIs are called, and no sensitive data is exfiltrated. Minor code-quality observations exist around exception handling breadth and logging, but these do not materially impact security or reliability for the server's purpose. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 5 high severity). Package verification found 1 issue.
7 files analyzed · 10 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-haiiibin-acb-tax-mcp": {
"args": [
"acb-tax-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
An MCP server that computes Canadian adjusted cost base (ACB) and capital gains from your trade history: average-cost tracking, per-disposition gains, and superficial-loss detection, returned as structured JSON.
Ask your assistant "what are my capital gains for 2024?" or "did I trigger any superficial losses?" and it runs the CRA rules over your transactions instead of you wrestling a spreadsheet.
⚠️ This is a calculation aid, not tax advice. Verify every number before you file, and consult a professional for anything non-trivial. See Limitations.
Works with Claude Desktop, Claude Code, Cursor, or any MCP-compatible client.
| Tool | What it does |
|---|---|
calculate_acb | Full calculation: current holdings (shares, total ACB, ACB per share), every disposition with proceeds/ACB/outlays/gain, per-year summaries, and warnings. |
acb_summary | Just current holdings and their book cost (handy for unrealized gains against a market price). |
capital_gains_report | A Schedule-3-style report for one tax year: each disposition plus totals, net capital gain, and taxable gain (50% inclusion). |
check_superficial_losses | Flags losses caught by the 30-day rule, with the denied (deferred) amount per event. |
Implements the CRA average-cost method (all shares of a security pool into one ACB; gains are against the average, not FIFO) and the superficial-loss rule (loss denied and deferred into the ACB of substitute shares bought within 30 days before or after the sale). Commissions and per-trade CAD FX conversion are handled.
Requires Python 3.10+.
uv tool install acb-tax-mcp # or: pip install acb-tax-mcp
Run from source without installing:
git clone https://github.com/haiiibin/acb-tax-mcp
cd acb-tax-mcp
uv run acb-tax-mcp
In claude_desktop_config.json:
{
"mcpServers": {
"acb-tax": {
"command": "acb-tax-mcp"
}
}
}
claude mcp add acb-tax -- acb-tax-mcp
Give the tools a list of transactions (or a path to a .csv / .json file).
| Field | Required | Notes |
|---|---|---|
date | yes | YYYY-MM-DD |
action | yes | buy or sell |
security | yes | ticker / symbol (pooled by this key) |
shares | yes | positive number |
price | yes | price per share, in the trade currency |
commission | no | trade commission (default 0) |
currency | no | e.g. USD (default CAD) |
fx_rate | no | trade currency to CAD, e.g. 1.35 for USD (default 1) |
note | no | free text |
CSV uses the same column names as a header row.
~/trades.csv."// calculate_acb with:
// buy 100 XYZ @ $10, buy 100 XYZ @ $20, sell 100 XYZ @ $25
{
"holdings": [
{ "security": "XYZ", "shares": 100.0, "total_acb": 1500.0, "acb_per_share": 15.0 }
],
"dispositions": [
{ "date": "2024-03-01", "security": "XYZ", "shares_sold": 100.0,
"proceeds": 2500.0, "acb": 1500.0, "capital_gain": 1000.0,
"is_superficial_loss": false }
],
"summary": {
"by_tax_year": [
{ "tax_year": 2024, "net_capital_gain": 1000.0, "taxable_capital_gain": 500.0 }
],
"inclusion_rate": 0.5
}
}
Buy 100 @ $10, sell 100 @ $8 (a $200 loss), then rebuy 100 @ $8 nine days later:
{ "gain_before_superficial": -200.0, "superficial_loss_denied": 200.0,
"capital_gain": 0.0, "is_superficial_loss": true }
The $200 loss is denied and added to the ACB of the repurchased shares (new ACB per share becomes $10), so it is recovered on a future sale.
Read these before relying on the output.
security key you provide.uv venv
uv pip install -e ".[dev]"
uv run pytest
MIT. See LICENSE.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.