# ANAF SPV

The ANAF SPV MCP server for Claude Code retrieves documents from an SPV inbox and sends requests to ANAF. It can also validate declarations and file D212.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: foreverworks
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/foreverworks/mcps/tree/HEAD/servers/anaf-spv
- Updated: 2026-10-29
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/anaf-spv

## What it does

The server reads notices and files ANAF delivers to an SPV account, including payment confirmations. It can ask ANAF for a document and save it when it arrives. Messages sent through the contact form run as a dry run unless explicitly enabled.

It validates declarations and files D212; the client asks for confirmation before each filing. Sign-in requires an SPV account for an individual that uses a username and password. The password comes from a file or a vault MCP server. A mail MCP server can retrieve sign-in codes; otherwise, someone enters each code manually. Declaration validation requires Java 8 or newer. ANAF offers no API for this account type, so the server reads SPV web pages.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `ANAF_SPV_USERNAME`, `ANAF_SPV_PASSWORD_FILE`, `ANAF_SPV_MAIL_MCP_URL`, `ANAF_SPV_MAIL_MCP_TOKEN_FILE`, `ANAF_SPV_MAIL_MCP_COMMAND` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env ANAF_SPV_USERNAME=<ANAF_SPV_USERNAME> --env ANAF_SPV_PASSWORD_FILE=<ANAF_SPV_PASSWORD_FILE> --env ANAF_SPV_MAIL_MCP_URL=<ANAF_SPV_MAIL_MCP_URL> --env ANAF_SPV_MAIL_MCP_TOKEN_FILE=<ANAF_SPV_MAIL_MCP_TOKEN_FILE> --env ANAF_SPV_MAIL_MCP_COMMAND=<ANAF_SPV_MAIL_MCP_COMMAND> --transport stdio anaf-spv -- npx -y @foreverworks/mcp-anaf-spv
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add anaf-spv --env ANAF_SPV_USERNAME=<ANAF_SPV_USERNAME> --env ANAF_SPV_PASSWORD_FILE=<ANAF_SPV_PASSWORD_FILE> --env ANAF_SPV_MAIL_MCP_URL=<ANAF_SPV_MAIL_MCP_URL> --env ANAF_SPV_MAIL_MCP_TOKEN_FILE=<ANAF_SPV_MAIL_MCP_TOKEN_FILE> --env ANAF_SPV_MAIL_MCP_COMMAND=<ANAF_SPV_MAIL_MCP_COMMAND> -- npx -y @foreverworks/mcp-anaf-spv
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "anaf-spv": {
            "command": "npx",
            "args": [
                "-y",
                "@foreverworks/mcp-anaf-spv"
            ],
            "env": {
                "ANAF_SPV_USERNAME": "<ANAF_SPV_USERNAME>",
                "ANAF_SPV_PASSWORD_FILE": "<ANAF_SPV_PASSWORD_FILE>",
                "ANAF_SPV_MAIL_MCP_URL": "<ANAF_SPV_MAIL_MCP_URL>",
                "ANAF_SPV_MAIL_MCP_TOKEN_FILE": "<ANAF_SPV_MAIL_MCP_TOKEN_FILE>",
                "ANAF_SPV_MAIL_MCP_COMMAND": "<ANAF_SPV_MAIL_MCP_COMMAND>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "anaf-spv": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@foreverworks/mcp-anaf-spv"
            ],
            "env": {
                "ANAF_SPV_USERNAME": "<ANAF_SPV_USERNAME>",
                "ANAF_SPV_PASSWORD_FILE": "<ANAF_SPV_PASSWORD_FILE>",
                "ANAF_SPV_MAIL_MCP_URL": "<ANAF_SPV_MAIL_MCP_URL>",
                "ANAF_SPV_MAIL_MCP_TOKEN_FILE": "<ANAF_SPV_MAIL_MCP_TOKEN_FILE>",
                "ANAF_SPV_MAIL_MCP_COMMAND": "<ANAF_SPV_MAIL_MCP_COMMAND>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e ANAF_SPV_USERNAME=<ANAF_SPV_USERNAME> -e ANAF_SPV_PASSWORD_FILE=<ANAF_SPV_PASSWORD_FILE> -e ANAF_SPV_MAIL_MCP_URL=<ANAF_SPV_MAIL_MCP_URL> -e ANAF_SPV_MAIL_MCP_TOKEN_FILE=<ANAF_SPV_MAIL_MCP_TOKEN_FILE> -e ANAF_SPV_MAIL_MCP_COMMAND=<ANAF_SPV_MAIL_MCP_COMMAND> anaf-spv npx -y @foreverworks/mcp-anaf-spv
```
Replace <…> with your own values

## When to use it
- retrieve new notices and files from an SPV inbox
- request a statement of amounts owed to ANAF
- validate a declaration and file D212

## Example prompts
- Show me new messages from ANAF in my SPV inbox.
- Request my statement of amounts owed and save it when it arrives.
- Validate `d300-2026-09.xml` and tell me the VAT payable.

## Similar
- [popbill](https://affpapa.org/en/nevibecode/skills/popbill.md) — skill · 9800 installs
- [Contazz AutoPilot](https://affpapa.org/en/nevibecode/mcp/contazz-autopilot.md) — MCP server · 139 installs
- [tax-prep](https://affpapa.org/en/nevibecode/skills/tax-prep.md) — skill · 2000 installs
- [crypto-tax-export](https://affpapa.org/en/nevibecode/skills/crypto-tax-export.md) — skill · 482 installs
- [depreciation-schedule](https://affpapa.org/en/nevibecode/skills/depreciation-schedule.md) — skill · 467 installs
- [MCP Fiscal Brasil](https://affpapa.org/en/nevibecode/mcp/mcp-fiscal-brasil.md) — MCP server · ★ 436 repo stars

From the same set: [foreverworks/mcps](https://affpapa.org/en/nevibecode/by/foreverworks/mcps.md) — 15 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
