Using OpenZac with AI
Install the OpenZac CLI to give your AI assistant direct access to sales tax allocation data. Works with Claude Code, Codex CLI, Gemini CLI, and more.
Installation
Requires Node.js >= 20.
npm install -g @zactax/openzac
To update to the latest version:
npm update -g @zactax/openzac
Authentication
Sign up for a free API key at open.zactax.com, then log in:
openzac login
You'll be prompted to enter your API key via masked input. On macOS, your key is stored securely in the system keychain. On other platforms, it's stored at ~/.config/openzac/settings.json with restricted permissions.
To remove your stored API key:
openzac logout
Setting Up AI Agents
OpenZac ships as an MCP server, so AI coding agents can query tax data on your behalf.
Supported agents
| Agent | MCP Server |
|---|---|
| Claude Code | Yes |
| Claude Desktop | Yes |
| Codex CLI | Yes |
| Gemini CLI | Yes |
Automatic setup
Run the interactive setup wizard to configure MCP for any detected agent:
openzac agents
Manual setup
If you prefer to configure things manually, here are the instructions for each agent.
Claude Code:
claude mcp add --scope user openzac -- openzac mcp
Claude Desktop — add to your claude_desktop_config.json:
{
"mcpServers": {
"openzac": {
"command": "openzac",
"args": ["mcp"]
}
}
}
Codex CLI — add to ~/.codex/config.toml:
[mcp_servers.openzac]
command = "openzac"
args = ["mcp"]
Gemini CLI — add to ~/.gemini/settings.json:
{
"mcpServers": {
"openzac": {
"command": "openzac",
"args": ["mcp"]
}
}
}
Uninstall from all agents
openzac agents uninstall
Example
Once configured, you can ask questions of OpenZac data directly in the AI system of your choosing. For example, asking Claude Desktop: "How did Austin, Texas' sales tax perform in 2025?" should generate:
- A call to the
query_jurisdictionstool, searching for "Austin" instate"tx" in order to fetch the OpenZac ID for that city - A call to the
query_texas_sales_taxtool to fetch the relevant sales tax allocation data
With the data in hand, Claude will be able to summarize and answer your question.
NOTE: As with any AI system, please double check anything you see. Our MCP server helps to ground the AI platform with a source of truth, but that doesn't mean it's always going to be 100% accurate.
CLI Usage
The OpenZac CLI can also be used directly from the command line.
For full CLI usage and command reference, see the package documentation on npm.