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 — Official DGFiP IRPP Simulator
Python MCP server that calculates French income tax using the official DGFiP source code, compiled via Mlang (OCamlPro/DGFiP). 100% local calculation, zero network calls.
Income covered: 2023 (2024 tax return). See Limitations.
Architecture
Sources DGFiP (langage M) → Mlang (OCamlPro/DGFiP) → C (~55 Mo) → irpp_calc
↓
irpp_mcp.py (MCP)
↓
Claude CodeRelated MCP server: itr-mcp
Expected Directory Structure
Before starting, create a working directory. At the end of the installation, the structure will be:
~/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.pyStart by cloning this repo:
mkdir ~/impots && cd ~/impots
git clone https://github.com/erwanpaccard/irpp-mcp.gitQuick Installation (pre-compiled binary)
If you are on Linux x86-64 or WSL (Ubuntu 22.04+), you can skip steps 1 to 4 and download the pre-compiled binary directly:
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, ...}Then proceed directly to Step 5.
Full Installation (compilation from source)
Prerequisites
WSL (Ubuntu 22.04 recommended) — required to compile and run the Linux binary
Python 3.11+ with
pipgcc,make,git,opam,unzip
Step 1 — DGFiP Sources (M language)
The official tax code is published by the DGFiP on Adullact under the CeCILL 2.1 license. No account required.
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.zipUseful folder: calculette-ir-master/sources2023m_8_0/
Step 2 — Compile 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 buildProduced binary: mlang-src/_build/default/src/main.exe
Step 3 — Generate C files from M sources
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.mmust be passed first — it declares theiliadapplication.
Result: ~55 MB of C files in ~/impots/output/.
Step 4 — Compile the binary
irpp_driver.c and Makefile are already in output/ (provided by this repo). Copy from the 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_driverTest:
printf "V_0AC=1\nTSHALLOV=50000.00\n" | ./irpp_calc
# → {"IINET": 6786.00, "NBPT": 1.00, "RNI": 45000.00, ...}Step 5 — Install the MCP server
pip install mcp pydanticVerify that BINARY_PATH in irpp_mcp.py points to the compiled binary. By default:
BINARY_PATH = Path(__file__).parent.parent / "output" / "irpp_calc"
# → ~/impots/output/irpp_calc ✓ si vous avez suivi l'arborescence ci-dessusStep 6 — Configure Claude Code
Create .mcp.json at the root of the Claude Code project:
{
"mcpServers": {
"irpp-mcp": {
"command": "python3",
"args": ["/home/user/impots/irpp-mcp/irpp_mcp.py"]
}
}
}On Windows (invocation via WSL):
{
"mcpServers": {
"irpp-mcp": {
"command": "wsl",
"args": ["-e", "python3", "/mnt/c/Users/vous/impots/irpp-mcp/irpp_mcp.py"]
}
}
}Adapt the path to your directory structure. Find the Python path:
which python3in WSL.
Usage
The MCP tool irpp_calculer_ir accepts parameters from form 2042:
Parameter | Box 2042 | Description |
| — |
|
| 1AJ | Net taxable wages declarant 1 |
| 1BJ | Net taxable wages declarant 2 |
| 1AS | Pensions, retirement, annuities declarant 1 |
| 1BS | Pensions, retirement, annuities declarant 2 |
| 5QC | Professional BNC standard regime |
| 4BE | Micro-foncier gross receipts |
| 2DC | Dividends (40% allowance) |
| 3VG | Capital gains on securities |
| 0CF | Dependent minor children |
| 0CH | Children in shared custody |
| 6NS | Deductible PER contributions declarant 1 |
| 6NT | Deductible PER contributions declarant 2 |
| 6GI | Alimony paid to adult child |
| 4BA | Net property income real regime |
| — | Birth year declarant 1 |
| — |
|
Returned variables: IINET (net tax), NBPT (shares), RNI (net taxable income), REVKIRE (reference tax income), IRNET, IAVIM, IRTOTAL.
Usage with the impots skill
The erwanpaccard/impots skill automatically detects this MCP server and uses it for IR simulations — calculations then rely on the official DGFiP engine rather than LLM estimates.
Limitations
2023 income only: 2024 sources (
sources2024m_3_13) are incompatible with the current version of Mlang (GLOBAL.REPRCMvariable not resolved in thecorrectifcontext).micro_bnc_declarant1(box 5TE): calculatesREVKIREcorrectly but givesIINET=0. Workaround: pass receipts × 66% inbnc_declarant1(5QC).Linux binary only: on Windows, the invocation automatically goes through WSL.
Sources and licenses
Component | Source | License |
DGFiP Sources (2023 income) | CeCILL 2.1 | |
Mlang Compiler | GPL-3.0 | |
| This repo | 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
- AlicenseAqualityCmaintenanceA local MCP server that enables Claude to answer Norwegian tax questions with actual calculations, covering income, wealth, stocks, funds, real estate, crypto, and more.121MIT
- 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.212167MIT
- 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.131
- AlicenseNot gradedqualityCmaintenanceA standalone MCP server for Indian personal income-tax work (ITR-1/2/3/4 + post-filing notices) with 8 deterministic tools, running fully offline with no API keys.MIT
Related MCP Connectors
Hosted MCP server for Mini Accountant: invoices, expenses, customers, analytics, tax estimates.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
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