capitalone-shopping-mcp
README.md
# @sohampatwardhan/capitalone-shopping-mcp
[](https://www.npmjs.com/package/@sohampatwardhan/capitalone-shopping-mcp)
Unofficial MCP server for the public [Capital One Shopping](https://capitaloneshopping.com) catalog. It lets an agent look up store rewards and coupons from the signed-out site, so it can help compare offers.
This project is not affiliated with, endorsed by, or maintained by Capital One. Rates and coupons belong to their publishers and can change at any time.
The server is read-only. It does not sign in, does not activate cash back, and does not call account endpoints.
## Tools
| Tool | What you get |
| --- | --- |
| `search_stores` | Stores whose name or domain matches `query`. Each hit has a name, domain, public coupon-page URL, and logo URL. A featured store also includes the rewards-engine rate. Other stores have no rate until you open them. |
| `get_store_offers` | One store (`store` is a domain, a name, or a coupon-page URL). Returns the rewards-engine rate, exclusions, categories, current coupons and deals, and expired coupons. |
| `list_featured` | The featured set from the directory, with the rewards-engine rate when that domain is published there. Optional `query` and `limit`. |
`search_stores` takes `query`, optional `limit` (default 10, max 25), and optional `letter` (`a`–`z` or `0-9`) to scan one directory page instead of all of them.
Percentage amounts are basis points: `750` is `7.5%`. Fixed amounts are US cents: `5000` is `$50.00`. Tiered offers include a `categories` list in those same units. The directory card's `cashbackReward` string can lag the engine. When `cardRewardDiffers` is true, use `reward.display`.
### Examples
Search by name:
```json
{
"name": "search_stores",
"arguments": { "query": "ancestry", "limit": 5 }
}
```
Open one store:
```json
{
"name": "get_store_offers",
"arguments": { "store": "ancestry.com" }
}
```
Featured rates, filtered:
```json
{
"name": "list_featured",
"arguments": { "query": "best buy" }
}
```
Prompts that work once the server is connected:
- "What cash back does Capital One Shopping show for Ancestry, and which number should I trust?"
- "Search the directory for outdoor stores and list any featured rates."
- "Get the current coupons for autozone.com. Do not activate anything."
## Setup
Requires Node.js 20 or newer.
```bash
npx -y @sohampatwardhan/capitalone-shopping-mcp@latest
```
The published bin is `capitalone-shopping-mcp`. Stdio is the default. Logs go to stderr so they stay off the JSON-RPC stream. The MCP server name is `capitalone-shopping-mcp`.
### Cursor
Add this to `~/.cursor/mcp.json` or the project's `.cursor/mcp.json`:
```json
{
"mcpServers": {
"capitalone-shopping": {
"command": "npx",
"args": ["-y", "@sohampatwardhan/capitalone-shopping-mcp@latest"]
}
}
}
```
### Claude Desktop
The same `mcpServers` block goes in the desktop config:
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
- Linux: `~/.config/Claude/claude_desktop_config.json`
Restart Claude Desktop after saving.
### Claude Code
```bash
claude mcp add capitalone-shopping -- npx -y @sohampatwardhan/capitalone-shopping-mcp@latest
```
### VS Code
Create `.vscode/mcp.json`:
```json
{
"servers": {
"capitalone-shopping": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@sohampatwardhan/capitalone-shopping-mcp@latest"]
}
}
}
```
Other MCP clients use the same stdio command. Windsurf, Zed, and Continue take a command plus args of `npx` and `-y @sohampatwardhan/capitalone-shopping-mcp@latest`.
### Streamable HTTP
HTTP mode is stateless and has no authentication. Bind it to localhost.
```bash
npx -y @sohampatwardhan/capitalone-shopping-mcp@latest --http --port 3333
```
The MCP endpoint is `http://127.0.0.1:3333/mcp`. A client config looks like:
```json
{
"mcpServers": {
"capitalone-shopping": {
"url": "http://127.0.0.1:3333/mcp"
}
}
}
```
`GET /health` returns `ok`.
### MCP Inspector
```bash
npm install
npm run build
npx @modelcontextprotocol/inspector node dist/cli.js
```
A non-interactive check of the stdio server:
```bash
npx @modelcontextprotocol/inspector --cli --method tools/list node dist/cli.js
```
## Polite use
The public pages sit behind Cloudflare and are a shared site. This client:
- Sends one catalog request at a time.
- Waits at least one second between requests (`COS_MIN_INTERVAL_MS`, default `1000`).
- Caches directory pages for one hour and store pages for 15 minutes.
- Sends a User-Agent that names this package and says the access is read-only.
- Does not send cookies.
A cold `search_stores` without `letter` reads 27 directory pages, so the first search takes about half a minute. Later searches in the same process reuse the cache. `list_featured` reads only the `a` page, because the featured set is repeated on every letter. Passing a domain to `search_stores` or `get_store_offers` avoids the full walk.
Some networks receive HTTP 403 before the public page is returned. The tool reports that refusal and does not keep retrying it.
## Privacy
Reward payloads include a JWT and a user id even for a signed-out fetch. This server drops those fields, commissioning blobs, and activation URLs (`/api/v3/r`) before a tool result is built. A result that still contains either marker is refused. Do not paste raw `.data` files into a chat. The fixtures in this repository are trimmed copies with those fields removed.
## Caveats
- Directory rows are a name and a domain. They do not include a rate. Rates for featured stores come from `rewardsEngineData`. Every other store needs `get_store_offers`.
- The card string (`cashbackReward`) is not the live rate when it disagrees with the engine amount.
- Coupon codes are included only when the public page publishes a code. Some stores publish deal titles without a code.
- Nothing here activates an offer, holds a rate, or checks out. Open the public coupon page and follow Capital One Shopping's own flow for that.
- Offer text and rates are Capital One Shopping's. This server does not grant a license to that content beyond what the public pages already show.
## Data source
| Document | URL |
| --- | --- |
| Directory | `GET https://capitaloneshopping.com/s/all/{a-z\|0-9}.data` |
| Store | `GET https://capitaloneshopping.com/s/{domain}/coupon.data` |
Both are React Router single-fetch bodies (turbo-stream). No `Authorization` header and no cookie is sent. Logo URLs point at `images.capitaloneshopping.com`.
| Variable | Default | Purpose |
| --- | --- | --- |
| `COS_BASE_URL` | `https://capitaloneshopping.com` | Catalog origin |
| `COS_MIN_INTERVAL_MS` | `1000` | Minimum gap between catalog requests |
| `COS_DIRECTORY_TTL_MS` | `3600000` | Directory cache lifetime |
| `COS_STORE_TTL_MS` | `900000` | Store page cache lifetime |
| `COS_CACHE` | enabled | Set to `0` to disable the memory cache |
| `COS_LIVE` | unset | Set to `1` to run the opt-in live test |
## Development
```bash
npm install
npm run lint
npm test
npm run typecheck
npm run build
node dist/cli.js --help
npm run smoke
```
`npm test` uses fixtures and does not call Capital One Shopping. `COS_LIVE=1 npm test` also fetches letter `x` and the Ancestry store page, one request per second. `npm run smoke` starts the built stdio server and checks the tool list. It does not fetch the catalog.
CI runs `npm ci`, lint, typecheck, test, build, and smoke on Node 22.
`prepublishOnly` compiles TypeScript into `dist/` before the package is packed.
## License
MIT. See [LICENSE](LICENSE).
Store names, rates, coupon text, and logos are not relicensed by this MIT grant. They remain the property of their owners.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues