costco — Claude Code MCP server: what it does, how to install
Connects your Costco warehouse receipts and online order history to Claude Code. Useful for analyzing grocery spending and tracking shipments without manual exports.
claude mcp add costco -- uvx costco-mcp-serverWhat costco 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.
What it helps with
- 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 for the agent
- 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.
How to install costco
Platform CLI
claude mcp add costco -- uvx costco-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>
Platform CLI
codex mcp add costco -- uvx costco-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>
Config file
{
"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>
Config file
{
"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>
Platform CLI
gemini mcp add costco uvx costco-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from costco-mcp-server <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about costco
How to install costco in Claude Code?
Run claude mcp add costco -- uvx costco-mcp-server in your terminal. This requires uvx and Python installed on your path.
Does this tool handle my account credentials?
No. The server never reads your username or password. It only uses an extracted OAuth2 refresh token from a browser session.
What happens if Costco changes its backend?
The server relies on internal, undocumented APIs. If Costco updates those endpoints or alters token policies, queries will fail until the server logic is updated.