Enterprise Model Context Protocol (MCP) server for Federal, Territorial, and Multi-State Tax Law with deterministic compliance.
- ✓Open-source license (Apache-2.0)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Documented (README)
claude mcp add taxcode -- uvx mcp-server-taxcode{
"mcpServers": {
"taxcode": {
"command": "uvx",
"args": ["mcp-server-taxcode"],
"env": {
"TAXCODE_API_KEY": "<taxcode_api_key>",
"TAXCODE_MCP_AUTH_TOKEN": "<taxcode_mcp_auth_token>"
}
}
}
}TAXCODE_API_KEYTAXCODE_MCP_AUTH_TOKENResumen de MCP Servers
<!-- mcp-name: io.github.christianclaudio/taxcode -->
# 📦 mcp-server-taxcode
[](https://github.com/christianclaudio/mcp-server-taxcode/actions/workflows/ci.yml)
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/christianclaudio/mcp-server-taxcode)
[](https://coderabbit.ai)
> **Enterprise-grade Model Context Protocol (MCP) server for Federal, Territorial, and Multi-State Tax Law.**
> Reference statutory catalog covering United States Federal (IRC/CFR), Puerto Rico (Act 60/Ley 1), and all 50 US States + District of Columbia with computational residency and capital gains models.
> [!WARNING]
> **NOT TAX OR LEGAL ADVICE / NO CONSTITUYE ASESORAMIENTO CONTRIBUTIVO NI LEGAL**
> **EN:** This software and its tools provide computational models, heuristic checks, and unofficial summaries for informational and research purposes only. Nothing returned by this server constitutes formal legal or tax advice, an official legal opinion, or audit representation. Unofficial translations and summaries are non-binding; official statutory and administrative sources in their enacted language control.
> **ES:** Este software y sus herramientas proporcionan modelos computacionales, verificaciones heurísticas y resúmenes no oficiales únicamente para fines informativos y de investigación. Ninguna respuesta emitida por este servidor constituye asesoramiento legal o contributivo formal, una opinión legal oficial ni representación ante auditorías. Las traducciones y resúmenes no oficiales no son vinculantes; los textos estatutarios y administrativos oficiales promulgados en su idioma original prevalecen.
---
## 🏗️ Architecture: FastMCP 4 Server Composition
```mermaid
graph TD
Client["AI Agent / MCP Host<br>(Claude, Cursor, Antigravity, Snowflake Cortex)"]
Gateway["FastMCP Root Gateway<br>(stdio / streamable-http)"]
ParentMW["Parent Middleware<br>(Audit Logging, Timing, Secret Redaction, ReadOnly Gate)"]
SysSub["System Sub-server (mount: 'system')<br>• system_get_health_status<br>• taxcode://system/reference/capabilities"]
StatSub["Statutes Sub-server (mount: 'statutes')<br>• statutes_lookup_statute<br>• statutes_search_tax_code<br>• statutes_list_publications"]
CompSub["Compliance Sub-server (mount: 'compliance')<br>• compliance_evaluate_pr_bona_fide_residency<br>• compliance_calculate_built_in_gain_sourcing<br>• compliance_evaluate_georgia_residency<br>• compliance_evaluate_state_residency"]
DuckDB["DuckDB In-Memory & File Engine<br>(106 Statutes, 12 Publications, Full-Text Search, Temporal Versions)"]
Client <-->|"JSON-RPC (tools/list, tools/call)"| Gateway
Gateway --> ParentMW
ParentMW --> SysSub
ParentMW --> StatSub
ParentMW --> CompSub
StatSub <-->|"Point-in-Time & Full-Text Queries"| DuckDB
CompSub <-->|"Deterministic Statutory Calculations"| DuckDB
```
---
## 🚀 Key Features
* **Authoritative Multi-Jurisdiction Statutory Catalog**:
* **Federal (`US`)**: IRC § 933, § 937, § 865, 26 CFR § 1.937-1/2.
* **Puerto Rico (`PR`)**: Act 60-2019 (Resident Individual Investors & Export Services), Ley 1-2011, Act 22-2012 predecessor versions, and administrative circulars (CC RI 21-10, DA 23-04, CC RI 26-13).
* **All 50 US States + District of Columbia**: Comprehensive statutory definitions and tax computations covering no-income-tax states (AK, FL, NV, NH, SD, TN, TX, WA, WY), flat-tax regimes (AZ, CO, GA, ID, IL, IN, IA, KS, KY, MI, MS, NC, PA, UT), and graduated/surtax jurisdictions (AL, AR, CA, CT, DE, DC, HI, LA, ME, MD, MA, MN, MO, MT, NE, NJ, NM, NY, ND, OH, OK, OR, RI, SC, VT, VA, WV, WI) including Convenience of the Employer rules (NY, PA, NJ, CT, DE, NE) and local piggyback taxes (MD, IN, OH, NY).
* **Temporal Statutory Versioning**: Point-in-time statutory lookup with `superseded_year` filtering and descending historical ordering (`tax_year` parameter).
* **Deterministic Compliance Engines**:
* `evaluate_pr_bona_fide_residency`: Evaluates IRC § 937 presence (183-day, 549-day 3-year, 90-day US), tax home, and closer connection tests.
* `calculate_built_in_gain_sourcing`: Allocates Section 937 / Act 60 capital gains across pre-move and post-move holding periods.
* `evaluate_state_residency`: Multi-state statutory presence day-counter, permanent place of abode (PPA), domicile audit risk flags, and tax liability computation across all 50 US states and District of Columbia (51 jurisdictions total).
* **Profiles & Opt-in ToolSearch**:
* Domain-mount profiles: `full`, `system`, `statutes`, `compliance`, `readonly`.
* Job-shaped allowlist profiles: `researcher` (statutes + circulars), `advisor` (cross-border residency + BIG calculations).
* **Zero Tool Bloat**: Exactly 8 lean, read-only MCP tools exposed with explicit MCP 2.0 annotations (`readOnlyHint=True`).
---
## ⚙️ Configuration
| Variable | CLI Flag | Default | Description |
| :--- | :--- | :--- | :--- |
| `TAXCODE_API_KEY` | — | `""` | Service API token for authentication |
| `TAXCODE_BASE_URL` | — | `https://api.example.com` | Upstream REST API base URL |
| `TAXCODE_MCP_READONLY` | — | `0` | Restrict server execution strictly to safe read-only inspection tools |
| `TAXCODE_MCP_PROFILE` | `--profile` | `full` | Server profile: `full`, `system`, `statutes`, `compliance`, `readonly`, `researcher`, `advisor` |
| `TAXCODE_MCP_ENABLE_TOOL_SEARCH` | `--enable-tool-search` | `0` | Replace flat catalog with dynamic search meta-tools (`profile=full` only) |
| `TAXCODE_MCP_ENABLE_CODE_MODE` | `--enable-code-mode` | `0` | Experimental Code Mode on `full` (requires `code-mode` extra) |
| `TAXCODE_MCP_AUTH_TOKEN` | — | `""` | Shared bearer token for HTTP transports (`streamable-http`, `sse`) |
| `TAXCODE_MCP_ALLOW_UNAUTHENTICATED_BIND` | — | `0` | Set to `1` (or `true`/`yes`/`on`) to let an HTTP transport bind a host other than `127.0.0.1`, `::1` or `localhost` with no token. Without it, such a bind exits at startup |
### HTTP transports and authentication
Stdio is the default and needs no token. The HTTP transports follow the MCP guidance that a local server binds only to localhost and authenticates every connection:
* On `127.0.0.1`, `::1` or `localhost` (the `--host` default is `127.0.0.1`), HTTP runs with or without `TAXCODE_MCP_AUTH_TOKEN`; without it, a warning says requests are not authenticated.
* On any other host (`0.0.0.0`, `::`, a LAN address), the server refuses to start unless `TAXCODE_MCP_AUTH_TOKEN` is set, or `TAXCODE_MCP_ALLOW_UNAUTHENTICATED_BIND=1` accepts an unauthenticated bind (logged as a warning), for example behind a gateway that authenticates for you.
* With a token set, every HTTP request needs `Authorization: Bearer <token>`; a missing or wrong token gets HTTP 401.
* In the default (stateful) HTTP mode, a session idle for 30 minutes expires: its next request gets HTTP 404 and the client must start a new session. Change this with FastMCP's `session_idle_timeout` (on `http_app()`) or `FASTMCP_HTTP_SESSION_IDLE_TIMEOUT` (seconds, or `none` to never expire); see the [FastMCP 4.1.0 release](https://github.com/PrefectHQ/fastmcp/releases/tag/v4.1.0) and [#5229](https://github.com/PrefectHQ/fastmcp/pull/5229).
```bash
# Local HTTP, loopback only
taxcode-mcp --transport streamable-http
# Public HTTP with a token
TAXCODE_MCP_AUTH_TOKEN="$(openssl rand -hex 32)" \
taxcode-mcp --transport streamable-http --host 0.0.0.0 --allowed-host mcp.example.com
```
### Docker
The image's default command is stdio, so it works as a stdio server out of the box:
```bash
docker run -i --rm -e TAXCODE_API_KEY=your-api-key ghcr.io/christianclaudio/mcp-server-taxcode:latest
```
To serve Streamable HTTP from the container, bind `0.0.0.0` inside it and pass a token:
```bash
docker run --rm -p 8000:8000 \
-e TAXCODE_API_KEY=your-api-key \
-e TAXCODE_MCP_AUTH_TOKEN=your-long-random-token \
ghcr.io/christianclaudio/mcp-server-taxcode:latest \
--transport streamable-http --host 0.0.0.0 --port 8000 --allowed-host mcp.example.com
```
---
## 🔌 Integration Guides for AI Assistants & IDEs
This server works out-of-the-box with all major AI assistants, IDEs, and CLI tools via standard `stdio` or `streamable-http`.
The server is published on PyPI as [`mcp-server-taxcode`](https://pypi.org/project/mcp-server-taxcode/), so you can run it directly with `uvx mcp-server-taxcode` without cloning or manually managing environments. Alternatively, run from a local clone with `uv run --directory /path/to/mcp-server-taxcode taxcode-mcp`.
<details open>
<summary><b>🧡 Claude Desktop & Claude Code</b></summary>
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
```json
{
"mcpServers": {
"taxcode": {
"command": "uvx",
"args": ["mcp-server-taxcode"]
}
}
}
```
For local development from a clone:
```json
{
"mcpServers": {
"taxcode": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/mcp-server-taxcode", "taxcode-mcp"]
}
}
}
```
For **Claude Code CLI**:
```bash
claude mcp add taxcode -- uvx mcp-server-taxcode
```
</details>
<details>
<summary><b>♊ Google Antigravity & Gemini CLI</b></summary>
Add to `.agents/mcp_config.json` (or global `~/.gemini/config/mcp_config.json`):
```json
{
"mcpServers": {
"taxcode": {
"command": "uvx",
"args": ["mcp-server-taxcode"]
}
}
}
```
</details>
<details>
<summary><b>❄️ Snowflake Cortex Agent</b></summary>
Add to `~/.snowflake/cortex/mcp.json`:
```json
{
"mcpServers": {
Lo que la gente pregunta sobre mcp-server-taxcode
¿Qué es christianclaudio/mcp-server-taxcode?
+
christianclaudio/mcp-server-taxcode es mcp servers para el ecosistema de Claude AI. Enterprise Model Context Protocol (MCP) server for Federal, Territorial, and Multi-State Tax Law with deterministic compliance. Tiene 0 estrellas en GitHub y su última actualización registrada es del 2026-10-16.
¿Cómo se instala mcp-server-taxcode?
+
Puedes instalar mcp-server-taxcode clonando el repositorio (https://github.com/christianclaudio/mcp-server-taxcode) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar christianclaudio/mcp-server-taxcode?
+
Nuestro agente de seguridad ha analizado christianclaudio/mcp-server-taxcode y le ha asignado un Trust Score de 87/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene christianclaudio/mcp-server-taxcode?
+
christianclaudio/mcp-server-taxcode es mantenido por christianclaudio. La última actividad registrada en GitHub es del 2026-10-16, con 0 issues abiertos.
¿Hay alternativas a mcp-server-taxcode?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega mcp-server-taxcode en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/christianclaudio-mcp-server-taxcode)<a href="https://claudewave.com/repo/christianclaudio-mcp-server-taxcode"><img src="https://claudewave.com/api/badge/christianclaudio-mcp-server-taxcode" alt="Featured on ClaudeWave: christianclaudio/mcp-server-taxcode" width="320" height="64" /></a>Más MCP Servers
Reverse engineer anything with agents, from app behavior down to native binaries.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev