bangladesh-mcp
# bangladesh-mcp
An [MCP](https://modelcontextprotocol.io) server that gives AI assistants accurate Bangladesh tools. It works with Claude Desktop, Claude Code, Cursor, VS Code and other MCP clients. Ask in plain English or Bangla, for example *"What's my income tax on a ৳8.5 lakh salary with ৳1 lakh in sanchaypatra?"* or *"৳1,25,050.50 কথায় লিখে দাও"*, and the assistant calls the right tool instead of guessing.
Every tool is a local, read-only calculation: no network access and no API keys.
## Tools
| Tool | What it does |
| --- | --- |
| `income_tax` | Bangladesh individual income tax: NBR bands, six taxpayer categories, investment rebate, minimum tax, full breakdown |
| `amount_in_words` | Taka amount in words for invoices and cheques, in English or Bangla, using lakh/crore |
| `check_mobile_numbers` | Validate BD mobile numbers, normalise them to `+880…` and detect the operator (Grameenphone, Banglalink, Robi, Teletalk) |
| `loan_emi` | Monthly instalment, total payment and total interest for a loan |
| `savings_growth` | DPS/FDR maturity value with monthly compounding |
| `calculate_expression` | Safe maths, e.g. `2*sin(30) + sqrt(16) + 5!` |
| `convert_digits` | Convert between English and Bangla digits |
It is built on [bd-income-tax](https://pypi.org/project/bd-income-tax/), [bdkit](https://pypi.org/project/bdkit/) and [scientific-calculator-v1](https://pypi.org/project/scientific-calculator-v1/).
## Setup
You need [uv](https://docs.astral.sh/uv/) installed. `uvx` downloads and runs the server for you.
**Claude Code**
```sh
claude mcp add bangladesh -- uvx bangladesh-mcp
```
**Claude Desktop, Cursor, VS Code and others.** Add this to the client's MCP config (`claude_desktop_config.json`, `.cursor/mcp.json`, …):
```json
{
"mcpServers": {
"bangladesh": {
"command": "uvx",
"args": ["bangladesh-mcp"]
}
}
}
```
**Without uv**
```sh
pip install bangladesh-mcp
bangladesh-mcp # stdio (default)
bangladesh-mcp --transport streamable-http --port 8000 # HTTP
```
Python 3.10+.
## Use the tools from Python
The tool functions are plain Python, too:
```python
from bangladesh_mcp.tools import income_tax, amount_in_words
income_tax({"salary": 800_000, "house_rent": 50_000}, {"dps": 100_000})["tax_payable"] # 41250
amount_in_words(12_500, "bn")["words"] # 'বারো হাজার পাঁচ শত টাকা মাত্র'
```
## Disclaimer
Tax results are estimates based on the rules in [bd-income-tax](https://pypi.org/project/bd-income-tax/) for assessment years 2026-27 and 2027-28. Confirm against the latest NBR Finance Act before filing.
## License
MIT
TDQS
Scored across 7 tools
Each tool targets a clearly distinct operation: tax computation, number-to-words, mobile validation, generic expression evaluation, loan EMI, savings growth, and digit script conversion. The three financial tools (income_tax, loan_emi, savings_growth) are adjacent but their descriptions make the boundaries unambiguous. No two tools appear to do the same thing.
The set mixes verb-first names (check_mobile_numbers, calculate_expression, convert_digits) with noun-phrase names (income_tax, amount_in_words, loan_emi, savings_growth). All are snake_case and readable, but there is no single predictable verb_noun pattern, so an agent cannot infer the naming scheme of a new tool.
Seven tools is well within the sweet spot and each one covers a discrete, useful capability with no filler. Nothing feels redundant or missing at the count level.
The surface covers the core Bangladeshi finance/text utilities: tax, EMI, savings, amount wording, mobile validation, digit conversion, plus a general math evaluator. Minor gaps remain (e.g. VAT/corporate tax, parsing words back to amounts, or a currency formatter), but agents can work around them with calculate_expression.