Skip to main content
Glama
Swipe Smart MCP

Swipe Smart MCP

by afzalmukhtar
README.md
![Swipe Smart MCP - AI-powered credit card rewards optimizer with futuristic digital interface showing multiple credit cards and reward tracking visualization](./Swipe-Smart-MCP.png)

<p align="center">
  <em>Banner image generated using Gemini Nano Banana Pro</em>
</p>

# Swipe Smart MCP šŸ’³

An AI-powered MCP server that helps you **always swipe the right card** for maximum rewards.

## What It Does

Swipe Smart tracks your credit cards, their reward structures, and spending caps — then tells you which card to use for any purchase to maximize your points or cashback.

### Key Features

- **Smart Card Recommendations** — Ask "Which card for ₹5000 on Amazon?" and get the optimal choice
- **Reward Tracking** — Automatically calculates points earned on every transaction
- **Cap Awareness** — Knows when you've hit monthly reward caps and suggests alternatives
- **Multi-Card Wallet** — Manage unlimited cards with complex reward structures
- **Category Intelligence** — Understands 22+ spending categories with proper MCC mapping
- **Web Search** — Searches for card reward details when adding new cards

## Quick Start

### Prerequisites

- Python 3.12+
- [uv](https://docs.astral.sh/uv/) package manager

### Installation

```bash
# Clone the repository
git clone https://github.com/afzalmukhtar/swipe-smart-mcp.git
cd swipe-smart-mcp

# Install dependencies
uv sync

# Initialize the database
uv run python scripts/init_db.py

# (Optional) Seed with sample data
uv run python scripts/seed.py
```

### Running the Server

```bash
# Direct run
uv run server.py

# Or use the script
./run_mcp.sh
```

### Connecting to Claude Desktop

Add to your Claude Desktop config (`~/.config/claude/claude_desktop_config.json`):

**Method 1: Using the shell script**
```json
{
  "mcpServers": {
    "swipe-smart": {
      "command": "/path/to/swipe-smart-mcp/run_mcp.sh"
    }
  }
}
```

**Method 2: Using uv directly with bash**
```json
{
  "mcpServers": {
    "swipe-smart": {
      "command": "bash",
      "args": ["-c", "cd /path/to/swipe-smart-mcp && uv run server.py"]
    }
  }
}
```

## Usage Examples

### Ask for Card Recommendations
> "Which card should I use for a ₹3000 Swiggy order?"

### Log Transactions
> "I spent ₹1500 at Amazon using my HDFC Regalia"

### Check Rewards
> "How many points do I have on my Infinia card?"

### Add a New Card
> "Add my new SBI Cashback card"

### Analyze Spending
> "Show me my spending breakdown for this month"

## Available Tools

| Tool | Description |
|------|-------------|
| `get_best_card_for_purchase` | Recommends optimal card for a purchase |
| `add_transaction` | Logs an expense and calculates rewards |
| `get_my_cards` | Lists all cards in your wallet |
| `get_card_rules` | Shows reward rules for a card |
| `get_reward_balance` | Checks points balance |
| `analyze_expenses` | Spending analysis and insights |
| `search_card_info` | Web search for card reward details |
| `add_credit_card` | Adds a new card to wallet |

## Project Structure

```
swipe-smart-mcp/
ā”œā”€ā”€ server.py           # MCP server with all tools
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ models.py       # Database models (Card, Expense, Rules)
│   ā”œā”€ā”€ db.py           # Database connection
│   └── logic/
│       ā”œā”€ā”€ rewards.py      # Reward calculation engine
│       └── recommender.py  # Card recommendation logic
ā”œā”€ā”€ data/
│   ā”œā”€ā”€ categories.json     # Expense categories & MCC codes
│   └── bank_domains.json   # Bank website mappings
└── scripts/
    ā”œā”€ā”€ init_db.py      # Database initialization
    └── seed.py         # Sample data seeder
```

## Supported Categories

Dining, Groceries, Fuel, Travel (Flights, Hotels, Rail), Shopping, Entertainment, Utilities, Telecom, Healthcare, Education, and more.

## Contributing

Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting a pull request.

**Note:** By contributing, you agree to assign copyright to the project owner (see CLA in CONTRIBUTING.md).

## āš–ļø License & Commercial Use

This project is licensed under the **[PolyForm Noncommercial License 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0/)**.

### āœ… Permitted Uses (Free)

- **Personal Use:** Use this for your own hobbies, private study, or personal credit card optimization
- **Education:** Universities and schools can use this for teaching and research
- **Noncommercial Organizations:** Charities, educational institutions, and government organizations

### āŒ Commercial Use is Prohibited

You may **NOT** use this software for any business purpose, including but not limited to:
- Internal business tools or employee use
- Hosting it as a service (SaaS) for customers
- Bundling it in a commercial product
- Any activity that provides commercial advantage or monetary compensation

### šŸ’¼ Need a Commercial License?

If you are a company and want to use Swipe Smart MCP for your business, please contact me:

* šŸ“§ **Email:** [serac.amber4242@eagereverest.com](mailto:serac.amber4242@eagereverest.com)
  *(Note: This is a masked email for privacy, but it forwards directly to my main inbox.)*

* šŸ‘” **LinkedIn:** [Afzal Mukhtar](https://www.linkedin.com/in/afzalmukhtar)
  *(Feel free to verify my profile or DM me if you prefer.)*

> šŸ’” **Important:** Please mention **"Swipe Smart MCP Commercial License"** as the subject of your email. If you don't receive a reply within 24 hours, please reach out via LinkedIn DM.

**Full License:** See [LICENSE](LICENSE) file for complete terms.

TDQS

A3.6/5.0

Scored across 20 tools

Disambiguation4/5

Most tools have clearly distinct purposes, especially around transaction logging, card additions, rewards, and analytics. A few overlaps exist between read tools like get_my_cards, get_card_rules, and get_card_description, and between search_card_info and custom_web_search, but descriptions generally clarify the boundaries.

Naming Consistency4/5

The tool set is overwhelmingly consistent snake_case with verb_noun patterns such as get_my_cards, add_transaction, and delete_credit_card. The main deviation is custom_web_search, which is adjective_noun rather than verb-first, but the overall convention remains predictable.

Tool Count3/5

Twenty tools is on the heavy side for a single MCP server, crossing into the 16–25 borderline range. The domain is complex enough to justify many operations, but some guidance and search tools could potentially be consolidated.

Completeness3/5

The server covers card creation, transaction logging, reward rules, caps, redemption partners, analytics, and points history. However, there is no update path for credit cards or transactions, and reward rules, cap buckets, and redemption partners can only be added, not read individually, updated, or deleted, creating notable lifecycle gaps.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues