Turath MCP
# turath-mcp
An MCP (Model Context Protocol) server for [turath.io](https://turath.io) — search the Islamic library, read book pages, and look up books, authors and categories from Claude or any MCP client.
No download or build needed. Requires Node.js 18+.
## Quick start
### Claude Desktop
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"turath": {
"command": "npx",
"args": ["-y", "github:achrafmontage/turath-mcp"]
}
}
}
```
### Claude Code
```bash
claude mcp add turath -- npx -y github:achrafmontage/turath-mcp
```
### Cursor / other clients
Use the same command: `npx -y github:achrafmontage/turath-mcp`
> Once published to npm, replace `github:achrafmontage/turath-mcp` with `turath-mcp`.
## Tools
| Tool | Description |
|---|---|
| `turath_search` | Full-text search across the library |
| `turath_get_page` | Text of one book page |
| `turath_get_pages` | Up to 10 consecutive pages |
| `turath_get_book` | Book metadata and table of contents |
| `turath_get_author` | Author details |
| `turath_list_categories` | Book categories |
| `turath_find_in_catalog` | Find book/author/category IDs by name |
| `turath_get_category` | One category with its books (paged) |
| `turath_get_book_file` | Static JSON of a whole book (asks for confirmation via elicitation) |
| `turath_summarize_page` | Summarize a page with the client model (sampling) |
| `turath_export_pages` | Save pages as .md inside the client's root folder (roots) |
| `turath_fetch_pages_task` | Fetch up to 100 pages as a background task (tasks) |
**Resources:** `turath://categories`, `turath://category/{id}`, `turath://book/{id}`, `turath://book/{id}/page/{page}`
**Prompts:** `research_topic`, `explore_category` (with argument completion)
## MCP capabilities
Server: tools, resources, prompts, logging, completions, tasks (experimental), experimental (`turath/arabic-normalization`).
Client features used when available: roots, sampling, elicitation (each tool degrades with a clear message if the client lacks it).
## Development
```bash
npm install
npm run build
npm run inspect # opens MCP Inspector
```
`build/` is committed so `npx github:...` works instantly; run `npm run build` before committing source changes.
## Disclaimer
Unofficial project, not affiliated with turath.io. Content belongs to its respective owners; please respect turath.io's terms of use.
## License
MIT
TDQS
Scored across 12 tools
Most tools target distinct resources (search, book, author, category, catalog, export), but the page-fetching family — turath_get_page, turath_get_pages, turath_fetch_pages_task, and turath_get_book_file — overlaps in purpose and is differentiated only by size/mechanism. turath_search (full-text) vs turath_find_in_catalog (catalog name search) could also be briefly confused, though the descriptions do draw the line.
All twelve tools follow a turath_ prefix with snake_case verb_noun structure (get_page, list_categories, export_pages), which is highly predictable. Minor deviation: get vs fetch verbs are mixed for page retrieval (turath_get_pages vs turath_fetch_pages_task), but the pattern remains readable.
Twelve tools is well within the ideal 3-15 range for a library server. Each tool earns its place: search, browsing hierarchy (categories → category → book → author), page retrieval at three scales, plus summarize/export/task utilities.
The read-only domain is well covered: search, category listing and drill-down, book metadata/TOC, author details, page retrieval at multiple granularities, plus export and summarization. Minor gaps: no dedicated author listing/browse tool (only catalog name search) and no way to navigate pages relative to a search hit, but agents can work around these.