Skip to main content
Glama
README.md
# Em miúdos: ITCMD and court fees MCP server (Brazil)

MCP server that gives AI agents numbers checked against Brazil's official sources. Run it locally over stdio with one `npx` command (this repository), or connect to the hosted endpoint directly:

- **ITCMD** (state estate and gift tax) for **18 states**: BA, CE, DF, ES, GO, MA, MG, MS, MT, PA, PB, PE, PR, RJ, RN, RS, SC, SP.
- **Initial court fees** for **9 state courts**: TJCE, TJMG, TJMT, TJPE, TJPR, TJRJ, TJRS, TJSC, TJSP.
- **Total cost of an out-of-court probate (inventário extrajudicial)** in **SP, MG and RJ**: ITCMD, notary deed and lawyer fee table.

Every calculation returns a `fonte` object (law, article, official link, date the source was last checked) and a `limites` list (what the number does not cover). A state or court that has not been checked returns `"cobre": false` with the reason and no number. The server never estimates.

**Endpoint:** `https://api.emmiudos.com.br/mcp`
No sign-up, no API key, no session. Protocol versions 2026-07-28, 2025-11-25, 2025-06-18 and 2025-03-26.

Official MCP Registry name: `br.com.emmiudos/itcmd-custas` (version 0.1.3, see [`server.json`](server.json)).

## Tools

| Tool | What it does |
|---|---|
| `cobertura` | Lists the states and courts with checked data, and the fee items accepted by each court. Start here. |
| `aliquotas_itcmd` | ITCMD rate table of one state (brackets for inheritance and gift, exemptions by value). Input: `uf`. |
| `calcular_itcmd` | ITCMD amount for an inheritance (`causa_mortis`) or a gift (`doacao`). Inputs: `uf`, `tipo`, `valor`. |
| `calcular_custas` | Initial court fees of a lawsuit in one state court. Inputs: `tribunal`, `item`, `valor` (or `inestimavel`). |
| `custo_inventario` | Total cost of an out-of-court probate in SP, MG or RJ. Inputs: `uf`, `valor`, optional `venal` and `bens`. |

Tool names and descriptions are in Portuguese, since the users and the laws are Brazilian. One state or court per call: there is no bulk endpoint.

## Install (local stdio server, this repository)

Requires Node.js 18 or newer. No npm account, sign-up or API key: `npx` fetches this repository from GitHub and runs `index.js`.

```bash
npx -y github:emmiudos/mcp-itcmd-custas
```

The local server is a thin client with no dependencies: it forwards each MCP message over HTTPS to `https://api.emmiudos.com.br/mcp` and returns the answer unchanged, with `fonte`, `limites` and `cobre`. The engine and the data are not in this repository. It identifies itself as `mcp-itcmd-custas-stdio/<version>` in the user-agent, so its traffic can be counted apart.

### Claude Desktop (stdio)

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "emmiudos": {
      "command": "npx",
      "args": ["-y", "github:emmiudos/mcp-itcmd-custas"]
    }
  }
}
```

### Claude Code (stdio)

```bash
claude mcp add emmiudos -- npx -y github:emmiudos/mcp-itcmd-custas
```

### Cursor (stdio)

`~/.cursor/mcp.json` (or `.cursor/mcp.json` in the project):

```json
{
  "mcpServers": {
    "emmiudos": {
      "command": "npx",
      "args": ["-y", "github:emmiudos/mcp-itcmd-custas"]
    }
  }
}
```

### VS Code (stdio)

`.vscode/mcp.json`:

```json
{
  "servers": {
    "emmiudos": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "github:emmiudos/mcp-itcmd-custas"]
    }
  }
}
```

### Test it with the MCP Inspector

```bash
npx -y @modelcontextprotocol/inspector --cli npx -y github:emmiudos/mcp-itcmd-custas --method tools/list
npx -y @modelcontextprotocol/inspector --cli npx -y github:emmiudos/mcp-itcmd-custas \
  --method tools/call --tool-name calcular_itcmd --tool-arg uf=SP --tool-arg tipo=causa_mortis --tool-arg valor=500000
```

## Connect to the hosted server (no install)

### Claude Code

```bash
claude mcp add --transport http emmiudos https://api.emmiudos.com.br/mcp
```

### Claude Desktop

Settings > Connectors > Add custom connector, URL `https://api.emmiudos.com.br/mcp`.
Or, through [mcp-remote](https://www.npmjs.com/package/mcp-remote), in `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "emmiudos": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.emmiudos.com.br/mcp"]
    }
  }
}
```

### Cursor

`~/.cursor/mcp.json` (or `.cursor/mcp.json` in the project):

```json
{
  "mcpServers": {
    "emmiudos": {
      "url": "https://api.emmiudos.com.br/mcp"
    }
  }
}
```

### VS Code

`.vscode/mcp.json`:

```json
{
  "servers": {
    "emmiudos": {
      "type": "http",
      "url": "https://api.emmiudos.com.br/mcp"
    }
  }
}
```

### Through mcp-remote

```bash
npx -y mcp-remote https://api.emmiudos.com.br/mcp
```

### curl (JSON-RPC)

```bash
curl -s https://api.emmiudos.com.br/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"calcular_itcmd","arguments":{"uf":"SP","tipo":"causa_mortis","valor":500000}}}'
```

Answer (excerpt of `structuredContent`, returned by production on 2026-11-28):

```json
{
  "cobre": true,
  "uf": "SP",
  "tipo": "causa_mortis",
  "imposto_centavos": 2000000,
  "resultado": { "base": 500000, "imposto": 20000, "efetiva": 0.04 },
  "fonte": {
    "lei": "Lei nº 10.705, de 28/12/2000",
    "artigo": "art. 16, redação da Lei nº 10.992/2001",
    "url": "https://www.al.sp.gov.br/repositorio/legislacao/lei/2000/compilacao-lei-10705-28.12.2000.html",
    "data_conferencia": "2026-11-27"
  },
  "limites": ["Não inclui multa, juros, descontos nem as isenções que dependem de condição (tipo de bem, moradia, único imóvel). Cálculo informativo, sem valor de parecer jurídico.", "..."]
}
```

To list the tools: `{"jsonrpc":"2.0","id":1,"method":"tools/list"}`.

## Usage limits

- Free, with a limit of 30 calls per 60 seconds (sliding window) and 1,000 calls per day per client. Above that the answer is HTTP 429 with `Retry-After`.
- Calls are counted by path, state or court, an anonymous client id (salted hash of the IP, truncated) and the client program name without version. The IP, the rest of the user-agent and the values sent are not stored.
- Informational only, not legal advice. The fee that counts is the one on the court's own payment slip.

## More

- Docs with curl, MCP client and prompt examples: https://api.emmiudos.com.br/docs
- REST API (same numbers and sources), OpenAPI 3.1: https://api.emmiudos.com.br/openapi.json
- `llms.txt`: https://api.emmiudos.com.br/llms.txt
- MCP server card: https://api.emmiudos.com.br/.well-known/mcp/server-card.json
- A2A agent card: https://api.emmiudos.com.br/.well-known/agent-card.json
- Pages for people: https://itcmd.emmiudos.com.br/ and https://custas.emmiudos.com.br/

## About this repository

This repository holds the local stdio client (`index.js`, `package.json`) and the public description of the hosted server (this README and `server.json`). The calculation engine and the data are not here. The MIT license in [`LICENSE`](LICENSE) covers the files in this repository; it does not cover the hosted service or its data.

Built and maintained by **Lia Arandu**, an AI agent, for [Em miúdos](https://www.emmiudos.com.br/). Errors in a number or a source: open an issue with the state or court, the input and the source you have.

---

## Resumo em português

Servidor MCP local (stdio) com `npx -y github:emmiudos/mcp-itcmd-custas`, ou remoto (Streamable HTTP) em `https://api.emmiudos.com.br/mcp`, sem cadastro nem chave. O local é um cliente fino, sem dependências: repassa cada chamada ao servidor remoto e devolve a resposta sem mudar nada. Calcula o ITCMD de 18 estados, as custas iniciais de 9 Tribunais de Justiça (TJCE, TJMG, TJMT, TJPE, TJPR, TJRJ, TJRS, TJSC, TJSP) e o custo total do inventário em cartório em SP, MG e RJ. Toda resposta de cálculo traz `fonte` (lei, artigo, link oficial e data de conferência) e `limites` (o que o cálculo não cobre). Estado ou tribunal não conferido devolve `"cobre": false`, nunca estimativa.

Ferramentas: `cobertura`, `aliquotas_itcmd`, `calcular_itcmd`, `calcular_custas`, `custo_inventario`. Limite grátis: 30 chamadas por minuto e 1.000 por dia por cliente. Documentação: https://api.emmiudos.com.br/docs. Informativo, sem valor de parecer jurídico.

Este repositório tem o cliente stdio (`index.js`) e a descrição pública do servidor (README e `server.json`); o motor de cálculo e os dados não estão aqui. Mantido por Lia Arandu, uma agente de IA, para o [Em miúdos](https://www.emmiudos.com.br/).

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation4/5

Each tool has a fairly clear target: cobertura for discovery, aliquotas_itcmd for bare rate tables, calcular_itcmd for a tax amount, calcular_custas for court fees, and custo_inventario for total notarial inventory cost. The main overlap risk is calcular_itcmd vs. custo_inventario (which internally includes ITCMD) and aliquotas_itcmd vs. calcular_itcmd, but descriptions explicitly delimit 'table without a value' versus 'calculate with a value', so an agent can disambiguate.

Naming Consistency3/5

All names are snake_case and domain-specific, which aids readability. However the verb/noun pattern is mixed: calcular_itcmd and calcular_custas use verb_noun, while cobertura, aliquotas_itcmd and custo_inventario are bare nouns, so no single predictable convention holds.

Tool Count4/5

Five tools is a lean but reasonable surface for a tax/costs calculator, and each one covers a distinct calculation or discovery need. The presence of a dedicated cobertura tool suggests coverage is patchy enough to need a lookup, but the count itself is well-scoped.

Completeness3/5

Core ITCMD calculation, rate tables, first-instance court costs and extrajudicial inventory cost are covered, so main workflows are reachable. But there are notable gaps: custo_inventario only supports SP/MG/RJ, judicial inventory and appeal/preparo costs are explicitly out of scope, and conditional exemptions, fines and interest are absent, which will cause dead ends for many states and scenarios.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues