# costco

Connects your Costco warehouse receipts and online order history to Claude Code. Useful for analyzing grocery spending and tracking shipments without manual exports.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: thehesiod
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thehesiod/costco-mcp
- Updated: 2026-09-25
- HTML: https://affpapa.org/en/nevibecode/mcp/costco

## What it does

The server connects directly to Costco's internal GraphQL endpoints over HTTP/2. It does not use browser automation at runtime. Available tools return receipt items, coupons, and order statuses. Looked-up products are cached in a local SQLite file at `~/.costco-mcp/products.db`.

Authentication relies on Azure AD B2C refresh tokens extracted from an active session. They remain valid for roughly 90 days. You can extract tokens with `costco-auth-browser` or copy them manually from browser storage. Multi-account setups are supported.

The tool targets unpublished internal endpoints. A backend change on Costco's side can break queries immediately. Tokens are saved in plain text under `~/.costco-mcp/`, so safety depends entirely on your local file permissions.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add costco -- uvx costco-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>

### Codex

**Platform CLI**
```bash
codex mcp add costco -- uvx costco-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "costco": {
            "command": "uvx",
            "args": [
                "costco-mcp-server"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "costco": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "costco-mcp-server"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add costco uvx costco-mcp-server
```
uvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>

## When to use it
- fetch itemized warehouse receipts by barcode with prices and applied coupons
- list online orders across specific date ranges
- resolve product item numbers to full descriptions via cached lookups
- manage expense tracking across multiple membership profiles

## Example prompts
- Fetch all warehouse receipts from Costco for the last 30 days under the personal account.
- Look up receipt details for barcode 987654321 and list all purchased groceries.
- Check my recent online orders on Costco and show their current shipment status.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44591
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5469
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2817
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2197
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
