Skip to main content
Glama

MCP Arabic Toolkit 🌍

License: MIT CI Python 3.9+ MCP Protocol

A high-performance Model Context Protocol (MCP) server providing Arabic Natural Language Processing (NLP), text normalization, diacritics stripping, dialect detection, and token efficiency analysis for AI agents.

Developed by Tarek Mohamed (@seotarek)


✨ Features

  • ⚡ Model Context Protocol (MCP) Compatible: Plug directly into Claude Desktop, Cursor, and any MCP client.

  • 🧹 Advanced Arabic Normalization: Unify complex Alef variants, Hamza, Yaa, Taa Marbuta, and strip Tatweel.

  • 🎯 Tashkeel Stripping: Remove diacritics (Harakat) accurately with zero distortion to core roots.

  • 🗣️ Arabic Dialect Classification: Heuristic and marker-based identification across Egyptian (EGY), Levantine (LEV), Gulf (GLF), Maghrebi (MAG), and Modern Standard Arabic (MSA).

  • 📊 Token & Prompt Efficiency Metrics: Calculate character-to-word and token compression statistics to optimize LLM prompt budgets for Arabic workloads.


Related MCP server: flexorch-mcp

🛠️ MCP Tools Exposed

Tool Name

Description

arabic_normalize_text

Normalizes Arabic letters, unifies orthographic variants, and strips elongation.

arabic_strip_diacritics

Strips all Tashkeel / Harakat from the input text.

arabic_detect_dialect

Identifies regional dialect with confidence scores.

arabic_token_metrics

Measures Arabic prompt density, word counts, and estimated token ratios.


🚀 Quickstart & Installation

Option A: Direct Run via uvx (No installation needed)

uvx mcp-arabic-toolkit

Or configure Claude Desktop / Cursor directly:

{
  "mcpServers": {
    "arabic-toolkit": {
      "command": "uvx",
      "args": ["mcp-arabic-toolkit"]
    }
  }
}

Option B: Local Clone & Development

git clone https://github.com/seotarek/mcp-arabic-toolkit.git
cd mcp-arabic-toolkit
pip install -e .

🧪 Testing

Run the automated test suite:

python -m unittest discover tests

📜 License

This project is open source and available under the MIT License.

Available Tools

4 tools
arabic_detect_dialectA

Classifies Arabic text into Modern Standard Arabic (MSA), Egyptian, Levantine, Gulf, or Maghrebi.

Inputs: text (required).

arabic_normalize_textB

Normalizes Arabic text by unifying character variants (Alef, Yaa), removing Tatweel, and stripping diacritics.

Inputs: text (required), unify_taa, unify_yaa, unify_alef.

arabic_strip_diacriticsB

Removes all vowel marks (Tashkeel/Harakat) and elongation (Tatweel) from Arabic text.

Inputs: text (required).

arabic_token_metricsB

Computes token-to-word ratio, character count, and compression statistics for Arabic prompts.

Inputs: text (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation3/5

    arabic_normalize_text and arabic_strip_diacritics overlap substantially, since normalization explicitly includes stripping diacritics and Tatweel, making strip_diacritics a near-subset. Descriptions do clarify that normalize additionally unifies Alef/Yaa variants, but an agent wanting only diacritic removal has two plausible choices. The other two tools (dialect detection, token metrics) are clearly distinct.

    Naming Consistency4/5

    All four names use a consistent snake_case arabic_ prefix with a verb_noun structure (normalize_text, strip_diacritics, detect_dialect). arabic_token_metrics deviates slightly toward a noun phrase rather than an action verb, but the set reads predictably overall.

    Tool Count4/5

    Four tools is a tight, well-scoped surface for a niche text-processing toolkit, with no filler operations. It is on the thin side — one or two more capabilities would round out the offering — but each existing tool earns its place.

    Completeness3/5

    The surface covers normalization, diacritic removal, dialect detection, and token statistics, but omits other core Arabic text operations such as tokenization/segmentation, stemming or stopword removal, and transliteration. Notably there is a metrics tool but no actual tokenizer, leaving a gap for prompt-processing workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server exposing Arabic text utilities: normalisation, tashkeel stripping, transliteration, heuristic dialect detection, and token counting.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables Claude and other MCP-compatible agents to process documents, extract structured data, detect PII, and export LLM-ready datasets through natural language tool calls.
      8
      71 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides Arabic UI/UX design tools as an MCP server, offering RTL conversion, Arabic typography validation, cultural palettes, and anti-AI-slop auditing for AI-assisted design workflows.
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables dependable Arabic text normalization and search preparation for RAG and deduplication, with typed outputs, stable fingerprints, and experimental dialect, sentiment, and diacritization tools.
      2
      MIT