walmart-invoice-mcp

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.

Category
访问服务器

README

walmart-invoice-mcp

npm

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

  1. Install the Walmart Invoice Exporter browser extension (required — nothing below works without it): github.harsh.al/Walmart-Invoice-Exporter.

  2. 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).

  3. In your MCP client — add the server with that token.

    Claude Code (.mcp.json in your project, or claude mcp add):

    {
      "mcpServers": {
        "walmart-invoices": {
          "command": "npx",
          "args": ["-y", "walmart-invoice-mcp", "--token", "<paste token here>"]
        }
      }
    }
    

    Claude Desktop (claude_desktop_config.json): same block under mcpServers.

  4. 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 minimumReleaseAge set to 14 days.

Development

pnpm install
pnpm test        # spawns the real binary, fakes the extension, drives a real MCP client

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选