NerA-MCP (Middle-East Network Architecture - Model Context Protocol) is a senior-engineered intelligence layer designed to bridge the gap between global Large Language Models (LLMs) and the complex linguistic, legal, and cultural nuances of the Arabic-speaking world.
While global models have improved in basic Arabic processing, they consistently fail at mission-critical enterprise tasks in the MENA region. NerA-MCP provides:
- Linguistic Precision: Native dialect normalization (Gulf, Egyptian, Levantine) to MSA.
- Enterprise Compliance: Automated Sharia-compliance auditing and Hijri/Gregorian temporal synchronization.
- Information Integrity: Credibility scoring for Arabic news and social media chains.
- Document Intelligence: High-accuracy Arabic OCR with stamp and seal detection.
- Dialect Normalization: Context-aware transformation of regional dialects into Modern Standard Arabic.
- Advanced Name Analysis: intelligent parsing of compound Arabic names (e.g., merging "بن عبد الله") for KYC and legal matching.
- Sharia Compliance Engine: Automated auditing of contracts against AAOIFI standards (Hanafi, Maliki, Hanbali schools).
- Temporal Engine: Bi-directional Hijri-Gregorian conversion optimized for legal and government date systems.
- News Credibility Scoring: Analysis of clickbait markers, source reputation, and sensationalism in Arabic media.
- Document Extraction: Robust OCR pipeline for scanned Iqamas, National IDs, and stamped certificates.
graph TD
A[LLM: Claude/GPT/Qwen] -->|MCP Protocol| B[NerA-MCP Server]
B --> C{Intelligence Layer}
C --> D[Linguistic Engine]
C --> E[Compliance Engine]
C --> F[OCR/Vision Pipeline]
D -->|Dialects| G[MSA Output]
E -->|AAOIFI| H[Audit Report]
F -->|Tesseract| I[Structured Data]
-
Environment Configuration:
conda create -y -n nera1 python=3.11 conda activate nera1
-
Install Dependencies:
pip install . -
Deploy System-level OCR (Optional):
sudo apt-get install tesseract-ocr
NerA-MCP is fully containerized for reliable scaling:
docker-compose up --build -dAdd the following to your claude_desktop_config.json:
{
"mcpServers": {
"ner-a-mcp": {
"command": "conda",
"args": [
"run",
"--no-capture-output",
"-n",
"nera1",
"python",
"/home/mrazek/NerA/ner_a_mcp/server.py"
]
}
}
}This project is pyproject.toml compliant. To distribute:
- Build:
python -m build - Upload:
twine upload dist/*
- Logging: Comprehensive logging via
sys.stdoutwith standardized timestamps. - Error Handling: Robust exception shielding to ensure the MCP server remains resilient under high load.
- Auditability: All tool invocations are logged for enterprise auditing.
Contributions are welcome. Please ensure that all new tools include:
- Comprehensive docstrings.
- Input validation via Pydantic models.
- Integration tests in
test_tools.py.
Distributed under the MIT License. See LICENSE for more information.
