Skip to main content

Command Palette

Search for a command to run...

I Connected My Zerodha Account to Claude AI Using Kite MCP — Here's the Full Setup

Published
I Connected My Zerodha Account to Claude AI Using Kite MCP — Here's the Full Setup
N

I am Nataraj Malavade, a rule-based intraday and swing trader and a passionate trainer trying to help budding traders to find their trading edge. Trained over 500+ traders in online and classroom programs. I believe a disciplined mindset and impeccable execution are the holy grail of trading.

​I have been actively investing and trading in Indian markets since 2013. I use price action, market profile and options delta neutral concepts to analyze and opt for my intraday and swing trades.​I have published my book MASTERMIND OF DAY TRADING , which talks about how to succeed in day trading by adopting rule-based techniques of market profile, price action and money management.​Apart from trading and training,

Most people use AI for generic financial advice.

I connected it directly to my Zerodha account — and it now reads my actual holdings, P&L, mutual funds, ETFs, and F&O positions in real time.

No API keys. No Python scripts. No data exports.

Just a live AI analyst that knows exactly what's in my portfolio.

Here's how I did it, and how you can too.

I also walked through the full setup live on YouTube — watch it here before reading further:

https://youtu.be/r6H4x5QvfLI


What Is MCP (Model Context Protocol)?

MCP is an open protocol that allows AI assistants to connect directly to real-world apps and services — instead of working from static, outdated data.

Think of it this way:

  • Without MCP → AI is working from memory. You paste data, it replies.

  • With MCP → AI connects live to the source. You ask, it fetches and responds.

Zerodha recently launched Kite MCP, which exposes your portfolio data through this protocol. That means Claude (and other AI tools like Cursor or Windsurf) can now directly query your:

  • Stock holdings and quantities

  • Mutual fund investments and NAV-based returns

  • ETF positions

  • F&O positions, margin, and exposure

  • Day P&L and overall P&L

  • Sector allocation

  • Dividend history and tax-relevant data


What You Need

A note on Claude plans before you start:

The MCP setup via JSON config works on the free plan — no payment needed to get connected.

However, for effective ongoing portfolio analysis, the free plan's daily message limit (roughly 30–100 messages depending on conversation length) will restrict you quickly. A single detailed portfolio analysis with a few follow-up questions can consume a large chunk of that allowance.

Usage Recommended Plan
Just testing it once Free plan is fine
Regular portfolio analysis Claude Pro ($20/month)

Claude Pro gives you 5x the usage, priority access during peak hours, and a much smoother experience for this kind of workflow. The MCP connection itself costs nothing — the Claude subscription is what determines how much you can do with it.


Step 1 — Install Node.js

Download and install Node.js from nodejs.org.

After installation, verify it's working:

node --version

You should see something like v20.x.x. If you do, you're good to proceed.


Step 2 — Configure Claude Desktop for Kite MCP

Open Claude Desktop.

Go to Settings → Developer → Edit Config

This opens a JSON configuration file. Paste the following:

{
  "mcpServers": {
    "kite": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.kite.trade/sse"]
    }
  }
}

Save the file and restart Claude Desktop.

When Claude reopens, it will now have access to your Kite account through the MCP connection. You'll be prompted to authenticate with Zerodha on first use.


Step 3 — Verify the Connection

Once Claude restarts, look for the MCP tools indicator in the chat interface (usually a small tools icon or confirmation in the sidebar).

You can test it with a simple prompt:

What is the current value of my portfolio?

If Kite MCP is connected correctly, Claude will pull live data from your account and respond with actual numbers — not estimates.


Step 4 — Run a Full Portfolio Analysis

Here's a production-grade prompt you can use directly. It asks Claude to generate a comprehensive analysis with real data from your account:

Please analyze my complete portfolio including all positions in my Zerodha 
account (stocks, ETFs, mutual funds, F&O positions, and holdings).

PORTFOLIO ANALYSIS:
- Complete portfolio value in rupees
- Investment amounts vs current values
- Absolute P&L numbers and percentages
- Holdings with full names, quantities, and lot sizes
- Mutual fund NAV-based performance
- F&O positions with margin and net exposure

ALLOCATION BREAKDOWN:
- Asset class split (equity, debt, gold, cash)
- Sector-wise allocation in rupee terms
- Individual position sizes as % of total portfolio

PERFORMANCE METRICS:
- Day P&L and overall P&L
- XIRR where applicable
- Best and worst performing positions
- Unrealized vs realized gains

RISK ANALYSIS:
- Concentration risk by stock/fund/sector
- F&O exposure relative to portfolio size
- Drawdown from peak value if calculable

TAX SUMMARY:
- Short-term vs long-term capital gains (realized)
- Dividend income received

Format the output as a structured financial report. 
Use clean section headers. Show all values in INR.

What This Looks Like in Practice

Once the connection is live, you can ask Claude things like:

Which sector has the highest allocation in my portfolio right now?
Compare my mutual fund XIRR vs Nifty 50 returns over the same period.
What is my total F&O exposure as a percentage of my equity holdings?
Show me all positions where I'm currently in a loss. Sort by absolute loss value.
What are my realized capital gains this financial year? 
Break it into STCG and LTCG.

Claude processes your live data and responds with structured, specific answers — not generic explanations.


Why This Matters for Retail Investors

Most portfolio analysis tools give you a dashboard. That's a fixed view — you interpret it yourself.

With an AI connected to your live data, you're having a conversation with your portfolio.

  • You can ask follow-up questions

  • You can stress test it ("what if Nifty falls 20%?")

  • You can ask for rebalancing suggestions based on your actual allocation

  • You can compare your current allocation to your target allocation

  • You can generate WhatsApp or email-ready summaries of your portfolio for your family

It's not about replacing thinking. It's about eliminating the time spent fetching, formatting, and interpreting raw data — so you can spend more time on decisions.


Security Note

Kite MCP uses Zerodha's official OAuth authentication. Your credentials are never passed to Claude directly. The connection goes through Zerodha's own secure endpoint (mcp.kite.trade).

Standard precautions still apply:

  • Use Claude Desktop on a personal, secured device

  • Don't share your Claude chat logs publicly if they contain portfolio data

  • Log out of the MCP connection when not in use on a shared machine


Quick Recap

Step Action
1 Install Node.js from nodejs.org
2 Open Claude Desktop → Settings → Developer → Edit Config
3 Paste the Kite MCP JSON config
4 Restart Claude and authenticate with Zerodha
5 Start querying your portfolio in plain English

Final Thought

Kite MCP is one of those things that sounds technical but takes less than 10 minutes to set up. And once it's live, the way you interact with your portfolio data completely changes.

You stop looking at spreadsheets and start having conversations.

If you've been manually exporting data, copy-pasting into ChatGPT, and hoping the analysis is useful — this is the better alternative. Real data, real time, real answers.


Signing off,
Nataraj Malavade
natarajmalavade.in

This article is for educational purposes only. Not investment advice.

FinTech

Part 1 of 1

More from this blog

S

Stock Market, Mutual Funds, Trading & Money Tips | Nataraj Malavade

27 posts

Nomad ಕನ್ನಡಿಗ 😎 | Long-term investor Short-term trader👨‍💻 | Certified RA | Passionate Author, Content Creator & Mentor 😊 | Empowering minds to master the art of Stock Market Trading & Investing 📈