Model Context Protocol (MCP) & AI Integration

Give Claude & ChatGPT Direct Access to Your Shop

Query live stock counts, inspect daily gross margins, record Udharo collections, and update repair tickets directly from your favorite AI chatbot using granular scoped permissions.

Cloud & Local AI Support

Dual-transport architecture supports both modern Streamable HTTP / SSE for Claude Web & ChatGPT, and stdio for Claude Desktop and Cursor.

Granular Permission Scopes

Decide exactly what each AI assistant can do. Restrict a chatbot to read-only stock lookup, or grant permission to record incoming supplier shipments.

Tenant Isolation & Hashing

API keys (merp_live_...) are hashed with SHA-256 and strictly isolated to your shop ID. Cross-tenant leakage is impossible.

Quick Integration

Connect in Under 2 Minutes

Choose your AI platform below for step-by-step instructions and ready-to-use configuration blocks.

Claude Web (claude.ai)

Connect Claude on the web directly to your Mobile खाता counter using Remote MCP over HTTPS or Cloudflare Tunnel.

Setup Instructions

  1. Generate a scoped API key in Mobile खाता under Settings → API & AI Integrations.
  2. If running locally, expose port 3000 using Cloudflare Tunnel: cloudflared tunnel --url http://localhost:3000
  3. In claude.ai, go to Settings → Connectors → Add custom connector (+).
  4. Name it 'Mobile खाता' and paste the Remote MCP URL with ?apiKey=merp_live_...
  5. Select 'No sign-in' (since authentication is securely provided via the API key) and click Add.
Configuration Snippet (text)
https://api-mobilekhata.nepalbivek.com.np/api/v1/mcp/sse?apiKey=merp_live_YOUR_SECRET_KEY_HERE
Tool Registry

8 Built-in Shop Operations Tools

Every tool is mapped directly to Mobile खाता business logic with full audit tracking.

get_shop_summary
analytics:read

Fetches total collected revenue, COGS, gross margins, payment breakdown (Cash, eSewa, Khalti), and cleared debts for today, yesterday, this week, or this month.

params: preset (today | yesterday | this_week | this_month), from, to
search_inventory
inventory:read

Fuzzy search products in your shop inventory with real-time stock levels, cost price, and optional low-stock threshold filtering.

params: search (string), lowStockThreshold (int), activeOnly (bool)
record_stock_movement
inventory:write

Safely receives incoming supplier stock, records damaged units, or adjusts counts via an immutable audit movement log without direct stock overwriting.

params: itemId (int), type (receive | damage | adjustment), quantity (int), direction (in | out)
update_item_pricing
inventory:write

Updates default selling price or cost price in Nepali Rupees (Rs.) without altering past transaction or invoice snapshots.

params: itemId (int), sellingPrice (int), costPrice (int)
list_outstanding_credits
credit:read

Lists all customers with unpaid credit balances, contact phone numbers, due dates, and automatic overdue urgency flags.

params: overdueOnly (bool), customerSearch (string)
record_credit_payment
credit:write

Records full or partial repayments on a customer's Udharo balance, automatically updates debt remainder, and marks the account resolved when cleared.

params: transactionId (int), amount (int), paymentMethod (Cash | eSewa)
list_active_repairs
repairs:read

Lists ongoing device repair jobs filtered by lifecycle status (waiting, diagnosing, repairing, ready, delivered).

params: status (waiting | diagnosing | repairing | ready | delivered)
update_repair_status
repairs:write

Advances a repair ticket to a new status with technician notes, appending an audit event to the customer tracking timeline.

params: repairId (int), status (status enum), note (string)
Security Architecture

Granular Scopes Reference

Configure your API key with the least privilege needed for your workflow.

ScopeCategoryDescription
analytics:readAnalytics ReadAccess daily sales, gross margins, and revenue breakdown
inventory:readInventory ReadFuzzy search products and inspect current stock counts
inventory:writeInventory WriteReceive stock shipments, log damages, and adjust prices
credit:readCredit ReadView unpaid customer debts and overdue due dates
credit:writeCredit WriteRecord debt repayments and settlements
repairs:readRepairs ReadTrack device tickets and repair queue status
repairs:writeRepairs WriteAdvance repair lifecycle and log technical progress

Ready to automate your shop operations?

Generate your first scoped API key in Mobile खाता settings and connect your AI copilot today.