npm package: @striderlabs/mcp-cvs
Description: MCP server connector for CVS Pharmacy — search products, manage prescriptions, cart, and checkout via browser automation
Author: Strider Labs
Latest version: 0.1.0

# @striderlabs/mcp-cvs

MCP server connector for CVS Pharmacy — search products, manage prescriptions, cart, and checkout via browser automation.

## Installation

```bash
npx @striderlabs/mcp-cvs
```

Or install globally:

```bash
npm install -g @striderlabs/mcp-cvs
```

## MCP Configuration

Add to your MCP client config (e.g. `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "cvs": {
      "command": "npx",
      "args": ["@striderlabs/mcp-cvs"]
    }
  }
}
```

## Tools

### `status`
Check CVS authentication status, session info, and preferred store.

**Parameters:** none

---

### `login`
Authenticate with CVS account using email and password via browser automation.

**Parameters:**
- `email` (string, required) — CVS account email
- `password` (string, required) — CVS account password
- `headless` (boolean, optional) — Run browser headless (default: `true`). Set `false` to see browser window (useful if CAPTCHA appears).

---

### `logout`
Clear CVS session and stored cookies.

**Parameters:** none

---

### `search`
Search CVS products and medications by query with optional filters.

**Parameters:**
- `query` (string, required) — Search term (e.g., `"ibuprofen"`, `"vitamin c"`)
- `category` (string, optional) — Category filter (e.g., `"vitamins"`, `"cold-flu"`, `"beauty"`)
- `min_price` (number, optional) — Minimum price filter
- `max_price` (number, optional) — Maximum price filter
- `limit` (number, optional) — Max results to return (default: 10, max: 24)

---

### `get_product`
Get detailed CVS product information by URL or product ID.

**Parameters:**
- `url` (string, optional) — Full CVS product URL
- `product_id` (string, optional) — CVS product ID (alternative to URL)

Returns: title, brand, price, product ID, rating, description, availability, images.

---

### `check_prescription_status`
Check the status of prescriptions in your CVS pharmacy account.

**Parameters:**
- `rx_number` (string, optional) — Prescription (Rx) number to check. Omit to list all prescriptions.

Returns: drug name, Rx number, status, refills remaining, days supply, last filled date.

---

### `refill_prescription`
Request a prescription refill at CVS pharmacy.

**Parameters:**
- `rx_number` (string, required) — Prescription (Rx) number to refill

---

### `add_to_cart`
Add a CVS product to the cart.

**Parameters:**
- `url` (string, optional) — CVS product URL
- `product_id` (string, optional) — CVS product ID (alternative to URL)
- `quantity` (number, optional) — Quantity to add (default: 1)

---

### `view_cart`
View current CVS cart contents and totals.

**Parameters:** none

Returns: list of items with name, price, quantity, subtotal, tax, and total.

---

### `remove_from_cart`
Remove a specific item from the CVS cart.

**Parameters:**
- `item_index` (number, optional) — 1-based index from `view_cart` results
- `product_name` (string, optional) — Partial product name to match (alternative to index)

---

### `set_store`
Set preferred CVS store location by ZIP code or store ID.

**Parameters:**
- `zip_code` (string, optional) — ZIP code to find nearby CVS stores
- `store_id` (string, optional) — Specific CVS store ID (alternative to ZIP)

Persists the store selection across sessions.

---

### `check_store_availability`
Check if a product is available at a CVS store location.

**Parameters:**
- `url` (string, optional) — CVS product URL
- `product_id` (string, optional) — CVS product ID (alternative to URL)
- `zip_code` (string, optional) — ZIP code to check. Uses preferred store if not provided.

Returns: in-store pickup availability, online shipping availability, store name.

---

### `checkout`
Proceed to checkout and return full order summary.

**Parameters:** none

> **Note:** This tool returns a checkout summary only — it does **not** auto-confirm or place the order. You must complete the purchase manually at the provided URL.

---

## Session Storage

Credentials are **never** stored. Only session cookies and metadata are persisted:

- `~/.striderlabs/cvs/cookies.json` — Playwright session cookies
- `~/.striderlabs/cvs/auth.json` — Account email, name, login timestamp
- `~/.striderlabs/cvs/store.json` — Preferred store info

## Technical Details

- **Browser automation:** Playwright (Chromium)
- **Bot detection evasion:** Custom stealth patches (removes `navigator.webdriver`, spoofs plugins/languages)
- **Session persistence:** Cookies saved after each tool call, restored on next use
- **Transport:** stdio (MCP standard)

## Security Notes

- Passwords are never written to disk
- If CAPTCHA appears during login, set `headless: false` to complete it manually
- The `checkout` tool never auto-places orders — it's read-only for safety

## License

MIT — [Strider Labs](https://striderlabs.ai)