Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

ANAF e-Factura

✓ foreverworks.com

by foreverworksversion 0.1.2i★ 5 (Stars for the whole repo)iRuns on your computerOfficial site ↗
Registry namecom.foreverworks/anaf-efactura

How to install

What it does

Read, check and file a Romanian company's e-invoices and e-Transport declarations with ANAF.

  • Connects Runs on your computer
  • Account or key No key needed · 1 setting to fill in (ANAF_CONFIG)
  • Category Accounting, finance & tax

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score12/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install ANAF e-Factura. Follow https://mcp.popnx.com/i/foreverworks-anaf-efactura.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 16, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server ANAF e-Factura for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "anaf-efactura": { "command": "npx", "args": [ "-y", "@foreverworks/mcp-anaf-efactura" ], "env": { "ANAF_CONFIG": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For ANAF_CONFIG, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the ANAF e-Factura tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 1 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • ANAF_CONFIG Path of app.json: the OAuth app you registered with ANAF (its client id and secret, the callback URL) and the company's CIF, as the README shows. lookup_company, validate_invoice and parse_invoice wo…

    Descriptions are as written by the maker.

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "anaf-efactura": {
          "command": "npx",
          "args": [
            "-y",
            "@foreverworks/mcp-anaf-efactura"
          ],
          "env": {
            "ANAF_CONFIG": "your-value"
          }
        }
      }
    }
  5. Quit Claude and open it again

  6. Try it

    Use ANAF e-Factura and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using ANAF e-Factura or shows a ANAF e-Factura tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect ANAF e-Factura yet

ANAF e-Factura runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect ANAF e-Factura

  • 1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • 1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time)
  • 1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time)
  • 1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time)

B · Others in Accounting, finance & tax that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server ANAF e-Factura for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user anaf-efactura --env ANAF_CONFIG=your-value -- npx -y @foreverworks/mcp-anaf-efactura 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For ANAF_CONFIG, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the ANAF e-Factura tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 1 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • ANAF_CONFIG Path of app.json: the OAuth app you registered with ANAF (its client id and secret, the callback URL) and the company's CIF, as the README shows. lookup_company, validate_invoice and parse_invoice wo…

    Descriptions are as written by the maker.

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user anaf-efactura --env ANAF_CONFIG=your-value -- npx -y @foreverworks/mcp-anaf-efactura
  5. Type /mcp in Claude Code

    You should see ANAF e-Factura listed as connected

  6. Try it

    Use ANAF e-Factura and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using ANAF e-Factura or shows a ANAF e-Factura tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server ANAF e-Factura for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "anaf-efactura": { "command": "npx", "args": [ "-y", "@foreverworks/mcp-anaf-efactura" ], "env": { "ANAF_CONFIG": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For ANAF_CONFIG, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the ANAF e-Factura tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 1 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • ANAF_CONFIG Path of app.json: the OAuth app you registered with ANAF (its client id and secret, the callback URL) and the company's CIF, as the README shows. lookup_company, validate_invoice and parse_invoice wo…

    Descriptions are as written by the maker.

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the ANAF e-Factura settings, ANAF_CONFIG is empty; add your key and save

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use ANAF e-Factura and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using ANAF e-Factura or shows a ANAF e-Factura tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

1 setting(s) to fill in (ANAF_CONFIG) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server ANAF e-Factura for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "anaf-efactura": { "type": "stdio", "command": "npx", "args": [ "-y", "@foreverworks/mcp-anaf-efactura" ], "env": { "ANAF_CONFIG": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For ANAF_CONFIG, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the ANAF e-Factura tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 1 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • ANAF_CONFIG Path of app.json: the OAuth app you registered with ANAF (its client id and secret, the callback URL) and the company's CIF, as the README shows. lookup_company, validate_invoice and parse_invoice wo…

    Descriptions are as written by the maker.

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the ANAF e-Factura settings, ANAF_CONFIG is empty; add your key and save

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use ANAF e-Factura and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using ANAF e-Factura or shows a ANAF e-Factura tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use ANAF e-Factura💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user anaf-efactura --env ANAF_CONFIG=your-value -- npx -y @foreverworks/mcp-anaf-efactura

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "anaf-efactura": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-anaf-efactura"
      ],
      "env": {
        "ANAF_CONFIG": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "anaf-efactura": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-anaf-efactura"
      ],
      "env": {
        "ANAF_CONFIG": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "anaf-efactura": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-anaf-efactura"
      ],
      "env": {
        "ANAF_CONFIG": "your-value"
      }
    }
  }
}

Values you fill in

  • ANAF_CONFIG required env
    Path of app.json: the OAuth app you registered with ANAF (its client id and secret, the callback URL) and the company's CIF, as the README shows. lookup_company, validate_invoice and parse_invoice wo…

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

GitHub starsi
5 (Stars for the whole repo)
This repo holds several MCP listings; its stars count once in rankings
Downloads per weeki
96/wk
Verified domain
✓ foreverworks.com
Connection
Runs on your computer
Latest versioni
0.1.2
Published to registryi
Nov 16, 2026
Code last changedi
Nov 18, 2026
Maker
foreverworks
Packages
npm: @foreverworks/mcp-anaf-efactura
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified against the domain foreverworks.com (the registry checks domain ownership)

  • ✓ Pass

    Still maintained

    Code last changed yesterday

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked yet

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/foreverworks-anaf-efactura.svg)](https://mcp.popnx.com/en/servers/foreverworks-anaf-efactura)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Accounting, finance & taxi

  • More stars than 0% of the other 3417 servers in this category
  • Published to the registry more recently than 88% of the other 3417 servers in this category
  • Basic checks equal to or better than 99% of the other 3417 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is ANAF e-Factura safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed yesterday, and the latest version (0.1.2) reached the registry 3 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: SolidInvoice, Signal8, Journalit, Beancount.io, Tapetide - Indian Stock Market MCP

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

SolidInvoice

Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.

by SolidInvoiceGrowing★ 989Updated 10 days ago

Runs in the cloud✓ service owner · solidinvoice.co

Signal8

SEC filings, dilution, insider & institutional ownership, and political-trade data for AI agents.

by signal8aiGrowing↓ 431/wk★ 425Updated 10 days ago

Computer or cloud✓ service owner · signal8.ai

Journalit

Trading journal in Obsidian. Ask Claude or ChatGPT about your trades; edits are previewed first.

by CursivezGrowing★ 261Updated 11 days ago

Runs in the cloud✓ service owner · journalit.co

Beancount.io

Query, edit, and reconcile a hosted Beancount ledger: BQL, reports, files, and bank imports.

by bex-coGrowing★ 702 Stars for the whole repoUpdated 44 days ago

Runs in the cloud✓ service owner · beancount.io
Compared with similar ones
This one
ANAF e-Factura
SolidInvoiceSignal8JournalitBeancount.ioTapetide - Indian Stock Market MCP
Runs whereInstalls on your computerRuns in the cloud, nothing to installCloud or install on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installCloud or install on your computer
Needs a keyNoNoYesNoNoYes
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/65/54/44/45/5
LicenseMITMITMITNOASSERTIONMITMIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

ANAF e-Factura MCP server

Read the invoices your company sent and received through Romania's e-Factura, check ANAF's seal on them, and file invoices and e-Transport declarations with ANAF, from your AI assistant. It also validates, renders and writes invoices, and looks companies up in ANAF's VAT registry. Its three money tools (upload_invoice, upload_invoice_b2c, etransport_file) file a document that cannot be withdrawn: your client asks you before each call, and each goes to ANAF's test environment unless you say otherwise.

You need an OAuth application registered with ANAF (its client id, secret and callback URL), the company's CIF, and a person with a qualified digital certificate and SPV rights for the company, who signs in once in a browser. The server then renews the grant itself, and its --health check warns two weeks before it would need that person again. Validating, rendering, building and reading an invoice, checking a seal and looking up a company need no account.

What you can ask

  • "Which invoices did suppliers send us in the last two weeks?"
  • "Download the newest invoice we received, check ANAF's seal on it, and list its lines."
  • "Is RO87654329 a VAT payer, and does it apply VAT on collection?"
  • "Invoice Client SRL for 10 hours of consulting at 500 RON an hour plus 21% VAT, have ANAF validate it, and file it in the test environment."
  • "How many days are left on our ANAF authorization?"

Install

With Claude Code:

claude mcp add anaf-efactura -e ANAF_CONFIG="<path to ANAF app.json>" -- npx -y @foreverworks/mcp-anaf-efactura

Claude Desktop (Settings, Developer, Edit Config) and most other clients read the same command as JSON:

{

"mcpServers": { "anaf-efactura": { "command": "npx", "args": ["-y", "@foreverworks/mcp-anaf-efactura"], "env": { "ANAF_CONFIG": " " } } } }

Each runs the published package on Node 22.19 or newer. VS Code and the Claude Desktop bundle ask for ANAF_CONFIG as they add the server. Cursor reads it from your environment instead (${env:ANAF_CONFIG}), so set it before you start Cursor. Configuration says what it holds.

From a clone
git clone https://github.com/foreverworks/mcps.git && cd mcps

npm ci && npm run build claude mcp add anaf-efactura -e ANAF_CONFIG=" " -- node "$PWD/servers/anaf-efactura/dist/index.js"

In a JSON configuration, the command is node and its one argument the full path of servers/anaf-efactura/dist/index.js. To share one running copy between several clients over HTTP, see docs/deploying.md.

Configuration

VariableRequiredMeaning
ANAF_CONFIGyesPath of app.json (below), which the server only reads.
ANAF_STATE_DIRnoWhere the grant, a begun authorization and the ledger of production filings go; the default is in docs/configuration.md.
ANAF_DOWNLOADS_DIRnoThe outbox for downloaded archives, PDFs and built invoices; default /invoices.

app.json holds the application you register with ANAF (below):

{

"app_name": " ", "client_id": " ", "client_secret": " ", "redirect_uris": [" "], "company_cif": " " }

client_id and client_secret are required, and authorizing needs redirect_uris. company_cif (or cif) is the company a call acts on when it names none; one grant can cover several companies, so a cif argument overrides it. endpoints overrides ANAF's URLs by name (authorize, token, hello, fctelProd, fctelTest, etransportProd, etransportTest), and api_base / api_test_base the e-Factura bases. The server never writes app.json, and its errors name a bad field, never a value. Without ANAF_CONFIG the server still starts, and the tools that need no grant work.

Getting the client id and secret

ANAF calls this registering an application in an OAuth profile; its procedure, Oauth_procedura_inregistrare_aplicatii_portal_ANAF.pdf (in Romanian), shows each screen.

  1. Check that the person who will sign in is registered in SPV with their qualified certificate and one of the company's rights: legal representative, designated representative or empowered person (reprezentant legal, reprezentant desemnat, împuternicit).
  2. Create a developer account at anaf.ro/InregOauth (Servicii Online, Înregistrare utilizatori, Dezvoltatori aplicații, "Înregistrare pentru API-uri"), new or from a portal account you have, and confirm your e-mail with the "Cod de verificare" ANAF sends.
  3. Sign in ("Autentificare utilizator"), open "Editare profil Oauth", then "Gestionare aplicații".
  4. Name the application, choose its services (E-Factura, and E-Transport for the e-Transport tools), and give a Callback URL you control, such as https://example.com/anaf/callback; nothing has to answer there. Press "Generare Client ID".
  5. Click the application in the list, and copy its Client ID, Client Secret and Callback URL into app.json.

The grant may do only what both the application's services and the certificate holder's SPV rights allow; health shows its roles (EFACTURA, ETRANSPORT).

Files in and out

A document goes in byte for byte, never as text a model retyped, because ANAF's seal covers the exact bytes: by path from the server's file roots (MCP_FILE_ROOTS; over stdio, the client's folders or the working directory), or as { "content_base64": "...", "sha256": "..." } from a script. A link, a file outside the roots, a wrong checksum or a document that is not UTF-8 is refused before anything is sent. A path in the outbox is taken too, so build_invoice's file goes straight to validate_invoice and upload_invoice.

Files come out into the outbox at mode 0640, whole or not at all, and never over a file holding other bytes (that one gets the next numbered name, such as 5001-2.zip); a save_dir must be a folder inside it. The state dir holds tokens.json, authorization.json and uploads.json at 0600. Neither the state dir nor the outbox may sit inside app.json's directory. The variables every server shares are in docs/configuration.md.

First run

The tools that read or file at ANAF need a grant, which only the certificate holder can give. Ask your assistant to authorize the server with ANAF:

  1. `begin_authorization` answers ANAF's sign-in page for your application (authorizeUrl), open for 30 minutes; redirect_uri picks one of several callback URLs. A client that shows links itself (MCP URL elicitation: over stdio, or over HTTP with a client of protocol 2026-07-28, as Claude Code is) offers you the page; if you do not hold the certificate, decline and pass the address on.
  2. The certificate holder opens it in the browser where the certificate is installed, picks the certificate, and signs in.
  3. The browser lands on the callback URL, with ?code=...&state=... in the address. The page may fail to load; the address is what counts.
  4. Pass that whole address to `complete_authorization` (`redirect_url`) at once: ANAF's code dies 60 seconds after it is issued. The server checks the state, exchanges the code, writes tokens.json, and answers only the two expiry dates; no token reaches the conversation.
  5. Ask for `health`: the grant's roles and the days left on each token.
Keeping the grant alive

ANAF's procedure (pp. 28 and 33) gives the access token 90 days (or the exp it states) and the refresh token 365. A call within 3 days of the access token's end refreshes it first (refresh_token with force refreshes now), and each refresh brings a refresh token good for another 365 days. If the refresh token runs out or ANAF refuses it (invalid_grant), only the certificate holder can bring the grant back, by repeating the steps above. For a server used rarely, refresh daily from a timer. From a clone, in servers/anaf-efactura:

node dist/index.js --health            # greet ANAF with the stored token; the days left

node dist/index.js --refresh # refresh when the access token has under 14 days left node dist/index.js --refresh --force # refresh now

Each prints one ANAF: OK|WARN|FAIL ... line, never a token, and exits 0 for OK, 1 for FAIL (a person has to act: a dead grant, a broken configuration) or 2 for WARN (ANAF unwell, or the refresh token ends within 14 days).

Tools

read changes nothing at ANAF (some save files to the outbox); write changes the stored grant; money files a document with ANAF, and your client asks you before each call.

ToolAccessWhat it does
healthreadGreets ANAF with the stored token: the application, the default CIF, the grant's roles, the days left on each token. Only the greeting's first line comes back, because ANAF echoes the bearer token in it.
token_statusreadThe stored grant's expiries and roles, without calling ANAF.
refresh_tokenwriteA new access token when the current one is within 3 days of its end, or now with force.
begin_authorization / complete_authorizationwriteA new grant: ANAF's page for the certificate holder, then the address their browser landed on.
list_invoicesreade-Factura messages from the last zile days, at most 60: sent, received, errors and buyer messages, with the id download_invoice takes.
list_invoices_windowreadThe same over a date range of at most 60 days, a page at a time, filtered by filtru (E errors, T sent, P received, R awaiting a response).
download_invoicereadSaves one signed ZIP to the outbox once it opens, every entry matches its checksum, and ANAF's seal holds. ANAF allows 10 downloads a day per message.
upload_invoicemoneyFiles an invoice XML (UBL, CII, CN or RASP) to a company. Test environment unless test is false.

| upload_invoice_b2c | money | Files an invoice to a person t

Only the beginning is shown; read the rest in the repo