Metadata-Version: 2.1
Name: us-car-sales-tax
Version: 0.1.0
Summary: Car sales tax, title and registration fees for U.S. states, offline: out-the-door cost calculators for Texas, California, Florida, New York and Pennsylvania with county and city rates, plus the car sales tax rule of all 50 states. No dependencies.
Author: Anders Lee
License: MIT (code); CC BY 4.0 (data, see DATA-LICENSE.md)
Project-URL: Homepage, https://carsalestax.com/
Keywords: car sales tax,vehicle sales tax,sales tax,car registration,title transfer,dmv,auto loan,texas,california,florida,new york,pennsylvania,mcp,mcp server
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# us-car-sales-tax

<!-- mcp-name: com.carsalestax/car-sales-tax -->

Car sales tax, title and registration fees for U.S. states, offline. Full out-the-door cost calculators for
Texas, California, Florida, New York and Pennsylvania, with every county and city rate. The car sales tax rule of
all 50 states is included too: rate, local taxes and trade-in credit. Pure Python, no dependencies, about 100 KB of
data from official state DMV and revenue department sources (2026). It also runs as an MCP server for AI
assistants.

It uses the same rules and numbers as the calculators on [carsalestax.com](https://carsalestax.com/). The tests
check the package against 600 results from the site's own calculator.

```
pip install us-car-sales-tax
```

```python
import car_sales_tax as cst

r = cst.calculate("TX", 35000, trade_in=10000)
r["tax"], r["fees"], r["total"]           # (1562.5, 128.5, 26691.0)
r["lines"][0]                             # {'key': 'tax', 'label': 'Motor vehicle sales tax (6.25%)', 'amount': 1562.5}

# Texas private sale: tax on the higher of the price or 80% of the standard presumptive value
cst.calculate("TX", 9000, purchase="private", spv=15000)["tax"]     # 750.0

# Local rates: California cities, Florida county surtax (first $5,000 only), New York counties, Pennsylvania
cst.calculate("CA", 40000, place="Los Angeles", trade_in=10000)["tax_rate"]   # 0.1025 (no trade-in credit in CA)
cst.calculate("FL", 30000, place="Miami-Dade")["tax"]                        # 1850.0
cst.local_rates("NY")[:2]                 # [{'place': 'Albany', 'rate': 0.08}, ...]

cst.state_rules("GA")["tax"]              # 'Title ad valorem tax (no sales tax)'
[s["st"] for s in cst.all_states() if s["rate"] == "0%"]   # ['AK', 'MT', 'NH', 'OR']
cst.monthly_payment(30000, 6, 60)         # 579.98
```

`calculate()` options: `purchase` ("new", "used" or "private"), `trade_in`, `doc_fee`, `place`, `financed`, `ev`,
`weight` (lb; FL and NY registration), `plate_transfer`, `out_of_state_title`, `new_resident`, `spv` (Texas),
`emissions_county` (Texas title fee), `model_year_age` (California smog fees).

Command line:

```
$ car-sales-tax CA 40000 --place "Los Angeles" --trade-in 10000 --doc-fee 85
$ car-sales-tax TX 9000 --purchase private --spv 15000
$ car-sales-tax --rules OH
$ car-sales-tax --states
$ car-sales-tax --places FL
```

## MCP server

The package includes a Model Context Protocol server (stdio, no dependencies). It gives Claude, ChatGPT, Cursor and
other MCP clients four tools:

- `calculate_car_cost`: out-the-door cost in TX, CA, FL, NY or PA, line by line, with an optional loan payment
- `get_state_car_tax`: the car sales tax rule of any state
- `compare_states`: all 50 states sorted by rate
- `list_local_rates`: the county and city rates for CA, FL, NY and PA

```json
{
  "mcpServers": {
    "car-sales-tax": { "command": "uvx", "args": ["us-car-sales-tax", "--mcp"] }
  }
}
```

It is listed in the official MCP Registry as `com.carsalestax/car-sales-tax`.

## Data and licence

Code: MIT. Data: CC BY 4.0, credit "carsalestax.com"; see DATA-LICENSE.md for the sources. The amounts are
estimates, not tax advice. County fees and dealer charges vary, so check the final figures with your state's DMV.
More details and the official source for each fee are at <https://carsalestax.com/methodology/>.
