Skip to main content
Glama
FEC Checker (French accounting file pre-audit)

FEC Checker (French accounting file pre-audit)

fec-lint

English · Français

Technical check, not tax advice. fec-lint checks the structure of a file against the published FEC format. It does not certify a file or replace an accountant's review.

Contrôle technique, pas un conseil fiscal. fec-lint vérifie la structure d'un fichier au regard du format FEC publié. Il ne certifie pas un fichier et ne remplace pas la revue d'un expert-comptable.


English

Free structural linter for French FEC files (Fichier des Écritures Comptables, art. A47 A-1 LPF), as a command line tool and an MCP server.

What file does it check?

The FEC your accounting software exports (look for "FEC" or "Export DGFiP" in its year-end menu); you don't build it by hand. It is a text file named SIRENFECAAAAMMJJ.txt (SIREN, FEC, closing date), tab- or pipe-separated, with this header and one line per accounting line:

JournalCode|JournalLib|EcritureNum|EcritureDate|CompteNum|CompteLib|CompAuxNum|CompAuxLib|PieceRef|PieceDate|EcritureLib|Debit|Credit|EcritureLet|DateLet|ValidDate|Montantdevise|Idevise
VE|Ventes|000039|20250610|411000|Clients|CLI001|Atelier Durand|F2025-06|20250610|Facture F2025-06 Atelier Durand|3960,00|0,00|||20250610||

Dates are AAAAMMJJ; amounts use a decimal comma and no thousands separator. CompAuxNum/CompAuxLib, EcritureLet/DateLet and Montantdevise/Idevise may be empty, but only in pairs; every other field is required. The FEC Checker page has the full column-by-column table. Synthetic examples are in tests/fixtures/.

Install

pipx install fec-lint

Command line

fec-lint 123456782FEC20251231.txt
123456782FEC20251231.txt: FAILED (encoding utf-8, separator pipe, lines 214)
  error date_invalid x3: Non-existent date in EcritureDate. - line(s) 21, 22, 23
  error date_format x3: Wrong date format in EcritureDate (expected AAAAMMJJ). - line(s) 64, 65, 66
Structure has errors. Full pre-audit (balance, numbering, risk signals): https://apify.com/highfiddle/fec-checker
  • --json prints the full result: {ok, file, errors[], warnings[], stats}.

  • --name 123456782FEC20251231.txt sets the name checked against SIRENFECAAAAMMJJ.txt.

  • --quiet hides the last line.

  • Exit code: 0 when the structure is OK, 1 on errors, 2 when a file cannot be read. Several files can be given at once.

  • A .zip holding exactly one .txt FEC is unpacked first.

MCP server

Add it to your MCP client (Claude Desktop, Claude Code, Cursor…):

{
    "mcpServers": {
        "fec-lint": {
            "command": "uvx",
            "args": ["--from", "fec-lint", "fec-lint-mcp"]
        }
    }
}

Without uv, install with pipx install fec-lint and use "command": "fec-lint-mcp". The server exposes one tool, lint_fec(path), which takes a local file path and returns the same JSON as --json.

Full pre-audit as a hosted MCP server. The paid FEC Checker (balance, numbering, risk signals, AI fix list) runs on Apify and is reachable over MCP. Users sign in with Apify OAuth; agents can pay with x402 by adding &payment=x402:

claude mcp add --transport http fec-checker "https://mcp.apify.com/?tools=highfiddle/fec-checker"

Free vs full pre-audit

Check

fec-lint (free)

FEC Checker on Apify

File name SIRENFECAAAAMMJJ.txt, SIREN key

✅

✅

Encoding, separator, 18 headers

✅

✅

Field formats: dates, amounts, mandatory fields, pairs

✅

✅

Balance per entry and for the whole file

—

✅

EcritureNum gaps and duplicates, ValidDate chronology

—

✅

Risk signals: weekends, holidays, round amounts, Benford, cash 53x, suspense 471, after year end

—

✅

Verdict, 0-100 score, AI-written fix list (FR/EN)

—

✅

Runs

locally, nothing leaves your machine

on Apify, pay per file


Related MCP server: beliq-mcp

Français

Linter structurel gratuit pour les FEC (Fichier des Écritures Comptables, art. A47 A-1 LPF), en ligne de commande et en serveur MCP.

Quel fichier contrôle-t-il ?

Le FEC exporté par votre logiciel comptable (cherchez « FEC » ou « Export DGFiP » dans le menu de clôture) ; vous ne le construisez pas à la main. C'est un fichier texte nommé SIRENFECAAAAMMJJ.txt (SIREN, FEC, date de clôture), séparé par tabulations ou barres verticales, avec l'en-tête et le type de ligne montrés plus haut.

Les dates sont au format AAAAMMJJ ; les montants utilisent la virgule décimale, sans séparateur de milliers. CompAuxNum/CompAuxLib, EcritureLet/DateLet et Montantdevise/Idevise peuvent être vides, mais seulement par paires ; tous les autres champs sont obligatoires. La page FEC Checker détaille chaque colonne. Des exemples fictifs sont dans tests/fixtures/.

Installation

pipx install fec-lint

Ligne de commande

fec-lint 123456782FEC20251231.txt
  • --json affiche le résultat complet : {ok, file, errors[], warnings[], stats}.

  • --name 123456782FEC20251231.txt indique le nom à contrôler selon SIRENFECAAAAMMJJ.txt.

  • --quiet masque la dernière ligne.

  • Code de sortie : 0 si la structure est correcte, 1 en cas d'erreur, 2 si un fichier est illisible. Plusieurs fichiers peuvent être passés à la fois.

  • Un .zip contenant un seul FEC .txt est décompressé d'abord.

Les messages sont en anglais ; les codes de règle (date_invalid, header_missing…) sont stables.

Serveur MCP

Ajoutez-le à votre client MCP (Claude Desktop, Claude Code, Cursor…) avec la configuration ci-dessus. L'outil lint_fec(path) prend le chemin d'un fichier local et renvoie le même JSON que --json.

Pré-audit complet en serveur MCP hébergé. Le FEC Checker payant (équilibre, numérotation, signaux de risque, plan de correction IA) tourne sur Apify et s'utilise en MCP via https://mcp.apify.com/?tools=highfiddle/fec-checker (connexion Apify OAuth ; les agents peuvent payer en x402 avec &payment=x402).

Gratuit ou pré-audit complet

Contrôle

fec-lint (gratuit)

FEC Checker sur Apify

Nom SIRENFECAAAAMMJJ.txt, clé du SIREN

✅

✅

Encodage, séparateur, 18 colonnes

✅

✅

Formats : dates, montants, champs obligatoires, couples de champs

✅

✅

Équilibre par écriture et du fichier

—

✅

Ruptures et doublons d'EcritureNum, chronologie de ValidDate

—

✅

Signaux de risque : week-ends, jours fériés, montants ronds, Benford, caisse 53x, attente 471, après clôture

—

✅

Verdict, score 0-100, plan de correction rédigé par IA (FR/EN)

—

✅

Exécution

en local, rien ne quitte votre machine

sur Apify, paiement par fichier


Development

python -m venv .venv
.venv/bin/pip install -e ".[test]"   # Windows: .venv\Scripts\pip
pytest

The fixtures in tests/fixtures/ are synthetic FEC files (fictitious SIREN 123456782). MIT license.

Available Tools

1 tool
lint_fecA
Read-only
Inspect

Check a French FEC file's name, encoding, separator, 18 headers and field formats. path is a local path to the FEC (.txt, or a .zip holding one). Returns {ok, file, errors[], warnings[], stats}; each error has a rule code, a count and line numbers. Structural check only; for entry balance, numbering and audit-risk analysis, use the full FEC Checker on Apify: https://apify.com/highfiddle/fec-checker

NameRequiredDescriptionDefault
pathYes

TDQS

A4.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety and locality are covered structurally; the description reinforces this with 'path is a local path'. It adds the return envelope ({ok, file, errors[], warnings[], stats}) and the per-error fields (rule code, count, line numbers), which is useful behavioral context. It stops short of disclosing file-size limits, encoding-mismatch handling, or how warnings differ from errors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences: what is checked, what the input is, what comes back, then the boundary and alternative. Every clause carries distinct information, the most decision-relevant content is front-loaded, and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read-only linter with no output schema, the description supplies the input shape, the return shape, the error structure, and the scope limits. There is no output schema to defer to, yet return values are still explained, and the main risk (mistaking this for a full compliance check) is pre-empted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% — the parameter is only titled 'Path' — so the description must carry the semantics, and it does: a local path to a FEC file, either .txt or a .zip containing one. That constraint (zip accepted, local only) is real meaning an agent could not infer from the schema; only the absence of path-format examples keeps it off a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (check/lint) and resource (French FEC file), then enumerates exactly what is validated: name, encoding, separator, 18 headers and field formats. An agent knows precisely the scope of the operation without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly bounds usage with 'Structural check only' and names the alternative for everything else: 'for entry balance, numbering and audit-risk analysis, use the full FEC Checker on Apify', including a URL. The when-not condition and the escalation path are both stated, not implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.2
    • First observedlint_fec

TDQS

A4.2/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so there is no possibility of selecting the wrong tool or confusing overlapping purposes. Its description clearly scopes it to structural validation (filename, encoding, separator, headers, field formats).

Naming Consistency5/5

The single name `lint_fec` follows a clear verb_noun snake_case pattern that would scale predictably if more tools were added. No mixed conventions are present.

Tool Count2/5

One tool is too thin for a domain described as 'French accounting file pre-audit', where users reasonably expect balance, numbering and risk checks. The description itself redirects users to an external Apify actor for most of the real work, making the local surface feel like a teaser.

Completeness2/5

Coverage stops at structural linting; there is no entry-balance validation, sequence/numbering continuity check, account or VAT format validation, or any reporting/export operation. The stated dead end ('use the full FEC Checker on Apify') means the tool cannot complete the audit workflow it advertises.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Validates electronic invoices (XRechnung, ZUGFeRD, Factur-X, Peppol BIS, etc.) against authority-pinned rules and explains failures.
    2
    47 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Validates EU, UK, and AU VAT numbers against live sources and uses AI pattern analysis to detect invoice fraud.
    124 npm
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Audits Excel workbooks by tracing cell dependencies and detecting circular references, volatile functions, and other formula risks, enabling natural-language audit queries on local files.
    4
    62 npm
    MIT