Skip to main content

arabic-text-mcp

A small MCP server that gives any agent deterministic Arabic text tools — no model calls, no network, no state. Useful because LLMs are unreliable at exact character-level work (stripping diacritics, unifying alef forms, converting digits).

tests

TL;DR — Seven deterministic Arabic text tools for any MCP client; tested end-to-end through a real stdio MCP session.

Tools

Tool What it does
normalize Strips tashkeel and tatweel; optionally unifies alef (أإآٱ→ا), yaa (ى→ي), taa marbuta (ة→ه), hamza carriers (ؤئ)
strip_diacritics Removes harakat, shadda, sukun and the dagger alef (ٰ) only
convert_digits Western ↔ Eastern Arabic-Indic digits; Persian digits (۰-۹) folded in, since real text mixes them
to_buckwalter / from_buckwalter Lossless Buckwalter transliteration
split_sentences Splits on . ! ? ؟ ؛ and newlines
script_stats Arabic/Latin letter counts, diacritics, words, Arabic ratio

Design choice: taa_marbuta normalization is off by default — it merges مدرسة/مدرسه but also conflates distinct words, so it must be requested.

Install & use

pip install arabic-text-mcp

# Claude Code
claude mcp add arabic-text -- arabic-text-mcp

Any MCP client: {"command": "arabic-text-mcp"} (stdio), or python -m arabic_text_mcp.

Tests

pip install -e ".[test]"
pytest tests

Includes an end-to-end test that spawns the server as a real process and calls a tool through an MCP client over stdio. Test cases come from real text (Uthmani-script basmala, tatweel-stretched headlines, mixed Eastern/Persian digits, a Wikipedia line mixing LTR and RTL).

Built on mcp 2.x (MCPServer, formerly FastMCP).

Scope

Intentionally excludes dialect identification and diacritization: those need models and honest accuracy numbers, not rules. Planned as separate, evaluated modules.

Metadata

Release files for arabic-text-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arabic-text-mcp 0.1.0
File Size Uploaded Provenance Actions
arabic_text_mcp-0.1.0.tar.gz 7.0 kB Without provenance Details for arabic_text_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arabic-text-mcp 0.1.0
File Interpreter ABI Platform Actions
arabic_text_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for arabic_text_mcp-0.1.0-py3-none-any.whl

Total release size: 14.5 kB

Release files / arabic_text_mcp-0.1.0.tar.gz

Download URL arabic_text_mcp-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
71ad0e564812ea872dd0abbbdd572b6eb468bd16abd37fb1588fbe9c98bf5098
BLAKE2b-256 checksum
How to use checksums
67c9cec0c4a36b5ea028c9d9bfe2698eead7845b21e765d08340e1ae263fd667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / arabic_text_mcp-0.1.0-py3-none-any.whl

Download URL arabic_text_mcp-0.1.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82dae2029f8c2a2b701a4b691712498ecfad84e244c7c28d2dae6ba350120fef
BLAKE2b-256 checksum
How to use checksums
1d697248a1a0e23e530cebb715c089ae2dea3ae6b8efa11b94d66a7061903ea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for arabic-text-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page