{"slug": "i-built-an-mcp-server-for-indmoney-ask-claude-about-your-portfolio-in-plain", "title": "I Built an MCP Server for INDmoney — Ask Claude About Your Portfolio in Plain English", "summary": "A developer built an MCP server for INDmoney that allows users to query their investment portfolio through Claude using natural language. The tool, rebuilt in Python with Playwright for persistent encrypted sessions, provides 14 read-only tools covering all INDmoney asset classes including stocks, mutual funds, gold, credit scores, and loans. The server maintains encrypted sessions with AES-256-GCM, eliminating the need for repeated OTP logins after the initial connection.", "body_md": "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.\n\nI also just started investing seriously. And staring at green/red numbers doesn't actually tell me if I'm doing things right.\n\nSo I built something that lets me check my portfolio by asking Claude — without ever opening the app.\n\n```\n\"How are my mutual funds performing?\"\n\"Am I over-indexed on mid-caps?\"\n\"What's dragging my Experian credit score down?\"\n```\n\nLive answers, from your actual INDmoney account, right inside Claude.\n\n**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.\n\nOnce 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.\n\nI 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.\n\nThe core problem: no persistent sessions. Every server restart meant a new OTP login.\n\nSo 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.\n\n** indmoney-mcp-python** — 14 tools covering every INDmoney asset class:\n\n| Tool | What it returns |\n|---|---|\n`get_holdings` |\nIndian stocks — symbol, qty, avg price, P&L |\n`get_mutual_funds` |\nMF holdings — invested, current value, XIRR |\n`get_us_stocks` |\nUS equities in INR |\n`get_gold` |\nDigital gold, SGBs, ETFs |\n`get_liquid` |\nBank balances, FDs, EPF |\n`get_credit_cards` |\nOutstanding balances, due dates |\n`get_loans` |\nLoan accounts, outstanding amounts |\n`get_debt` |\nBonds, NCDs, debt MFs |\n`get_credit_score` |\nExperian score + risk factors |\n`get_portfolio_summary` |\nFull aggregated P&L + asset allocation |\n\nPlus session management tools: `broker_connect`\n\n, `broker_status`\n\n, `broker_disconnect`\n\n, `discover_endpoints`\n\n.\n\n```\nClaude ──STDIO JSON-RPC──► MCP Server (Python)\n                                │\n                    ┌───────────┴───────────┐\n                    │                       │\n              Session Manager         INDmoney Scraper\n              (AES-256-GCM disk)      (Playwright)\n```\n\n**Login (once):**\n\n**Data fetching:**\n\n`fetch()`\n\ncalls from inside the browser context using the JWT — bypasses CORS completely**Two-level cache:**\n\n```\npip install indmoney-mcp\npython -m playwright install chromium\npython\npython3 -c \"import secrets; print(secrets.token_hex(32))\"\n```\n\nSave this. If you lose it, your session gets wiped and you'll need to log in again — no big deal, just slightly annoying.\n\n```\n{\n  \"mcpServers\": {\n    \"indmoney\": {\n      \"command\": \"indmoney-mcp\",\n      \"env\": {\n        \"SESSION_ENCRYPTION_KEY\": \"your-32-byte-hex-key-here\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop, then say: **\"Connect me to INDmoney\"**\n\nA browser window opens, you enter your OTP, done. From that point you're connected for 12 hours — even across server restarts.\n\n\"Which of my mutual funds is underperforming its benchmark?\"\n\n\"Give me a full portfolio breakdown — what percentage is in stocks vs MFs vs US?\"\n\n\"Do I have any credit card dues this week?\"\n\n\"My gold ETF — is it up or down from what I invested?\"\n\nAs 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.\n\nIt 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.\n\nYour data also never leaves your machine. No third-party servers, no cloud sync.\n\nIf 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.", "url": "https://wpnews.pro/news/i-built-an-mcp-server-for-indmoney-ask-claude-about-your-portfolio-in-plain", "canonical_source": "https://dev.to/vigneshwaran_m/i-built-an-mcp-server-for-indmoney-ask-claude-about-your-portfolio-in-plain-english-431i", "published_at": "2026-05-27 20:06:02+00:00", "updated_at": "2026-05-27 20:11:10.170889+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "artificial-intelligence", "large-language-models", "ai-agents"], "entities": ["INDmoney", "Claude", "Anthropic", "Playwright", "Experian"], "alternates": {"html": "https://wpnews.pro/news/i-built-an-mcp-server-for-indmoney-ask-claude-about-your-portfolio-in-plain", "markdown": "https://wpnews.pro/news/i-built-an-mcp-server-for-indmoney-ask-claude-about-your-portfolio-in-plain.md", "text": "https://wpnews.pro/news/i-built-an-mcp-server-for-indmoney-ask-claude-about-your-portfolio-in-plain.txt", "jsonld": "https://wpnews.pro/news/i-built-an-mcp-server-for-indmoney-ask-claude-about-your-portfolio-in-plain.jsonld"}}