irpp-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@irpp-mcpcalculate my 2023 income tax with 50000 salary and 2 dependent children"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🧮 irpp-mcp — Simulateur IRPP officiel DGFiP
Serveur MCP Python qui calcule l'impôt sur le revenu français à partir du code source officiel DGFiP, compilé via Mlang (OCamlPro/DGFiP). Calcul 100% local, zéro appel réseau.
Revenus couverts : 2023 (déclaration 2024). Voir Limitations.
Architecture
Sources DGFiP (langage M) → Mlang (OCamlPro/DGFiP) → C (~55 Mo) → irpp_calc
↓
irpp_mcp.py (MCP)
↓
Claude CodeRelated MCP server: itr-mcp
Arborescence attendue
Avant de commencer, créer un répertoire de travail. À la fin de l'installation, la structure sera :
~/impots/
├── calculette-ir-master/ ← sources DGFiP téléchargées (étape 1)
│ └── sources2023m_8_0/
├── mlang-src/ ← compilateur Mlang cloné (étape 2)
│ ├── _build/default/src/main.exe
│ ├── m_ext/2023/
│ └── examples/dgfip_c/ml_primitif/c_driver/
│ └── irdata.c
├── output/ ← C générés (étape 3) + binaire (étape 4)
│ ├── irpp_driver.c ← fourni dans ce repo
│ ├── Makefile ← fourni dans ce repo
│ └── irpp_calc ← binaire compilé
└── irpp-mcp/ ← ce repo (cloné en premier)
└── irpp_mcp.pyCommencer par cloner ce repo :
mkdir ~/impots && cd ~/impots
git clone https://github.com/erwanpaccard/irpp-mcp.gitInstallation rapide (binaire pré-compilé)
Si vous êtes sous Linux x86-64 ou WSL (Ubuntu 22.04+), vous pouvez sauter les étapes 1 à 4 et télécharger directement le binaire pré-compilé :
mkdir -p ~/impots/output
wget https://github.com/erwanpaccard/irpp-mcp/releases/download/v1.0.0/irpp_calc \
-O ~/impots/output/irpp_calc
chmod +x ~/impots/output/irpp_calc
# Tester
printf "V_0AC=1\nTSHALLOV=50000.00\n" | ~/impots/output/irpp_calc
# → {"IINET": 6786.00, "NBPT": 1.00, "RNI": 45000.00, ...}Puis passer directement à l'étape 5.
Installation complète (compilation depuis les sources)
Prérequis
WSL (Ubuntu 22.04 recommandé) — nécessaire pour compiler et exécuter le binaire Linux
Python 3.11+ avec
pipgcc,make,git,opam,unzip
Étape 1 — Sources DGFiP (langage M)
Le code fiscal officiel est publié par la DGFiP sur Adullact sous licence CeCILL 2.1. Aucun compte requis.
cd ~/impots
curl -L "https://gitlab.adullact.net/dgfip/impots-nationaux-revenu-patrimoine-particuliers/calculette-ir/-/archive/master/calculette-ir-master.zip" \
-o calculette-ir-master.zip
unzip calculette-ir-master.zipDossier utile : calculette-ir-master/sources2023m_8_0/
Étape 2 — Compiler Mlang (~15 min)
cd ~/impots
sudo apt install libgmp-dev libmpfr-dev git opam bubblewrap unzip bzip2 patch
git clone https://gitlab.adullact.net/dgfip/impots-nationaux-revenu-patrimoine-particuliers/Mlang.git mlang-src
cd mlang-src
# Correctif obligatoire (version non substituée dans les fichiers opam)
sed -i 's/%%VERSION%%/0.0.1/g' mlang.opam irj_checker.opam
OPAMYES=1 make init
make buildBinaire produit : mlang-src/_build/default/src/main.exe
Étape 3 — Générer les fichiers C depuis les sources M
cd ~/impots/mlang-src
eval $(opam env --switch=$(pwd) --set-switch)
./_build/default/src/main.exe \
-A iliad \
--display_time \
--precision double \
--mpp_function=enchainement_primitif \
--income-year=2023 \
--dgfip_options=-g,-O,-k4,-m2023,-X \
--backend dgfip_c \
--output ../output/irpp_2023.c \
$(find ../calculette-ir-master/sources2023m_8_0 -name 'tgvI.m') \
$(find ../calculette-ir-master/sources2023m_8_0 -name 'errI.m') \
$(find ../calculette-ir-master/sources2023m_8_0 -name '*.m' \
! -name 'err*.m' ! -name 'tgv*.m' ! -name 'cibles.m' | sort) \
m_ext/2023/cibles.m m_ext/2023/codes_1731.m m_ext/2023/commence_par_5.m \
m_ext/2023/commence_par_7.m m_ext/2023/commence_par_H.m \
m_ext/2023/correctif.m m_ext/2023/main.m
tgvI.mdoit être passé en premier — il déclare l'applicationiliad.
Résultat : ~55 Mo de fichiers C dans ~/impots/output/.
Étape 4 — Compiler le binaire
irpp_driver.c et Makefile sont déjà dans output/ (fournis par ce repo). Copier depuis le repo :
cp ~/impots/irpp-mcp/output/irpp_driver.c ~/impots/output/
cp ~/impots/irpp-mcp/output/Makefile ~/impots/output/
cd ~/impots/output
make CDRIVER=../mlang-src/examples/dgfip_c/ml_primitif/c_driverTester :
printf "V_0AC=1\nTSHALLOV=50000.00\n" | ./irpp_calc
# → {"IINET": 6786.00, "NBPT": 1.00, "RNI": 45000.00, ...}Étape 5 — Installer le serveur MCP
pip install mcp pydanticVérifier que BINARY_PATH dans irpp_mcp.py pointe vers le binaire compilé. Par défaut :
BINARY_PATH = Path(__file__).parent.parent / "output" / "irpp_calc"
# → ~/impots/output/irpp_calc ✓ si vous avez suivi l'arborescence ci-dessusÉtape 6 — Configurer Claude Code
Créer .mcp.json à la racine du projet Claude Code :
{
"mcpServers": {
"irpp-mcp": {
"command": "python3",
"args": ["/home/user/impots/irpp-mcp/irpp_mcp.py"]
}
}
}Sur Windows (invocation via WSL) :
{
"mcpServers": {
"irpp-mcp": {
"command": "wsl",
"args": ["-e", "python3", "/mnt/c/Users/vous/impots/irpp-mcp/irpp_mcp.py"]
}
}
}Adapter le chemin à votre arborescence. Trouver le chemin Python :
which python3dans WSL.
Utilisation
L'outil MCP irpp_calculer_ir accepte les paramètres du formulaire 2042 :
Paramètre | Case 2042 | Description |
| — |
|
| 1AJ | Salaires nets imposables déclarant 1 |
| 1BJ | Salaires nets imposables déclarant 2 |
| 1AS | Pensions, retraites, rentes déclarant 1 |
| 1BS | Pensions, retraites, rentes déclarant 2 |
| 5QC | BNC professionnels régime normal |
| 4BE | Micro-foncier recettes brutes |
| 2DC | Dividendes (abattement 40 %) |
| 3VG | Plus-values mobilières |
| 0CF | Enfants mineurs à charge |
| 0CH | Enfants en résidence alternée |
| 6NS | Cotisations PER déductibles déclarant 1 |
| 6NT | Cotisations PER déductibles déclarant 2 |
| 6GI | Pension alimentaire versée à enfant majeur |
| 4BA | Revenus fonciers nets régime réel |
| — | Année de naissance déclarant 1 |
| — |
|
Variables retournées : IINET (impôt net), NBPT (parts), RNI (revenu net imposable), REVKIRE (revenu fiscal de référence), IRNET, IAVIM, IRTOTAL.
Utilisation avec le skill impôts
Le skill erwanpaccard/impots détecte automatiquement ce serveur MCP et l'utilise pour les simulations IR — les calculs s'appuient alors sur le moteur DGFiP officiel plutôt que sur des estimations LLM.
Limitations
Revenus 2023 uniquement : les sources 2024 (
sources2024m_3_13) sont incompatibles avec la version actuelle de Mlang (variableGLOBAL.REPRCMnon résolue dans le contextecorrectif).micro_bnc_declarant1(case 5TE) : calculeREVKIREcorrectement mais donneIINET=0. Workaround : passer les recettes × 66 % dansbnc_declarant1(5QC).Binaire Linux uniquement : sur Windows, l'invocation passe automatiquement par WSL.
Sources et licences
Composant | Source | Licence |
Sources DGFiP (revenus 2023) | CeCILL 2.1 | |
Compilateur Mlang | GPL-3.0 | |
| Ce dépôt | MIT |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA local MCP server that enables Claude to answer Norwegian tax questions with actual calculations, covering income, wealth, stocks, funds, real estate, crypto, and more.Last updated121MIT
- AlicenseAqualityCmaintenanceLocal-first MCP server for Indian income tax computation, enabling users to compute taxes, compare regimes, plan advance tax, and parse Form 26AS without sending data to the cloud.Last updated2121524MIT
- FlicenseAqualityBmaintenanceMCP server for VAT/tax calculation based on country and price, supporting integration with LLM clients like Claude and Ollama for natural language queries.Last updated1
- FlicenseAqualityCmaintenanceMCP server for the Swiss federal tax calculator, providing income, wealth, inheritance, and corporate tax figures for all Swiss municipalities and tax years 2010-2026.Last updated131
Related MCP Connectors
The first fiscal MCP server for Spain: IAE/CNAE 2025, AEAT modelos, IRPF/IVA, RETA quota.
TaxSort — Tollbooth-monetized MCP server for personal tax transaction classification
Free public tax MCP: GST/VAT, income, company & capital-gains tax for 50+ countries, source-cited.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/erwanpaccard/irpp-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server