{"_id":"@anujsup/milkbasket-mcp","_rev":"4-bfac560c67dade8aa02e627a3789abf7","name":"@anujsup/milkbasket-mcp","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@anujsup/milkbasket-mcp","version":"1.0.0","keywords":["mcp","mcp-server","model-context-protocol","milkbasket","grocery","grocery-delivery","india","cursor","claude","ai-tools","ai-agent","shopping-cart","graphql","authentication","otp"],"author":{"name":"Anujsup"},"license":"MIT","_id":"@anujsup/milkbasket-mcp@1.0.0","maintainers":[{"name":"anujsup","email":"panuj55@gmail.com"}],"homepage":"https://github.com/Anujsup/milkbasket-mcp#readme","bugs":{"url":"https://github.com/Anujsup/milkbasket-mcp/issues"},"bin":{"milkbasket-mcp":"dist/index.js"},"dist":{"shasum":"6e720cd46ffbed54be5abbf2ee3c2db62a0a2fad","tarball":"https://registry.npmjs.org/@anujsup/milkbasket-mcp/-/milkbasket-mcp-1.0.0.tgz","fileCount":31,"integrity":"sha512-St/3ZdN7yod2ZodmNMP4AzZN35E2mtOw0ZqEn2Hx9D6RbwNIDQlQOJ64hpsw8bESxd4PXTUlKf27IqNQlVUc4w==","signatures":[{"sig":"MEYCIQCgIYcWnMUOr2M4rdPlFRqKp4mB2lD1vBt1zZIdaCChHAIhAJ0Z5cucoy4aT2+SrlCKL0PHi0NqQtsHuOi5JimlGxny","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126842},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"c8cedf688214f3c54a05d7d93539e951d7d038e7","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"anujsup","email":"panuj55@gmail.com"},"repository":{"url":"git+https://github.com/Anujsup/milkbasket-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for the Milkbasket grocery API — authenticate, search products, manage cart, and check wallet balance from any MCP client (Cursor, Claude Desktop, etc.)","directories":{},"_nodeVersion":"22.15.0","dependencies":{"zod":"^3.24.0","keytar":"^7.9.0","@modelcontextprotocol/sdk":"^1.11.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/keytar":"^4.4.2"},"_npmOperationalInternal":{"tmp":"tmp/milkbasket-mcp_1.0.0_1777291078292_0.7471493097790505","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@anujsup/milkbasket-mcp","version":"1.0.1","keywords":["mcp","mcp-server","model-context-protocol","milkbasket","grocery","grocery-delivery","india","cursor","claude","ai-tools","ai-agent","shopping-cart","graphql","authentication","otp"],"author":{"name":"Anujsup"},"license":"MIT","_id":"@anujsup/milkbasket-mcp@1.0.1","maintainers":[{"name":"anujsup","email":"panuj55@gmail.com"}],"homepage":"https://github.com/Anujsup/milkbasket-mcp#readme","bugs":{"url":"https://github.com/Anujsup/milkbasket-mcp/issues"},"bin":{"milkbasket-mcp":"dist/index.js"},"dist":{"shasum":"8836b629778d70f359c45dfc97510b12321e72a1","tarball":"https://registry.npmjs.org/@anujsup/milkbasket-mcp/-/milkbasket-mcp-1.0.1.tgz","fileCount":31,"integrity":"sha512-LnUwet6Zcqw9eGCkQVFWypIwKDr46trrVtpEJ+NSPqC0loLtqQmVIYUtQ+f+wvXvWFopTVROfzjWkFoyywDxig==","signatures":[{"sig":"MEQCIGtGcyJYb/ybg5bJMNAounsuLyHx61NYDGeRD6V90rr3AiA6ACKK8iea7fSqipLbDITNtbwUu4vUtq5mYPgQZlzd8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":128284},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"c9f01020f1838b0752f29c2f8ed8149fd5764e66","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"anujsup","email":"panuj55@gmail.com"},"repository":{"url":"git+https://github.com/Anujsup/milkbasket-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for the Milkbasket grocery API — authenticate, search products, manage cart, and check wallet balance from any MCP client (Cursor, Claude Desktop, etc.)","directories":{},"_nodeVersion":"22.15.0","dependencies":{"zod":"^3.24.0","keytar":"^7.9.0","@modelcontextprotocol/sdk":"^1.11.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/keytar":"^4.4.2"},"_npmOperationalInternal":{"tmp":"tmp/milkbasket-mcp_1.0.1_1777291462603_0.1282801356428982","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@anujsup/milkbasket-mcp","version":"1.0.2","keywords":["mcp","mcp-server","model-context-protocol","milkbasket","milkbasket-api","grocery","grocery-delivery","grocery-shopping","india","indian-grocery","cursor","cursor-mcp","claude","claude-mcp","ai-tools","ai-agent","llm","llm-tools","shopping-cart","cart","graphql","authentication","otp","nodejs"],"author":{"name":"Anujsup"},"license":"MIT","_id":"@anujsup/milkbasket-mcp@1.0.2","maintainers":[{"name":"anujsup","email":"panuj55@gmail.com"}],"homepage":"https://github.com/Anujsup/milkbasket-mcp#readme","bugs":{"url":"https://github.com/Anujsup/milkbasket-mcp/issues"},"bin":{"milkbasket-mcp":"dist/index.js"},"dist":{"shasum":"2e59aaa348e52123993dddef5a5b0dd0b9b935f3","tarball":"https://registry.npmjs.org/@anujsup/milkbasket-mcp/-/milkbasket-mcp-1.0.2.tgz","fileCount":31,"integrity":"sha512-i+ZYE4cdzJYZw//UUaKoS2C+2i8ybKTfV93N1nkNIhurJz/eYHOW+ypbDeW/Llqk0ja56uboKrda6VgqyWzoKQ==","signatures":[{"sig":"MEUCIEBouxQW4SK0WxTjxKVG6kMbNhFGnfBIZ0qi1YOGVPnuAiEAg+36NKIvAOFmA4T2sRjlMxFnMWsB84XA+keh6rxz+Ik=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129133},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"d16b4a819a82eb603e1f0a6ded6e2295e2b628af","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"anujsup","email":"panuj55@gmail.com"},"repository":{"url":"git+https://github.com/Anujsup/milkbasket-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for Milkbasket — AI-powered grocery shopping for India. Authenticate via OTP, search products, manage cart, and check wallet from Cursor, Claude, or any MCP client.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"zod":"^3.24.0","keytar":"^7.9.0","@modelcontextprotocol/sdk":"^1.11.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/keytar":"^4.4.2"},"_npmOperationalInternal":{"tmp":"tmp/milkbasket-mcp_1.0.2_1777291733466_0.4538330961856323","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@anujsup/milkbasket-mcp","version":"1.0.3","description":"MCP server for Milkbasket — AI-powered grocery shopping for India. Authenticate via OTP, search products, manage cart, and check wallet from Cursor, Claude, or any MCP client.","type":"module","main":"dist/index.js","bin":{"milkbasket-mcp":"dist/index.js"},"keywords":["mcp","mcp-server","model-context-protocol","milkbasket","milkbasket-api","grocery","grocery-delivery","grocery-shopping","india","indian-grocery","cursor","cursor-mcp","claude","claude-mcp","ai-tools","ai-agent","llm","llm-tools","shopping-cart","cart","graphql","authentication","otp","nodejs"],"license":"MIT","author":{"name":"Anujsup"},"repository":{"type":"git","url":"git+https://github.com/Anujsup/milkbasket-mcp.git"},"bugs":{"url":"https://github.com/Anujsup/milkbasket-mcp/issues"},"homepage":"https://github.com/Anujsup/milkbasket-mcp#readme","engines":{"node":">=18"},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","dev":"tsx src/index.ts","start":"node dist/index.js","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.11.0","keytar":"^7.9.0","zod":"^3.24.0"},"devDependencies":{"@types/keytar":"^4.4.2","@types/node":"^22.0.0","tsx":"^4.19.0","typescript":"^5.7.0"},"_id":"@anujsup/milkbasket-mcp@1.0.3","gitHead":"87c630ffcfda66d22ff74d75361beaf986f5a491","types":"./dist/index.d.ts","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-h7STXWKMIxIpBYf3REyxHsnodId1UXE6WRtzuJ7GD9N+Nc1QK+WJwkDOrolJHPM+9kjzBfLFkMaT+vgwvUyaZQ==","shasum":"7dbe12401b851b3fd2e158e3da512136ac534883","tarball":"https://registry.npmjs.org/@anujsup/milkbasket-mcp/-/milkbasket-mcp-1.0.3.tgz","fileCount":31,"unpackedSize":144527,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDB10OG6KWU2RspwmVYV9JfN4t0YIg9WXSW7RUDFKwtrwIgCYu+lAIl06Y7asdQyxL3XpOx6YyF39EQ8WDz6w6/198="}]},"_npmUser":{"name":"anujsup","email":"panuj55@gmail.com"},"directories":{},"maintainers":[{"name":"anujsup","email":"panuj55@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/milkbasket-mcp_1.0.3_1777320616124_0.2715194609434266"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-27T11:57:58.177Z","modified":"2026-04-27T20:10:16.810Z","1.0.0":"2026-04-27T11:57:58.512Z","1.0.1":"2026-04-27T12:04:22.753Z","1.0.2":"2026-04-27T12:08:53.604Z","1.0.3":"2026-04-27T20:10:16.290Z"},"bugs":{"url":"https://github.com/Anujsup/milkbasket-mcp/issues"},"author":{"name":"Anujsup"},"license":"MIT","homepage":"https://github.com/Anujsup/milkbasket-mcp#readme","keywords":["mcp","mcp-server","model-context-protocol","milkbasket","milkbasket-api","grocery","grocery-delivery","grocery-shopping","india","indian-grocery","cursor","cursor-mcp","claude","claude-mcp","ai-tools","ai-agent","llm","llm-tools","shopping-cart","cart","graphql","authentication","otp","nodejs"],"repository":{"type":"git","url":"git+https://github.com/Anujsup/milkbasket-mcp.git"},"description":"MCP server for Milkbasket — AI-powered grocery shopping for India. Authenticate via OTP, search products, manage cart, and check wallet from Cursor, Claude, or any MCP client.","maintainers":[{"name":"anujsup","email":"panuj55@gmail.com"}],"readme":"# @anujsup/milkbasket-mcp\n\n[![npm version](https://img.shields.io/npm/v/@anujsup/milkbasket-mcp)](https://www.npmjs.com/package/@anujsup/milkbasket-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@anujsup/milkbasket-mcp)](https://www.npmjs.com/package/@anujsup/milkbasket-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![MCP](https://img.shields.io/badge/MCP-compatible-blue)](https://modelcontextprotocol.io)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)\n\n> AI-powered grocery shopping for India — a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for the [Milkbasket](https://www.milkbasket.com/) API.\n\nConnect your AI assistant (Cursor, Claude Desktop, Windsurf, or any MCP client) to your Milkbasket account and let it handle your daily groceries — log in with OTP, browse products, build your cart, check your wallet, and review your full order summary, all through natural language.\n\n**What you can do with this:**\n- Ask your AI to find products — \"Search for low-fat milk under ₹50\"\n- Build and manage your cart — \"Add 2 Amul butter, remove the lassi\"\n- Check your order before delivery — \"Show me my cart with the full bill\"\n- Keep track of your wallet — \"What's my Milkbasket balance?\"\n- Fetch account details — \"What city and hub am I assigned to?\"\n\n## Prerequisites\n\n- Node.js 18 or higher\n- A Milkbasket account (Indian mobile number)\n- An MCP client (Cursor, Claude Desktop, etc.)\n\n## Installation\n\n### Option 1: npx (recommended, no install needed)\n\n```json\n{\n  \"mcpServers\": {\n    \"milkbasket\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anujsup/milkbasket-mcp@latest\"]\n    }\n  }\n}\n```\n\n### Option 2: Global install\n\n```bash\nnpm install -g @anujsup/milkbasket-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"milkbasket\": {\n      \"command\": \"milkbasket-mcp\"\n    }\n  }\n}\n```\n\n### Option 3: Local install\n\n```bash\nnpm install @anujsup/milkbasket-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"milkbasket\": {\n      \"command\": \"node\",\n      \"args\": [\"node_modules/@anujsup/milkbasket-mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\n## Cursor setup\n\nAdd the config to `.cursor/mcp.json` in your project root (project-level) or `~/.cursor/mcp.json` (global):\n\n```json\n{\n  \"mcpServers\": {\n    \"milkbasket\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anujsup/milkbasket-mcp@latest\"]\n    }\n  }\n}\n```\n\nReload Cursor after saving.\n\n## Available Tools\n\n### Authentication\n\n| Tool | Description |\n|---|---|\n| `auth_request_otp` | Send OTP to your registered mobile number |\n| `auth_verify_otp` | Verify OTP and log in |\n| `auth_status` | Check if you are currently authenticated |\n| `auth_logout` | Log out and clear stored tokens |\n\n### User\n\n| Tool | Description |\n|---|---|\n| `get_user_details` | Fetch your name, email, city, hub, and membership info |\n| `get_wallet_balance` | Fetch your current Milkbasket wallet balance and cashback |\n\n### Products\n\n| Tool | Description |\n|---|---|\n| `list_products` | List featured/flash-deal products (paginated) |\n| `search_products` | Search products by name or keyword (paginated) |\n| `get_hero_collections` | Fetch hero banner collections shown on the home screen |\n\n### Cart\n\n| Tool | Description |\n|---|---|\n| `add_to_cart` | Add a new product or increase quantity in the cart |\n| `remove_from_cart` | Decrease quantity or remove a product from the cart |\n| `get_basket` | Lightweight cart snapshot — item count, product IDs, basic totals |\n| `get_extended_basket` | Full cart view — product names, images, discounts, delivery fee, GST, final payable amount |\n\n## Authentication Flow\n\n```\n1. auth_request_otp  →  { phone: \"9XXXXXXXXX\" }\n2. Receive OTP via SMS\n3. auth_verify_otp   →  { phone: \"9XXXXXXXXX\", otp: \"XXXX\" }\n4. You are now logged in\n```\n\n## Security & Privacy\n\n**This server runs 100% locally on your machine.** Your phone number, OTP, and tokens never leave your device — they are never sent to any third party, including the AI assistant. Here's exactly what happens:\n\n- Your phone number is sent **directly** from your machine to Milkbasket's servers to request an OTP\n- The OTP you share with the AI is passed **directly** from your machine to Milkbasket to verify login\n- The AI model only sees the response (success/failure) — it cannot intercept or store your credentials\n- Access tokens are stored in your **OS keychain** (macOS Keychain, Windows Credential Manager, Linux Secret Service) using `keytar` — the same secure storage used by apps like VS Code and 1Password\n- If `keytar` is unavailable, an **AES-256-GCM encrypted file** is used as fallback\n- You can log out at any time using `auth_logout`, which clears all stored tokens immediately\n\n## Cart Flow\n\n```\nsearch_products  →  find productId and price\nadd_to_cart      →  { productId, price, quantity }\nremove_from_cart →  { productId, price, quantity: 0 }  ← set 0 to delete\nget_extended_basket  →  full checkout view\n```\n\n## What you can ask your AI\n\nOnce connected, just talk to your AI naturally:\n\n| What you say | What happens |\n|---|---|\n| \"Log me in to Milkbasket\" | Sends OTP → verifies → stores token |\n| \"Search for paneer\" | Calls `search_products` and returns matches |\n| \"Add 2 Amul Gold milk to my cart\" | Calls `add_to_cart` with the right product |\n| \"Remove the lassi from my cart\" | Calls `remove_from_cart` with quantity 0 |\n| \"Show me my cart with full bill\" | Calls `get_extended_basket` with itemized bill |\n| \"What is my wallet balance?\" | Calls `get_wallet_balance` |\n| \"What are my account details?\" | Calls `get_user_details` — name, city, hub, membership |\n| \"What deals are on today?\" | Calls `list_products` for flash deals |\n| \"Log me out\" | Clears tokens from keychain |\n\n## Example usage in Cursor\n\n```\nSearch for Amul milk products\n→ search_products({ query: \"amul milk\" })\n\nAdd 2 units to cart\n→ add_to_cart({ productId: 1234, price: 28, quantity: 2 })\n\nView full cart with bill breakdown (product names, discounts, delivery fee, GST, payable)\n→ get_extended_basket()\n\nReduce quantity by 1\n→ remove_from_cart({ productId: 1234, price: 28, quantity: 1 })\n\nRemove product entirely\n→ remove_from_cart({ productId: 1234, price: 28, quantity: 0 })\n\nCheck wallet balance\n→ get_wallet_balance()\n\nGet account info\n→ get_user_details()\n```\n\n## License\n\nMIT © [Anujsup](https://github.com/Anujsup)\n","readmeFilename":"README.md"}