paytm-local-mcp-server

farhanrhine/paytm-local-mcp-server

3.2

If you are the rightful owner of paytm-local-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Paytm UPI Statement Analyzer is a local MCP server that allows users to analyze their Paytm UPI transaction history using natural language queries with Claude AI, ensuring privacy by keeping all data on the user's machine.

Tools
6
Resources
0
Prompts
0

💳 Paytm UPI Statement Analyzer

Query your Paytm UPI transactions using natural language with Claude AI - 100% local, privacy-first.

Python 3.11+ MCP License: MIT

🎯 What is this?

A simple MCP (Model Context Protocol) server that lets you analyze your Paytm UPI transaction history by asking Claude questions in plain English. All your financial data stays on your machine - no cloud uploads!

Ask questions like:

  • "How much did I spend this month?"
  • "Show my top 10 merchants"
  • "Search for Swiggy transactions"
  • "What's my monthly spending breakdown?"

🔄 How It Works

┌─────────────────────────────────────────────────────────────────────────────┐
│                              WORKFLOW                                        │
└─────────────────────────────────────────────────────────────────────────────┘

  ┌──────────────┐      ┌──────────────┐      ┌──────────────┐
  │   PAYTM APP  │      │    EXCEL     │      │     JSON     │
  │              │ ───► │   Statement  │ ───► │    File      │
  │  📱 Export   │      │   📊 .xlsx   │      │   📄 .json   │
  └──────────────┘      └──────────────┘      └──────────────┘
                                                     │
                        ┌────────────────────────────┘
                        ▼
  ┌──────────────────────────────────────────────────────────────────────────┐
  │                         MCP SERVER (paytm.py)                             │
  │  ┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐       │
  │  │  📥 Import Tool │    │  🔍 Query Tools │    │  📊 SQLite DB   │       │
  │  │                 │───►│                 │◄──►│                 │       │
  │  │ JSON → Database │    │ Search, Summary │    │ paytm.db        │       │
  │  └─────────────────┘    │ Top Merchants   │    └─────────────────┘       │
  │                         │ Monthly View    │                               │
  │                         └─────────────────┘                               │
  └──────────────────────────────────────────────────────────────────────────┘
                        │
                        ▼
  ┌──────────────────────────────────────────────────────────────────────────┐
  │                         CLAUDE DESKTOP                                    │
  │                                                                           │
  │   You: "How much did I spend on Swiggy?"                                 │
  │                                                                           │
  │   Claude: "You spent ₹8,500 on Swiggy across 42 transactions.            │
  │            Your average order was ₹202."                                 │
  │                                                                           │
  └──────────────────────────────────────────────────────────────────────────┘

📁 Project Structure

fastmcp_expence_tracker/
├── paytm.py              # 🔧 MCP Server - main file
├── convert_to_json.py    # 🔄 Excel to JSON converter
├── paytm_data.json       # 📄 Your transaction data (generated)
├── paytm.db              # 🗄️ SQLite database (generated)
└── README.md             # 📖 This file

🚀 Quick Start

Prerequisites


Step 0: Install UV & FastMCP

# Install UV (Python package manager)
pip install uv

# Initialize project (if starting fresh)
uv init .

# Add FastMCP dependency
uv add fastmcp

# Verify installation
uv run fastmcp version or fastmcp version

Step 1: Export Your Paytm Statement

  1. Open Paytm App
  2. Go to Balance & HistoryClick three dots (⋮) in top right
  3. Tap Download UPI Statement
  4. Select date range (last 6 months recommended)
  5. Download as Excel (.xlsx)
  6. Save to this folder

Step 2: Convert Excel to JSON

# Install the openpyxl library which is required to read Excel files.
pip install openpyxl
# Edit convert_to_json.py with your file name
python convert_to_json.py

Output: paytm.json with all your transactions

Step 3: Run & Install MCP Server

# Test the server locally (optional)
uv run fastmcp run paytm.py

# Install in Claude Desktop
uv run fastmcp install claude-desktop paytm.py

This adds the server to Claude Desktop's config file automatically.

Step 4: Restart Claude Desktop

Close and reopen Claude Desktop completely.

Step 5: Start Querying!

In Claude Desktop, type:

Import my Paytm data or add as resource from claude desktop + button something name appears like add from PaytmTracker

Then ask anything:

Show my spending summary
Who are my top 5 merchants?
Search for Amazon
Show November spending

🛠️ Available Tools

ToolDescriptionExample Query
import_paytm_dataLoad JSON into database"Import my Paytm data"
get_paytm_summaryTotal spent/received/net"Show my summary"
search_paytmSearch by keyword"Search for Swiggy"
get_paytm_by_dateTransactions for a date"What did I spend on 2025-11-15?"
get_top_merchantsTop spenders by amount"Top 10 merchants"
get_monthly_summaryMonth-wise breakdown"Monthly spending"

📊 Data Format

Your Paytm Excel has these columns:

ColumnExampleIn Database
Date28/11/20252025-11-28
Time18:34:4618:34:46
Transaction DetailsPaid to Swiggytransaction_details
Amount-245.00-245.0 (float)
UPI Ref No.53xxxxxxxxxupi_ref_no
Tags#🛒 Groceriestags

🔒 Privacy

100% Local - All data stays on your computer
No Cloud - Nothing uploaded anywhere
No API Keys - Uses free Claude Desktop
You Control - Delete anytime


🗺️ Roadmap

v1.0 (Current) - Version

  • Import Paytm Excel statements
  • Search transactions
  • Summary statistics
  • Top merchants
  • Monthly breakdown

🔧 Troubleshooting

"MCP server not showing in Claude"

# Fully close Claude Desktop
taskkill /IM "Claude.exe" /F

# Reinstall
fastmcp install claude-desktop paytm.py

# Reopen Claude

"Import failed"

  • Check paytm.json exists
  • Verify JSON format is correct
  • Check column names match

"No transactions found"

  • Run "Import my Paytm data" first
  • Check paytm.db was created

📄 License

MIT License - Use freely!


🙏 Acknowledgments


Made with Farhan