arabic-dict-mcp
MCP server that provides grounded Arabic dictionary lookup, enabling AI agents to search word roots, inflections, and meanings from real dictionary data.
README
arabic-dict-mcp
An MCP server that gives AI agents grounded Arabic dictionary lookup — so replies about words, roots, and meanings come from real dictionary data instead of the model's parametric memory.
Built for Arabic learners who are tired of AI assistants confidently inventing meanings, roots, and derivations.
Why
Ask any LLM "what's the root of مكتوب and its siblings?" and you'll get an answer that sounds right — sometimes it is, often it isn't. This server exposes three tools the model can call to look words up in real dictionaries. When wired into Claude Code, Claude Desktop, or any MCP-compatible client, the model grounds its answer in the returned data instead of guessing.
Tools
| Tool | What it does |
|---|---|
lookup_root(root) |
All dictionary entries under a root. Accepts any form: كتب, ك-ت-ب, كَتَبَ. |
lookup_word(word) |
Matches an inflected surface form or lemma. Returns each match's root so the agent can pivot to lookup_root for siblings. |
search_meaning(query, lang="en"|"ar") |
Full-text search over meanings for "what's the root for X?" style questions. |
Diacritics. Input is tashkeel-insensitive — كَاتِبٌ, كاتب, and كَاتِب all match. Output preserves full vocalization from the source (including final case marks), because the vowelled form is what disambiguates the lemma.
Data sources
Downloaded at build time by scripts/build_dataset.py; not vendored in the repo.
| Source | Coverage | License |
|---|---|---|
| linuxscout/arramooz | ~40k MSA verb & noun entries — root, POS, wazn, forms, Arabic definitions | GPL |
| aliozdenisik/quran-arabic-roots-lane-lexicon | 1,651 Quranic roots with English (Lane) glosses | GPLv3 |
Total: 5,610 roots · 42,351 entries in a unified SQLite index with FTS5.
Install
git clone https://github.com/arnizamani/arabic-dict-mcp.git
cd arabic-dict-mcp
uv venv .venv
uv pip install --python .venv/bin/python -e .
.venv/bin/python scripts/build_dataset.py # ~40 MB download → data/arabic.db
Use — Claude Code / Desktop (stdio)
claude mcp add arabic-dict \
-- /absolute/path/arabic-dict-mcp/.venv/bin/python -m arabic_dict_mcp.main
Or add to ~/.claude/mcp.json / claude_desktop_config.json:
{
"mcpServers": {
"arabic-dict": {
"command": "/absolute/path/arabic-dict-mcp/.venv/bin/python",
"args": ["-m", "arabic_dict_mcp.main"]
}
}
}
Then ask Claude something like "What's the root of مكتوب and what other words come from it?" — the model will call lookup_word → lookup_root and reply with grounded data.
Use — HTTP (remote)
export MCP_AUTH_TOKEN=$(openssl rand -hex 24)
.venv/bin/python -m arabic_dict_mcp.main --http --host 0.0.0.0 --port 8000
Clients must send Authorization: Bearer $MCP_AUTH_TOKEN. The server refuses to start over HTTP without a token set.
Test
PYTHONPATH=src .venv/bin/python -m pytest tests/
Layout
src/arabic_dict_mcp/
normalize.py diacritic + letter-variant normalization (pyarabic)
db.py SQLite queries: lookup_root / lookup_word / search_meaning
server.py MCPServer with the three tools registered
main.py --http | stdio entrypoint
scripts/
build_dataset.py downloads sources → unified data/arabic.db with FTS5
tests/
test_normalize.py
Known limits
- English meanings only cover the ~1,651 Quranic roots. Other MSA vocabulary returns terse Arabic glosses from arramooz only.
- arramooz definitions are short dictionary glosses, not full lexicon entries. A future version could bring in the full Lane's Lexicon (Perseus XML) for classical coverage.
- License asymmetry: this repository's code is MIT, but the downloaded dictionary data is GPL/GPLv3. Redistributing the built
data/arabic.dbtriggers GPL; the code alone doesn't.
Contributing
Issues and pull requests are welcome. Ideas that would help:
- Full Lane's Lexicon ingestion beyond Quranic roots
- Additional MSA/dialect dictionaries with permissive licenses
- Root-similarity or fuzzy matching for typo tolerance
License
MIT — see LICENSE for details. Note the data-license asymmetry above.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。