turath
MCP server to search and retrieve passages from a corpus of 7,872 classical Islamic books via the Sahifah API, with full citations and mu'tabar filtering.
README
turath
Cited ibaroh — raw, sourced passages — from a corpus of 7,872 classical Islamic books (kitab turats: fiqh, usul, hadith commentary, tafsir, and more), pulled through the Sahifah API.
You query in Indonesian, English, or Arabic; the corpus is searched in Arabic; you get back the original passage — not a paraphrase — with its full citation: book, author, table-of-contents path, juz, and page. A mu'tabar filter keeps results to works recognized as authoritative in the tradition.
This repo ships three ways to use it, all built on the same read-only,
revocable Sahifah researcher API key (prefixed bm_):
- A Claude Code plugin bundling the
/turathskill and a remote MCP connector. - A
/turathskill you can drop into any Claude Code project on its own. - A remote MCP server (
turath_search,get_ibaroh) for any MCP-speaking agent — plus the raw HTTP API underneath it.
Adab of naql (the ethic of transmission). Everything here surfaces what the Sahifah corpus indexed; it is not a substitute for opening the actual kitab. Every result ends with a reminder to verify the quotation against the primary source before relying on it — especially for anything bound for a fatwa, an argument, or published writing. Where a passage looks truncated or OCR-garbled, treat it as uncertain. Where the fuqaha differ, note the khilaf rather than picking a side. Allahu a'lam.
Getting an API key
Sign in at sahifah.online and create a key from
the /api-keys dashboard. Keys are read-only, rate-limited, capped per
user, and revocable at any time. The key is never stored or logged by anything
in this repo — it is read from your environment or passed per-request.
export SAHIFAH_API_KEY=bm_your_key_here # bash / zsh
$env:SAHIFAH_API_KEY = "bm_your_key_here" # PowerShell
1. Install as a Claude Code plugin
/plugin marketplace add dihannahdi/turath
/plugin install turath@sahifah
This registers the /turath skill and connects the remote MCP server
(https://sahifah.online/mcp). Set SAHIFAH_API_KEY in your environment first
so the MCP connector can authenticate (see .mcp.json).
2. Use the /turath skill directly
The skill lives in skills/turath/ and drives a stdlib-only Python script —
no dependencies to install.
# search for candidate passages
python skills/turath/scripts/turath.py search "hukum zakat fitrah dengan uang" --max 10
# restrict to mu'tabar (authoritative) kitab only
python skills/turath/scripts/turath.py search "penyakit hasad dalam hati" --mutabar-only
# fetch a full passage by the book_id / toc_id printed above
python skills/turath/scripts/turath.py ibaroh 123 456
See skills/turath/SKILL.md for the full command reference and the adab of
naql the skill carries through its output.
3. Remote MCP server
The server is a stateless Streamable HTTP MCP server exposing two tools:
turath_search— search the corpus; returns each passage's citation, book/author, TOC path, page/juz, madhhab, era, and relevance score.get_ibaroh— given abook_id/toc_idfrom a search, fetch the full passage text and complete citation.
Add it as a Claude connector (or with claude mcp add):
claude mcp add turath --transport http https://sahifah.online/mcp \
--header "X-Sahifah-Api-Key: bm_your_key_here"
The server never hardcodes or stores a key. For each request it resolves the
key to forward from, in order: an Authorization: Bearer <key> header, an
X-Sahifah-Api-Key / X-Api-Key header, or its own SAHIFAH_API_KEY env var
(single-tenant fallback). The key is never logged.
Self-hosting the MCP server
The TypeScript source is in src/ and is what runs behind
https://sahifah.online/mcp. To run your own instance:
npm install
npm run build # tsc -> dist/
npm start # node dist/index.js (listens on PORT, default 8795)
Put a reverse proxy in front for TLS and never expose the raw port publicly.
See the comments in src/index.ts and ecosystem.config.cjs (PM2) for the
deployment shape. Configuration lives in .env (see .env.example):
SAHIFAH_API_BASE is fixed at startup and never taken from request input.
Underlying HTTP API
Both the skill and the MCP server sit on the public Sahifah API:
POST /api/v1/search—{ query, max_results?, mutabar_only?, include_ai? }, auth viaX-API-Key.include_aidefaults tofalse— raw ibaroh first.POST /api/v1/passage—{ book_id, toc_id }→ full passage + citation.
Layout
turath/
├── .claude-plugin/
│ ├── plugin.json # plugin manifest
│ └── marketplace.json # single-plugin marketplace (name: sahifah)
├── .mcp.json # remote MCP connector (auto-discovered by the plugin)
├── skills/turath/
│ ├── SKILL.md # the /turath skill
│ └── scripts/turath.py # stdlib-only client
├── src/ # TypeScript MCP server (Express + @modelcontextprotocol/sdk)
├── package.json
├── tsconfig.json
├── ecosystem.config.cjs # PM2
└── .env.example
Validate before publishing
claude plugin validate .
License
MIT — see LICENSE.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。