shop-mcp
Provides browser automation for Amazon.in accounts, enabling product search, product details retrieval, cart management, checkout dry-runs with summary, and guarded order placement using a session-based login.
Provides browser automation for Flipkart accounts, enabling product search, product details retrieval, cart management, checkout dry-runs with summary, and guarded order placement using a session-based login.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@shop-mcpsearch for iPhone 15 on Amazon.in"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
How It Works
graph LR
A[AI Assistant<br/>Claude / Open AI / Kiro / Any AI Chat or LLM Model] -->|MCP Protocol<br/>stdio| B[shop-mcp<br/>Server]
B -->|Playwright<br/>Browser Automation| C[Amazon.in]
B -->|Playwright<br/>Browser Automation| D[Flipkart]
B --- E[Saved Sessions<br/>cookies only<br/>no passwords]
style A fill:#4A90D9,color:#fff
style B fill:#2ECC71,color:#fff
style C fill:#FF9900,color:#fff
style D fill:#F7D02C,color:#000
style E fill:#95A5A6,color:#fffflowchart LR
AI["๐ค YOUR AI ASSISTANT\nClaude Desktop ยท Kiro ยท Any MCP Client"]
subgraph SERVER["๐ฅ๏ธ shop-mcp SERVER"]
direction TB
RO["๐ Read-Only\nsearch_product\nview_cart\nget_product_details\nget_order_status"]
MU["โ๏ธ Mutations\nadd_to_cart"]
GC["๐ Guarded Checkout\ncheckout_dry_run\nplace_order\nToken + โน3000 cap\n5 min expiry"]
end
subgraph SITES["๐ Shopping Platforms"]
direction TB
AMZ["๐ Amazon.in\nSession cookies\nManual login once"]
FK["๐ต Flipkart\nSession cookies\nManual login once"]
end
AI -->|"MCP Protocol\nstdio"| SERVER
SERVER -->|"Playwright\nChromium"| SITES
style AI fill:#1a73e8,stroke:#0d47a1,stroke-width:3px,color:#fff
style SERVER fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px,color:#2e7d32
style RO fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#1b5e20
style MU fill:#fff9c4,stroke:#f9a825,stroke-width:2px,color:#e65100
style GC fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#b71c1c
style SITES fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px,color:#6a1b9a
style AMZ fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#bf360c
style FK fill:#e8eaf6,stroke:#283593,stroke-width:2px,color:#1a237eRelated MCP server: browser-agent-mcp
Key Features
Feature | Description |
Price Comparison | Search the same product on both platforms and compare prices instantly |
Cart Management | View, add to cart across Amazon.in and Flipkart |
Guarded Checkout | Orders require a dry-run summary + confirmation token + price cap |
No Password Storage | You log in manually once; only session cookies are saved |
Headed Browser | Visible Chromium window โ no stealth, no detection issues |
MCP Standard | Works with any MCP-compatible AI client via stdio transport |
Quick Start
# 1. Clone & setup
git clone https://github.com/detushar/shop-mcp.git
cd shop-mcp
python -m venv .venv
.venv\Scripts\activate # or source .venv/bin/activate on Linux/macOS
# 2. Install dependencies
pip install -r requirements.txt
playwright install chromium # downloads browser binary (~180MB)
# 3. Login to sites (one-time, manual)
python -m browser.login amazon
python -m browser.login flipkart
# 4. Run the MCP server
python server.pyNote:
playwright install chromiumdownloads the Chromium binary that Playwright controls. This is separate from the Python package and required for the server to work.
Tools
Tool | Effect | Risk Level |
| Search a site for products | Read-only |
| Get price, title, availability for a product URL | Read-only |
| List current cart contents | Read-only |
| Look up an existing order by ID | Read-only |
| Add a product to the cart | Reversible |
| Load checkout summary WITHOUT submitting | Read-only |
| Submit the order | Irreversible โ guarded |
Safety Guards
place_order() will REFUSE if:
โ No checkout_dry_run() was called first
โ confirm_token doesn't match the latest dry-run
โ Token is older than 5 minutes (stale prices)
โ Order total exceeds โน3,000 (configurable cap)Configure in config.py:
Setting | Default | Purpose |
| 3000 | Hard price ceiling per order |
| True | Forces dry-run before every purchase |
| 300 | Token expiry (forces fresh price check) |
MCP Client Config
Example config file: mcp-config-example.json
Claude Desktop
%APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"shop-mcp": {
"command": "C:\\path\\to\\shop-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\shop-mcp\\server.py"],
"env": { "PYTHONUNBUFFERED": "1" }
}
}
}Kiro IDE
Add to .kiro/settings/mcp.json:
{
"mcpServers": {
"shop-mcp": {
"command": "python",
"args": ["server.py"],
"cwd": "D:\\path\\to\\shop-mcp",
"env": { "PYTHONUNBUFFERED": "1" },
"disabled": false
}
}
}Linux / macOS
{
"mcpServers": {
"shop-mcp": {
"command": "/path/to/shop-mcp/.venv/bin/python",
"args": ["/path/to/shop-mcp/server.py"],
"env": { "PYTHONUNBUFFERED": "1" }
}
}
}Always use the Python from your
.venvso all dependencies are available.
Project Structure
shop-mcp/
โโโ server.py # MCP server โ tool definitions & checkout guards
โโโ config.py # Safety settings, timeouts, site URLs
โโโ requirements.txt # Python dependencies
โโโ mcp-config-example.json # Client configuration template
โโโ browser/
โ โโโ base.py # Playwright session management (cookies, context)
โ โโโ amazon.py # Amazon.in browser actions (search, cart, checkout)
โ โโโ flipkart.py # Flipkart browser actions
โ โโโ login.py # Manual login helper (opens browser for you)
โโโ sessions/ # Auto-created, .gitignored โ stores login cookiesImportant Notes
Terms of Service | Amazon.in and Flipkart restrict bot access. This is for personal, low-volume use of your own account only. |
Selectors Break | Both sites change their DOM frequently. Expect to update CSS selectors in |
Headed Mode | Both sites detect headless browsers. Everything runs with a visible Chromium window ( |
Session Expiry | When cookies expire, re-run |
Tech Stack
Component | Technology |
Server Framework | MCP (Model Context Protocol) via |
Browser Automation | Playwright (Chromium) |
Language | Python 3.10+ |
Transport | stdio (local server) |
License
MIT License. See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMCP server for grocery-related web automation using Playwright, enabling AI assistants to interact with grocery websites.
- FlicenseNot gradedqualityDmaintenanceProduction-grade MCP server for autonomous web automation with stealth features, designed for complex booking workflows like tickets, tours, hotels, and transport.
- AlicenseBqualityDmaintenanceBrowser automation MCP server using Camoufox anti-detect browser with fingerprint spoofing, geolocation/timezone spoofing, and human-like cursor movement.141Apache 2.0
- FlicenseNot gradedqualityCmaintenanceLightweight MCP server for interacting with Amazon and Flipkart search and authentication components.
Related MCP Connectors
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/detushar/shop-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server