মূল কন্টেন্টে যান

IlmSphere MCP API

IlmSphere-কে ChatGPT, Claude, Codex, Cursor ইত্যাদি MCP-সমর্থিত AI ক্লায়েন্টের সাথে সংযুক্ত করার জন্য একটি Model Context Protocol server।

Endpoint
MCP Streamable HTTP:
https://ilm-sphere-digital-hub.lovable.app/mcp
Protected-resource metadata:
/.well-known/oauth-protected-resource
Transport:
POST এবং Accept: application/json, text/event-stream
Authentication (OAuth 2.1)

প্রতিটি tool call OAuth bearer token দিয়ে সুরক্ষিত। ক্লায়েন্ট দুইভাবে টোকেন পেতে পারে:

  1. Dynamic Client Registration (DCR) — ChatGPT/Claude স্বয়ংক্রিয়ভাবে নিজেকে রেজিস্টার করে।
  2. ব্যবহারকারীকে /.lovable/oauth/consent-এ পাঠানো হয়, যেখানে তিনি অ্যাক্সেস অনুমোদন করেন।
  3. টোকেন Supabase Auth থেকে ইস্যু হয়; প্রতিটি tool ব্যবহারকারীর নিজস্ব পরিচয়ে RLS-scoped ডেটা পড়ে।

প্রতিটি call public.mcp_audit_logs-এ লগ হয় — ব্যবহারকারী নিজের লগ /mcp-logs-এ দেখতে পান।

ChatGPT / Claude / Cursor-এ যুক্ত করুন

🤖 ChatGPT (GPT-5 / Custom GPT)

  1. ChatGPT-এ যান → Settings → ConnectorsAdd custom connector
  2. Name: IlmSphere, MCP URL: https://ilm-sphere-digital-hub.lovable.app/mcp
  3. Auth: OAuth নির্বাচন করুন — ChatGPT স্বয়ংক্রিয়ভাবে DCR-এর মাধ্যমে ক্লায়েন্ট রেজিস্টার করবে।
  4. একটি পপআপ খুলবে → IlmSphere-এ লগইন করুন → Approve চাপুন।
  5. কানেক্ট হলে চ্যাটে জিজ্ঞাসা করুন: "IlmSphere-এ রমজান সম্পর্কে কী আর্টিকেল আছে?"

🧠 Claude (Desktop / Web)

  1. Claude → Settings → ConnectorsAdd custom connector
  2. Remote MCP server URL দিন: https://ilm-sphere-digital-hub.lovable.app/mcp
  3. Claude OAuth flow শুরু করবে — /.lovable/oauth/consent-এ পৌঁছে Approve দিন।
  4. 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_articles
Search articles
read-only

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
        }
      ]
    }
  }
}
get_article
Get article
read-only

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_my_bookmarks
List my bookmarks
read-only

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_hadith
Search hadith
read-only

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": "নিশ্চয়ই আমলসমূহ নিয়তের উপর নির্ভরশীল…"
        }
      ]
    }
  }
}
get_my_course_progress
Get my course progress
read-only

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"
        }
      ]
    }
  }
}
Errors

Tool-level ব্যর্থতা result.isError: truecontent[0].text-এ error message নিয়ে ফেরত আসে।

Transport-level ব্যর্থতা স্ট্যান্ডার্ড HTTP status: 401 (invalid/expired token), 404 (unknown tool), 406 (missing Accept header)।

Rate limits
  • প্রতি ব্যবহারকারী: ৬০ কল / মিনিট
  • প্রতি ব্যবহারকারী: ১০০০ কল / ২৪ ঘণ্টা

লিমিট exceed করলে tool isError: true ও মেসেজ রিটার্ন করবে (যেমন Rate limit exceeded: 60/60 calls per minute. Retry in 60s.)। প্রতিটি rate-limited call-ও অডিট লগে থাকবে।