walmart-invoice-mcp
MCP server that relays Walmart order history collected by the Walmart Invoice Exporter browser extension, enabling Claude and other AI clients to query orders and spending.
README
walmart-invoice-mcp
MCP server for the Walmart Invoice Exporter browser extension (website). It lets Claude Code, Claude Desktop, and any other Model Context Protocol client read the Walmart order history you've already collected with the extension — ask Claude things like "how much did I spend on groceries in March?" or "find the order with the air fryer".
⚠️ The browser extension is REQUIRED. This server has no data of its own — it is only a relay to the Walmart Invoice Exporter browser extension. Without the extension installed, its AI access (MCP) toggle enabled, and the extension connected, no tool works. Install it first: github.harsh.al/Walmart-Invoice-Exporter.
Read-only by default, and always local-only. The server binds to 127.0.0.1 and only ever relays data between two processes on your machine: your MCP client and your browser. Nothing is uploaded anywhere. Out of the box, tools can only read orders the extension has already saved; if you additionally enable the extension's "Allow AI tools to collect data" toggle (off by default), AI tools may also start order collection and invoice fetching — in a background browser tab, using your own signed-in session, still entirely on your machine.
How it works
Remember: the extension is the only data source — this package cannot fetch, store, or serve anything on its own. A browser extension can't listen on a port, so this package is the meeting point:
Claude Code / Claude Desktop
│ MCP over stdio
▼
walmart-invoice-mcp ←— ws://127.0.0.1:8924 —→ browser extension (background)
Your MCP client spawns walmart-invoice-mcp; the extension (with the toggle enabled) connects out to it and answers queries from its on-device order database.
Setup
-
Install the Walmart Invoice Exporter browser extension (required — nothing below works without it): github.harsh.al/Walmart-Invoice-Exporter.
-
In the extension — open the side panel → Settings → AI access (MCP) → enable the toggle. A pairing token is generated; hit Copy. Optionally also enable "Allow AI tools to collect data" if you want AI to be able to start collection and fetch invoices (off = read-only).
-
In your MCP client — add the server with that token.
Claude Code (
.mcp.jsonin your project, orclaude mcp add):{ "mcpServers": { "walmart-invoices": { "command": "npx", "args": ["-y", "walmart-invoice-mcp", "--token", "<paste token here>"] } } }Claude Desktop (
claude_desktop_config.json): same block undermcpServers. -
Start your MCP client. If tools report the extension isn't connected, open the extension side panel once — that wakes its background worker, which then connects within a few seconds.
Tools
All tools require the connected browser extension.
Read tools (available whenever the extension is connected):
| Tool | What it returns |
|---|---|
get_status |
Whether the (required) extension is connected + saved order/invoice counts per provider |
list_orders |
Compact order rows (number, date, title, total, item count), newest first; filter by date range, account, provider; paged |
get_order |
One order's full record, including the complete invoice when collected |
search_orders |
Free-text search across order numbers, titles, and item names, with matched items |
spending_summary |
Overall + per-month spending totals and order counts |
export_orders |
Full order records (summary + invoice) as JSON, paged |
list_accounts |
Walmart accounts with saved data (hashed keys only — never names/emails) |
get_collection_progress |
Live progress of an order-collection run |
get_invoice_job |
Live progress of a background invoice-fetch job |
Action tools (additionally require the extension's "Allow AI tools to collect data" toggle, off by default, and a browser signed in to walmart.com):
| Tool | What it does |
|---|---|
start_collection |
Starts collecting order history in a background browser tab (supports page limit, only-new-orders, order-type and date filters, fast mode) |
stop_collection |
Stops the running collection; already-saved orders are kept |
collect_invoices |
Fetches full invoices for saved orders (all missing, or a given list) in a background tab |
cancel_invoice_job |
Cancels the running invoice job after the in-flight order |
Options
| Flag | Env var | Default | |
|---|---|---|---|
--token |
WALMART_INVOICE_MCP_TOKEN |
— (required) | Pairing token from the extension's settings |
--port |
WALMART_INVOICE_MCP_PORT |
8924 |
Localhost port the extension connects to (must match the extension's setting) |
--timeout |
— | 15000 |
ms to wait for the extension to answer a call |
Security
- Localhost only — the relay binds
127.0.0.1; it is unreachable from the network. - Origin gate — page-initiated WebSockets always carry an
http(s)origin; those are rejected outright, so a malicious web page can't even attempt auth. Only browser-extension origins (or native processes) get as far as the token check. - Token auth — the first frame must carry the shared token generated in the extension; wrong token → disconnected. The token never appears in a URL.
- Read-only by default — out of the box the extension answers only read queries. Action tools (collection, invoice fetching) work only after the user enables the separate "Allow AI tools to collect data" toggle in the extension; nothing can ever delete saved data through MCP.
- Supply-chain cooldown — this repo installs dependencies with pnpm's
minimumReleaseAgeset to 14 days.
Development
pnpm install
pnpm test # spawns the real binary, fakes the extension, drives a real MCP client
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.