cd /news/ai-tools/i-built-an-mcp-server-for-indmoney-a… · home topics ai-tools article
[ARTICLE · art-15702] src=dev.to pub= topic=ai-tools verified=true sentiment=↑ positive

I Built an MCP Server for INDmoney — Ask Claude About Your Portfolio in Plain English

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.

read3 min publishedMay 27, 2026

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.

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.

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.

** 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

.

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

Login (once):

Data fetching:

fetch()

calls from inside the browser context using the JWT — bypasses CORS completelyTwo-level cache:

pip install indmoney-mcp
python -m playwright install chromium
python
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.

{
  "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.

"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.

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.

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.

── more in #ai-tools 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-an-mcp-serve…] indexed:0 read:3min 2026-05-27 ·