惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园_首页
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
美团技术团队
IT之家
IT之家
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
博客园 - 叶小钗
M
MIT News - Artificial intelligence
B
Blog RSS Feed
有赞技术团队
有赞技术团队
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Built an MCP Server for INDmoney — Ask Claude About You...
Vigneshwaran M · 2026-05-28 · via DEV Community

Vigneshwaran M

INDmoney is great. The problem is I can't open it "just to check something." Every time I do, I'm there for two hours — tapping through charts, reading stock articles, checking what changed since yesterday.

I also just started investing seriously. And staring at green/red numbers doesn't actually tell me if I'm doing things right.

So I built something that lets me check my portfolio by asking Claude — without ever opening the app.

"How are my mutual funds performing?"
"Am I over-indexed on mid-caps?"
"What's dragging my Experian credit score down?"

Live answers, from your actual INDmoney account, right inside Claude.


What is MCP?

Model Context Protocol (MCP) is an open standard from Anthropic that lets Claude connect to external tools and data sources. Think of it like USB-C for AI — a standard port that any app can plug into.

Once an MCP server is running locally, Claude can call its tools the same way it uses any built-in capability. No copy-pasting, no screenshots, no switching apps.


Why I Rebuilt It (The TypeScript Version Broke Constantly)

I had a first version in TypeScript. It kept breaking mid-request — INDmoney's session would expire while fetching data, US stocks would time out, and half the time I'd get an error, close the laptop, and just open the app anyway. Which is exactly what I was trying to avoid.

The core problem: no persistent sessions. Every server restart meant a new OTP login.

So I rebuilt it in Python with Playwright. Now sessions are encrypted with AES-256-GCM and saved to disk. Even after a server restart, you're still connected — no re-login, no OTP every time.


What It Does

indmoney-mcp-python — 14 tools covering every INDmoney asset class:

Tool What it returns
get_holdings Indian stocks — symbol, qty, avg price, P&L
get_mutual_funds MF holdings — invested, current value, XIRR
get_us_stocks US equities in INR
get_gold Digital gold, SGBs, ETFs
get_liquid Bank balances, FDs, EPF
get_credit_cards Outstanding balances, due dates
get_loans Loan accounts, outstanding amounts
get_debt Bonds, NCDs, debt MFs
get_credit_score Experian score + risk factors
get_portfolio_summary Full aggregated P&L + asset allocation

Plus session management tools: broker_connect, broker_status, broker_disconnect, discover_endpoints.


How It Works Under the Hood

Claude ──STDIO JSON-RPC──► MCP Server (Python)
                                │
                    ┌───────────┴───────────┐
                    │                       │
              Session Manager         INDmoney Scraper
              (AES-256-GCM disk)      (Playwright)

Login (once):

  1. Playwright opens a Chromium window
  2. You enter your phone number + OTP directly in the browser — the server never sees it
  3. The server grabs the JWT from the browser's cookie store
  4. Encrypts it and saves to disk

Data fetching:

  • Most endpoints: direct fetch() calls from inside the browser context using the JWT — bypasses CORS completely
  • Some endpoints (gold, fallbacks): captures the network response while navigating to the relevant page

Two-level cache:

  • In-memory (5 min) — instant for repeated queries in the same session
  • Disk (60 min) — survives restarts, used as fallback if the API is slow

Setup (3 Steps)

1. Install

pip install indmoney-mcp
python -m playwright install chromium

2. Generate an encryption key

python3 -c "import secrets; print(secrets.token_hex(32))"

Save this. If you lose it, your session gets wiped and you'll need to log in again — no big deal, just slightly annoying.

3. Add to Claude Desktop config

{
  "mcpServers": {
    "indmoney": {
      "command": "indmoney-mcp",
      "env": {
        "SESSION_ENCRYPTION_KEY": "your-32-byte-hex-key-here"
      }
    }
  }
}

Restart Claude Desktop, then say: "Connect me to INDmoney"

A browser window opens, you enter your OTP, done. From that point you're connected for 12 hours — even across server restarts.


Things I Actually Ask It

"Which of my mutual funds is underperforming its benchmark?"

"Give me a full portfolio breakdown — what percentage is in stocks vs MFs vs US?"

"Do I have any credit card dues this week?"

"My gold ETF — is it up or down from what I invested?"

As someone still learning, being able to ask "am I going in the right direction?" and get a structured answer from my actual numbers is genuinely useful. Claude can reason over the data, not just display it.


What It Won't Do

It won't place orders or move money. Read-only, always. Honestly that's intentional — I don't trust myself with one-click investing while chatting with an AI at midnight.

Your data also never leaves your machine. No third-party servers, no cloud sync.


Links

If you're an INDmoney user — especially if you're also figuring out investing as you go — give it a try. If something breaks, open an issue. I'm using it myself so I'll see it.