Real-time US and Canadian sales and use tax rates by address or geo coordinates.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Welcome to the official sales-tax-code-samples repository! This repository contains examples of how to integrate and automate sales tax calculations using the zip.tax API v60 โ the latest and most capable version of the API. These code samples are designed to help developers quickly implement and adapt the API in their applications.
Version 60 is a major upgrade over previous API versions, introducing a completely restructured response format and a set of powerful new capabilities:
| Feature | Description |
|---|---|
Structured jurisdiction rates (baseRates) | Every component rate (state, county, city, special districts) is returned as a discrete object with jurisdiction type, name, description, and tax code โ no more fixed district1โdistrict5 columns. |
Tax summaries (taxSummaries) | Pre-computed total sales and use tax rates with display-ready breakdowns, ready to show at checkout. |
Sourcing rules (sourcingRules) | Explicit origin- vs destination-based sourcing determination for the queried location. |
Product taxability codes (taxabilityCode) | Pass a TIC (Taxability Information Code) to get product-specific tax rules โ reduced food rates, exemption thresholds, per-volume taxes, effective dates, and more โ returned in productDetail. |
Canadian tax rates (countryCode=CAN) | GST / PST / HST / QST lookups for Canadian postal codes, with province-level breakdowns. |
Historical rate lookups (historical=YYYYMM) | Query the tax rates that were in effect for a past period โ essential for amended returns and audits. |
Extended address details (addressDetailExtended=true) | Fully parsed address components (street, house number, city, county, state, postal code, country) from the geocoder. |
Extended shipping rules (shippingExtended=true) | State-level freight taxability rules, including whether separately-stated shipping is exempt. |
| Service & freight taxability | service and shipping blocks indicate whether services and freight are taxable at the destination. |
Tennessee Single Article Tax (sat_item_total) | Correct local tax cap calculation for high-value single articles in Tennessee. |
| Lookup by address, postal code, or coordinates | Door-level accuracy via street address or lat/lng, or all applicable rates for a postal code. |
| JSON and XML | Choose your response format with format=json (default) or format=xml. |
Some features (product taxability codes, Canadian rates, historical data) are plan-level entitlements. See zip.tax pricing for details.
All lookups are a single GET request:
Example v60 response (abbreviated):
| Parameter | Description |
|---|---|
key | Required. Your API key. |
address | Street address for a door-level rate lookup (geocoded and normalized). |
postalcode | US ZIP or Canadian postal code โ returns all applicable rates for the code. |
lat, lng | Geographic coordinates for a location-based lookup. |
city, county, state | Optional filters to narrow postal-code lookups. |
countryCode | USA (default) or CAN for Canadian tax rates. |
taxabilityCode | TIC code for product-specific tax rules (e.g. 40030 = food & food ingredients). |
historical | YYYYMM period for historical rate lookups (e.g. 202401). |
addressDetailExtended | true to include parsed address components in addressDetail.address. |
shippingExtended | true to include state-level shipping rules in shipping.shippingExtended. |
sat_item_total | Item total for Tennessee Single Article Tax calculation. |
adjustment | Sourcing adjustment: auto, origin, or destination. |
format | json (default) or xml. |
Each language folder contains a runnable example demonstrating the core v60 features: address lookup, coordinate lookup, product taxability codes, Canadian rates, and extended address/shipping details.
Before using the code samples, ensure you have:
Clone this repository:
Navigate to the directory of the programming language you want to use (e.g., Python/, Go/, Node/, or Scala/).
Set your API key as an environment variable:
Follow the language-specific instructions to install dependencies and run the sample.
| Code | Meaning |
|---|---|
| 100 | Successful API request |
| 101 | Invalid or missing API key |
| 104 | Invalid postal code |
| 105 | Invalid query string |
| 107 | Feature/version not enabled for your plan |
| 108 | Rate limit exceeded (HTTP 429) |
| 109 | Address missing, incomplete, or invalid |
| 110 | Valid query, but no result found |
| 111 | Invalid historical parameter |
| 112 | International rates not enabled for this key |
| 113 | Product rate rules not enabled for this key |
We welcome contributions! If you have improvements, additional language examples, or bug fixes, please:
feature/my-feature or fix/issue-name).This project is licensed under the MIT License.
If you encounter any issues or have questions, feel free to open an issue or contact our support team.
Happy Coding! ๐
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ziptax-sales-tax-api)<a href="https://allmcps.com/mcp/ziptax-sales-tax-api"><img src="https://allmcps.com/api/badge/ziptax-sales-tax-api?style=directory" alt="Ziptax Sales Tax API on AllMCPs" /></a>