IlmSphere MCP API
IlmSphere-কে ChatGPT, Claude, Codex, Cursor ইত্যাদি MCP-সমর্থিত AI ক্লায়েন্টের সাথে সংযুক্ত করার জন্য একটি Model Context Protocol server।
https://ilm-sphere-digital-hub.lovable.app/mcp/.well-known/oauth-protected-resourcePOST এবং Accept: application/json, text/event-streamপ্রতিটি tool call OAuth bearer token দিয়ে সুরক্ষিত। ক্লায়েন্ট দুইভাবে টোকেন পেতে পারে:
- Dynamic Client Registration (DCR) — ChatGPT/Claude স্বয়ংক্রিয়ভাবে নিজেকে রেজিস্টার করে।
- ব্যবহারকারীকে
/.lovable/oauth/consent-এ পাঠানো হয়, যেখানে তিনি অ্যাক্সেস অনুমোদন করেন। - টোকেন Supabase Auth থেকে ইস্যু হয়; প্রতিটি tool ব্যবহারকারীর নিজস্ব পরিচয়ে RLS-scoped ডেটা পড়ে।
প্রতিটি call public.mcp_audit_logs-এ লগ হয় — ব্যবহারকারী নিজের লগ /mcp-logs-এ দেখতে পান।
🤖 ChatGPT (GPT-5 / Custom GPT)
- ChatGPT-এ যান → Settings → Connectors → Add custom connector।
- Name:
IlmSphere, MCP URL:https://ilm-sphere-digital-hub.lovable.app/mcp - Auth: OAuth নির্বাচন করুন — ChatGPT স্বয়ংক্রিয়ভাবে DCR-এর মাধ্যমে ক্লায়েন্ট রেজিস্টার করবে।
- একটি পপআপ খুলবে → IlmSphere-এ লগইন করুন → Approve চাপুন।
- কানেক্ট হলে চ্যাটে জিজ্ঞাসা করুন: "IlmSphere-এ রমজান সম্পর্কে কী আর্টিকেল আছে?"
🧠 Claude (Desktop / Web)
- Claude → Settings → Connectors → Add custom connector।
- Remote MCP server URL দিন:
https://ilm-sphere-digital-hub.lovable.app/mcp - Claude OAuth flow শুরু করবে —
/.lovable/oauth/consent-এ পৌঁছে Approve দিন। - Tools panel-এ পাঁচটি IlmSphere tool দেখাবে।
⌨️ Cursor / Codex / অন্যান্য
MCP config file (যেমন ~/.cursor/mcp.json)-এ যোগ করুন:
{
"mcpServers": {
"ilmsphere": {
"url": "https://ilm-sphere-digital-hub.lovable.app/mcp",
"transport": "http"
}
}
}Tools
Search published IlmSphere articles by keyword in title or excerpt.
🧪 Live "Try it" (সাইন-ইনড ইউজার হিসেবে)
Input schema
{
"query": "string (required, min 1)",
"limit": "integer 1–50 (default 10)"
}Example request (JSON-RPC)
POST /mcp
Content-Type: application/json
Accept: application/json, text/event-stream
Authorization: Bearer <access_token>
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_articles",
"arguments": { "query": "রমজান", "limit": 5 }
}
}cURL
curl -X POST https://ilm-sphere-digital-hub.lovable.app/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_articles",
"arguments": {
"query": "রমজান",
"limit": 5
}
}
}'Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [{ "type": "text", "text": "[...]" }],
"structuredContent": {
"results": [
{
"slug": "romjaner-fojilot",
"title": "রমজানের ফজিলত",
"excerpt": "…",
"published_at": "2026-03-01T00:00:00Z",
"reading_minutes": 6
}
]
}
}
}Fetch a single published article's full content by slug.
🧪 Live "Try it" (সাইন-ইনড ইউজার হিসেবে)
Input schema
{ "slug": "string (required)" }Example request (JSON-RPC)
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_article",
"arguments": { "slug": "romjaner-fojilot" }
}
}cURL
curl -X POST https://ilm-sphere-digital-hub.lovable.app/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_article",
"arguments": {
"slug": "romjaner-fojilot"
}
}
}'Example response
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"structuredContent": {
"article": {
"slug": "romjaner-fojilot",
"title": "রমজানের ফজিলত",
"content": "<p>…</p>",
"published_at": "2026-03-01T00:00:00Z",
"reading_minutes": 6,
"views": 1234
}
}
}
}List the signed-in user's bookmarked articles.
🧪 Live "Try it" (সাইন-ইনড ইউজার হিসেবে)
Input schema
{ "limit": "integer 1–100 (default 25)" }Example request (JSON-RPC)
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "list_my_bookmarks",
"arguments": { "limit": 10 }
}
}cURL
curl -X POST https://ilm-sphere-digital-hub.lovable.app/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "list_my_bookmarks",
"arguments": {
"limit": 10
}
}
}'Example response
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"structuredContent": {
"bookmarks": [
{
"created_at": "2026-06-10T12:34:56Z",
"articles": { "slug": "…", "title": "…", "excerpt": "…" }
}
]
}
}
}Search the hadith collection by keyword.
🧪 Live "Try it" (সাইন-ইনড ইউজার হিসেবে)
Input schema
{
"query": "string (required)",
"limit": "integer 1–50 (default 10)"
}Example request (JSON-RPC)
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "search_hadith",
"arguments": { "query": "নিয়ত", "limit": 5 }
}
}cURL
curl -X POST https://ilm-sphere-digital-hub.lovable.app/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "search_hadith",
"arguments": {
"query": "নিয়ত",
"limit": 5
}
}
}'Example response
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"structuredContent": {
"results": [
{
"collection": "Bukhari",
"number": "1",
"arabic": "إنما الأعمال بالنيات",
"bangla": "নিশ্চয়ই আমলসমূহ নিয়তের উপর নির্ভরশীল…"
}
]
}
}
}Return the signed-in user's course progress across enrolled courses.
🧪 Live "Try it" (সাইন-ইনড ইউজার হিসেবে)
Input schema
{
"course_slug": "string (optional) — filter to a single course"
}Example request (JSON-RPC)
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "get_my_course_progress",
"arguments": {}
}
}cURL
curl -X POST https://ilm-sphere-digital-hub.lovable.app/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "get_my_course_progress",
"arguments": {}
}
}'Example response
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"structuredContent": {
"courses": [
{
"course_slug": "islamer-itihas-vumika",
"course_title": "ইসলামের ইতিহাস: ভূমিকা",
"total_lessons": 12,
"completed_lessons": 5,
"percent_complete": 42,
"last_activity_at": "2026-07-14T09:22:11Z"
}
]
}
}
}Tool-level ব্যর্থতা result.isError: true ও content[0].text-এ error message নিয়ে ফেরত আসে।
Transport-level ব্যর্থতা স্ট্যান্ডার্ড HTTP status: 401 (invalid/expired token), 404 (unknown tool), 406 (missing Accept header)।
- প্রতি ব্যবহারকারী: ৬০ কল / মিনিট
- প্রতি ব্যবহারকারী: ১০০০ কল / ২৪ ঘণ্টা
লিমিট exceed করলে tool isError: true ও মেসেজ রিটার্ন করবে (যেমন Rate limit exceeded: 60/60 calls per minute. Retry in 60s.)। প্রতিটি rate-limited call-ও অডিট লগে থাকবে।