# arabicfmt-mcp [Health: Active]

**Category:** 🛠️ Other Tools and Integrations  
**Repository:** https://github.com/cc1a2b/arabicfmt  
**GitHub Stars:** 3  
**npm Downloads (last month):** 132  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/arabicfmt-mcp

## Description
Arabic formatting: 22 Arab currencies (Saudi riyal U+20C1), Hijri dates, تفقيط, RTL/bidi fixes.

## Tools
Capabilities this server exposes over MCP:

- **format_currency** — Format a number as an Arabic currency amount with the correct symbol, grouping, and decimal precision (e.g. 1234.5 SAR -> "1,234.50 ر.س"). Handles the 2025-2026 Unicode currency-symbol transition (Saudi Riyal U+20C1, etc.).
- **spell_currency** — Spell out a currency amount in full Arabic words, including the major and minor units with correct grammatical agreement (e.g. 1234.5 SAR -> "ألف ومئتان وأربعة وثلاثون ريالاً وخمسون هللة").
- **format_hijri** — Format a Gregorian date as a Hijri (Islamic) date string with Arabic month names and era (e.g. 2025-09-23 -> "٢٣ رمضان ١٤٤٧ هـ").
- **to_hijri** — Convert a Gregorian date to its Hijri components. Returns a JSON object string like {"year":1447,"month":9,"day":23}.
- **arabic_to_words** — Convert an integer to its full Arabic cardinal words (e.g. 1234567 -> "مليون ومئتان وأربعة وثلاثون ألفاً وخمسمئة وسبعة وستون").
- **arabic_ordinal** — Convert an integer to its Arabic ordinal words (e.g. 25 -> "الخامس والعشرون").
- **format_number** — Format a number with locale-aware grouping, decimal separators, and optional Eastern Arabic numerals (e.g. 1234567.89 with numerals "arab" -> "١٬٢٣٤٬٥٦٧٫٨٩").
- **format_compact** — Format a number in compact notation with Arabic scale words (e.g. 1200000 with locale "ar" -> "1.2 مليون").
- **parse_number** — Parse a string containing Latin or Eastern Arabic digits (with Arabic grouping/decimal separators) into a JavaScript number (e.g. "١٬٢٣٤٫٥٦" -> 1234.56). Returns the number as a string.
- **format_duration** — Format a duration in milliseconds as natural Arabic words (e.g. 7500000 -> "ساعتان وخمس دقائق").
- **format_relative_time** — Format a date relative to a base date in Arabic (e.g. three days ago -> "منذ ٣ أيام"). Defaults the base to now.
- **arabic_plural** — Select the correct Arabic plural form for a count from the six CLDR categories (e.g. 5 books -> "كتب"). Returns the chosen word.
- **isolate_foreign** — Wrap foreign/LTR runs (phone numbers, Latin text, URLs) inside Arabic text with Unicode bidi isolates so they render correctly in RTL contexts (e.g. "اتصل على +1 (555) 234-5678 الآن").
- **transliterate** — Transliterate Arabic text to Latin script (e.g. "مُحَمَّد" -> "muhammad").
- **slugify** — Convert Arabic (or mixed) text into a URL-safe slug (e.g. "مدينة جدة" -> "mdynh-jdh").
- **validate_iban** — Validate an IBAN (International Bank Account Number) using its checksum and country length (e.g. "SA03 8000 0000 6080 1016 7519" -> "true"). Returns "true" or "false".
- **validate_saudi_id** — Validate a Saudi national/iqama ID number using its Luhn-style checksum (e.g. "1012345672" -> "true"). Returns "true" or "false".

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "arabicfmt-mcp": {
    "command": "npx",
    "args": ["-y","arabicfmt-mcp"]
  }
}
```

## Documentation

## What arabicfmt-mcp MCP server does

The arabicfmt-mcp MCP server is based on arabicfmt, an Arabic-first JavaScript and TypeScript formatting library. Its documented capability set covers currency output, Hijri dates, Arabic words for numbers, cheque-style monetary spelling, plural rules, RTL text isolation, parsing, locale detection, and related formatting tasks.

Currency handling includes all 22 Arab League countries. The library distinguishes the Saudi riyal sign U+20C1 from the older Iranian rial symbol, supports the Unicode 18.0 transition signs for SAR, MVR, AED, and OMR, and applies currency-specific precision. Iraqi dinars use three decimal places according to the documented ISO 4217 rule. Ranges, compact amounts, accounting-style negatives, and typed currency parts are also supported.

## How it works

The underlying package provides typed JavaScript and TypeScript functions rather than relying on runtime dependencies. Currency formatting accepts a numeric value and options such as currency, locale, numeral style, and accounting mode. Separate functions can return typed parts, parse formatted currency back to a number, or report the status of a currency-sign transition for a date.

Hijri conversion uses frozen Umm al-Qura tables through the `umalqura` subpath.

Arabic language features include six CLDR plural categories, gender-aware ordinals, number-to-words conversion, and تفقيط for monetary amounts. Text utilities isolate foreign left-to-right runs, normalize search text, create URL slugs, and parse Eastern Arabic digits. Validation helpers cover ISO 7064 mod-97 IBAN checks and Saudi national ID or Iqama check digits.

## Setup and configuration

The documented package installation is:

```sh
npm install arabicfmt
```

Yarn and pnpm commands are also provided. The package requires Node.js 18 or later; TypeScript 4.7 or later is optional. It has zero runtime dependencies and includes TypeScript types.

A browser build can be imported directly from jsDelivr or unpkg without a bundler.

## Tools and capabilities

Documented underlying functions include:

- `formatCurrency`, `formatCurrencyRange`, and `formatCurrencyToParts`
- `formatHijri` and `toHijri`
- `arabicToWords` and `spellCurrency`
- `arabicPlural`, `arabicOrdinal`, and `formatDuration`
- `parseCurrency` and `parseNumber`
- `isolateForeign`, `normalizeForSearch`, and `slugify`
- `isValidIBAN` and `isValidSaudiId`
- `formatCompact`, `formatFileSize`, `formatRelativeTime`, and `formatList`
- `transitionStatus` and `signFontFaceCSS`

These are library exports documented by the source README. The material does not map them to named MCP tools, input schemas, or output schemas, so an agent integration should verify that mapping separately.

## Limitations and notes

The arabicfmt-mcp MCP server's README details the underlying formatter, not the MCP wrapper. It does not identify supported MCP clients, a transport protocol, server launch arguments, authentication, remote services, or environment variables. It also does not document whether every library export is exposed through MCP.

The library is designed for Arabic formatting, but the documented outputs can use either Arabic or Latin numerals depending on options. New Unicode currency signs may require the generated `signFontFaceCSS` output and an appropriate font to render correctly. For production browser use, the README recommends pinning the CDN package version.

_Full upstream README: https://allmcps.com/mcp/arabicfmt-mcp/readme_

