
Criterion
io.github.BalajSaleem由 GitHub 帳號 BalajSaleem 發布v1.0.0更新於 Nov 2, 2026
Semantic search across 6,236 Quran verses and 12,416 authentic Hadiths for Islamic guidance.
概覽
遠端 MCP 伺服器,對古蘭經經文與可靠聖訓進行語意檢索,為伊斯蘭教義問題回傳附引用的段落。
- 可以做什麼
- 以自然語言檢索全部 6,236 節古蘭經經文
- 檢索六部聖訓集中的聖訓,可依等級與合集篩選
- 依章節與節號等引用取得特定一節經文
- 對排序在前的结果附上前后文與來源引用
- 適用情境
- 適合讓助理在回答伊斯蘭教義相關問題時,以古蘭經與聖訓原文為依據,而非依賴一般知識,可用於學習、了解或研究。
- 執行需求
- 需要一個遠端 MCP 端點;未宣告任何套件、帳號或 API 金鑰。README 中的自架說明(Node.js、PostgreSQL、XAI 與 Google AI 金鑰)僅適用於自行部署副本,與託管端點無關。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Criterion,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.BalajSaleem%2Fcriterion/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"criterion": {
"type": "http",
"url": "https://criterion.life/api/mcp"
}
}
}README
Criterion - Islamic Knowledge Assistant
An AI-powered Da'i (invitor to Islam) bringing authentic Islamic guidance to seekers worldwide.
Built on the Quran and authentic Hadith. Free forever. For the sake of Allah.
Mission · Features · Tech Stack · Getting Started · MCP Server · Documentation
Mission
Criterion exists to bring authentic Islamic knowledge to anyone seeking truth, using modern technology to make divine guidance accessible to all of humanity — freely, forever, for the sake of Allah alone.
Our Four Pillars
- Truth & Authenticity — Every response is grounded in verified sources (Quran and Sahih Hadith). We never fabricate or hallucinate.
- Fundamentals & Simplicity — We focus on core Islamic teachings that unite. We avoid sectarian debates and controversial topics.
- For the Sake of Allah — Criterion will always be free, with no monetization or organizational promotion. This is Sadaqah Jariyah.
- State of the Art — We use cutting-edge AI to deliver Islamic guidance effectively to the masses.
👉 Read the full mission and vision in MISSION.md
Key Differentiators
Mission-Aligned:
- ✨ Free Forever — No paywalls, no ads, no monetization. Built fi sabilillah (for Allah's sake)
- 📚 Fundamentals-Focused — Avoids sectarian debates, focuses on universally accepted Islamic teachings
- 🛡️ Trust-First — Grade-filtered authentic Hadith (defaults to Sahih), verified sources only
- 🤝 Seeker-Oriented — Designed for curious minds, new Muslims, and students of knowledge
- 🕌 Da'i Personality — Compassionate, knowledgeable, humble guidance
Technical Excellence:
- 🎯 Semantic Search — Natural language queries return relevant verses from 6,236 Quran verses + 21,641 Hadith narrations
- 📖 Contextual Retrieval — Top results include ±2 surrounding verses/narrations for proper context
- 🌐 Multilingual — Read in English (fast) + Slovak (expandable to 10+ languages)
- 🔗 Accurate Citations — All responses include source references with hyperlinks (Quran.com, Sunnah.com)
- ⚡ Fast — <150ms query response time
Features
What Criterion Does
✅ Semantic Quran Search — Ask natural language questions, get relevant verses
✅ Semantic Hadith Search — Search authentic Hadith with grade & collection filtering
✅ Contextual Understanding — Top results include surrounding context for proper meaning
✅ Accurate Citations — Every response cites real sources with hyperlinks
✅ Multilingual Reading — English (fast) + Slovak (single JOIN <200ms)
✅ Shareable URLs — /quran/search?q=patience, /hadith/search?q=charity, and /quran/2/255 with metadata
✅ Real-time Streaming — Progressive response generation with token-by-token delivery
✅ Tool-Based RAG — LLM autonomously decides when to retrieve from Quran/Hadith
Technical Stack
- Next.js 15 App Router with React 19 & Tailwind CSS
- Vercel AI SDK for LLM integration and streaming
- XAI Grok 4 for intelligent natural language responses
- PostgreSQL with pgvector for vector search
- Drizzle ORM for type-safe database access
- Google Gemini text-embedding-004 (768 dimensions)
- HNSW indexes for <150ms similarity search
- Auth.js for authentication
- Deployed on Vercel
How It Works
The RAG Pipeline
Data
-
6,236 Quran verses from all 114 Surahs
- Arabic text (Tanzil Quran)
- English translation (master)
- Slovak translation (expandable)
- 768-dimensional embeddings (Gemini text-embedding-004)
-
21,641 Hadith narrations from 6 major collections (Kutub al-Sittah subset)
- Sahih Bukhari (7,558)
- Sahih Muslim (2,920)
- Jami` at-Tirmidhi (3,951)
- Sunan Abi Dawud (5,274)
- 40 Hadith Nawawi (42)
- Riyad as-Salihin (1,896)
- Grade filtering (Sahih, Hasan, Da'if)
- 768-dimensional embeddings
Performance
- Quran search: <150ms (English), <200ms (translated)
- Hadith search: <150ms
- Vector search: Powered by HNSW indexes
- Streaming: Real-time token-by-token delivery
Getting Started
Prerequisites
- Node.js 18+ and pnpm
- PostgreSQL database (recommend Neon)
- API Keys:
- XAI API Key (for Grok LLM)
- Google AI Studio API Key (for embeddings)
Installation
- Clone the repository
- Install dependencies
- Set up environment variables
Create a .env.local file:
- Enable pgvector extension
- Run database migrations
- Ingest Quran data (generates embeddings for 6,236 verses)
This will take 10-15 minutes to complete.
- Test the Quran search
- Start the development server
Your app should now be running on localhost:3000.
Available Commands
Development
Database
Data Ingestion & Testing
MCP Server
Criterion exposes its semantic search capabilities through the Model Context Protocol (MCP), allowing AI assistants like Claude Desktop and Cursor to search Quran and Hadith directly.
Quick Setup:
Available Tools:
search_quran— Search 6,236 Quran versessearch_hadith— Search 21,641 authentic Hadiths from 6 collectionsget_verse— Retrieve specific verse by reference (e.g., "2:255")
👉 Read full MCP documentation in MCP.md
Project Structure
Documentation
Understanding Criterion
- MISSION.md — Our vision, values, and deeper purpose. Read this first to understand why we build Criterion.
- CRITERION_DETAILED.md — Comprehensive technical documentation including architecture, implementation history, and performance metrics.
- CRITERION.md — Quick reference guide for setup and key concepts.
Key Sections
Architecture Overview
Data Attribution
- Quran Text: Tanzil.net — Creative Commons Attribution 3.0
- Quran Translations: Multiple sources with proper attribution
- Hadith Collections: Sunnah.com, IslamicNetwork.com
- Embeddings: Google Gemini text-embedding-004
Our Commitment
Criterion is built with these commitments:
- ✅ Never monetize Islamic knowledge
- ✅ Always cite sources with proper references
- ✅ Never fabricate verses or hadiths
- ✅ Focus on fundamentals — avoid sectarian debates
- ✅ Build for the community — this belongs to all Muslims and benefits all humanity
- ✅ Stay at the forefront — leverage state-of-the-art technology
Contributing
We welcome contributions from developers, scholars, and community members who share our mission. Please see CONTRIBUTING.md for guidelines.
License
- Quran Text: Creative Commons Attribution 3.0 (Tanzil.net)
- Hadith Data: From verified Islamic sources with proper attribution
- Code: See LICENSE file for details
"Invite to the way of your Lord with wisdom and good instruction, and argue with them in a way that is best." — Quran 16:125
May Allah accept this work and make it a means of guidance for seekers everywhere. Ameen.
來源:README.md,提交 691e714
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 75%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。