Kapruka MCP

السجل الرسمي التجارة الإلكترونية

Free public MCP server for Kapruka.com — Sri Lanka's largest e-commerce platform.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

Remote (streamable-http)
Claude Code
claude mcp add --transport http kapruka-mcp 'https://mcp.kapruka.com/mcp'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "kapruka-mcp": {
            "type": "http",
            "url": "https://mcp.kapruka.com/mcp"
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Kapruka MCP Server
  2. Setup
  3. Running
  4. Testing with MCP Inspector
  5. Project Structure
  6. Trusted partners
  7. Running Tests

Kapruka MCP Server

Python MCP server that wraps the Kapruka.com REST API and exposes it as tools for LLMs and third-party MCP clients.

Setup

# 1. Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

# 2. Install dependencies
pip install -e ".[dev]"

# 3. Configure environment
cp .env.example .env
# Edit .env with your Kapruka API URL and key

Running

# Start the MCP server (streamable HTTP, default port 8000)
python cli.py server

# Start with stdio transport (for use with MCP Inspector)
python cli.py server --stdio

# Health-check the Kapruka REST API
python cli.py ping

# List registered MCP tools
python cli.py tools

Testing with MCP Inspector

npx @modelcontextprotocol/inspector python cli.py server --stdio

Project Structure

src/
  server.py        # FastMCP server entry point
  tools/           # One module per tool group (products, orders, …)
  api/
    client.py      # Async httpx client + error handling
  config/
    settings.py    # Env-based configuration
tests/             # pytest test suite
cli.py             # Developer CLI

Trusted partners

First-party callers that can't be IP-allowlisted (e.g. Kapruka's web assistant on Cloudflare Workers) authenticate with an X-Partner-Key header instead, with optional per-customer limits via X-Partner-Customer-Id. Configured with PARTNER_KEYS / PARTNER_SCOPES / PARTNER_LIMITS. See docs/PARTNER_ACCESS.md and the deploy steps in deploy/README.md.

Running Tests

pytest

الأسئلة الشائعة

ما هو Kapruka MCP؟

Free public MCP server for Kapruka.com — Sri Lanka's largest e-commerce platform.

كيف أثبّت Kapruka MCP؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http kapruka-mcp 'https://mcp.kapruka.com/mcp'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Kapruka MCP إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل Kapruka MCP مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون Kapruka MCP؟

ينشره kapruka. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.