MCP Urdu Toolkit
# MCP Urdu Toolkit
> An **MCP server** that gives Claude (and any MCP client) reliable Pakistan/Urdu helpers: phone numbers, Urdu digits, Hijri dates and lakh/crore rupee formatting.
  
LLMs often get these small local details wrong (`Rs 1,250,000` instead of `Rs 12,50,000`, mixed digit
scripts, invalid phone formats). This server makes them deterministic.
## Tools
| Tool | Example |
|---|---|
| `normalize_pk_phone` | `0333-1234567` → `+923331234567`, mobile, originally Ufone · `042-35761234` → landline, Lahore |
| `convert_digits` | `Rs 2026` ↔ `Rs ۲۰۲۶` |
| `urdu_text_stats` | words, characters, Urdu vs Roman script, reading time |
| `hijri_date` | `2000-01-01` → `24 Ramazan 1420 AH` / `۲۴ رمضان ۱۴۲۰ ہجری` (tabular, with `offset_days` for moon sighting) |
| `format_pkr` | `1250000` → `Rs 12,50,000` · `12 lakh 50 hazar` |
## Install
```bash
pip install git+https://github.com/SameerD2logix/mcp-urdu-toolkit
```
### Claude Code
```bash
claude mcp add urdu-toolkit -- mcp-urdu-toolkit
```
### Claude Desktop (`claude_desktop_config.json`)
```json
{
"mcpServers": {
"urdu-toolkit": { "command": "mcp-urdu-toolkit" }
}
}
```
Then ask: *"Format 2.5 crore in rupees and convert the year to Urdu digits"* or *"Clean these phone numbers"*.
## Design
- `tools.py`: pure functions, no MCP imports, easy to test and reuse in other Python code.
- `server.py`: thin MCP layer (official `mcp` Python SDK v2, stdio transport).
- No network access, no data stored. Everything runs locally.
## Development
```bash
pip install -e . pytest
pytest -q
```
## Author
**Sameer Hussain** · [LinkedIn](https://www.linkedin.com/in/sameer-hussain-87368a164) · [D2Logix](https://d2logix.com)
TDQS
Scored across 5 tools
Each tool targets a clearly distinct operation: phone normalisation, digit conversion, text statistics, date conversion, and currency formatting. No two tools overlap in input type or purpose, so an agent can select the right one without hesitation.
All names are lowercase snake_case with predictable, descriptive wording. There is a minor split between verb-first names (normalize_pk_phone, convert_digits, format_pkr) and noun-first names (urdu_text_stats, hijri_date), but all remain readable and unambiguous.
Five tools is a well-scoped set for a localisation utility toolkit, and each tool covers a genuinely different need. Nothing feels padded or missing at the surface level.
The tools cover the main Pakistan/Urdu utility cases (phones, digits, text stats, dates, currency) with no dead ends since each is self-contained. Minor gaps exist, such as parsing/normalising currency strings or converting Roman Urdu transliteration back to script.