Imagine spending your entire weekend downloading Excel sheets, segregating stocks by industry, and running a SWOT analysis on your portfolio. For the past 15 years, that was the reality for many serious investors. Today, with the integration of AI tools and trading platforms, that entire process takes less than 10 minutes.
In a recent masterclass, tech expert Himanshu Arora demonstrated how to use Claude AI and the Dhan Model Context Protocol (MCP) to seamlessly connect a live brokerage account directly to an AI brain. By doing so, the AI autonomously reviews your holdings, generates real-time market insights, and even codes custom interactive HTML dashboards.
While AI is revolutionizing how we handle financial data, managing the textual output of that data is equally important. Whether you are generating investment reports or sharing insights with clients, leveraging a specialized text engine like textify.ai ensures your financial narratives are clear, persuasive, and perfectly formatted.
What is MCP (Model Context Protocol)?
The magic behind this workflow is a technology introduced by Anthropic called the Model Context Protocol (MCP).
Think of an MCP as a digital USB drive for your AI. A standard API might let you pull a single data point or execute a trade. An MCP, however, allows Claude’s “Co-work” environment to securely “plug into” your external apps (like your Dhan brokerage account) to read and analyze massive datasets natively, without you having to manually export or copy-paste anything.
Just as modern platforms like TravelTalk24.com have removed the friction from managing complex global itineraries, MCPs remove the friction from connecting external databases directly to Large Language Models.
The 3-Step Automated Portfolio Review
Using the Pro version of Claude (specifically utilizing the Co-work interface), you can execute this exact process.
Inside Claude, navigate to your connectors and click “Add custom connector.” Paste the remote MCP server URL provided by Dhan. Claude will then prompt you to authenticate your account using an OTP sent to your phone and your security PIN, safely linking your live portfolio data to the AI.
Instead of asking for a massive data dump, you can be highly specific to save on AI computing “tokens.” For example, you can prompt Claude with: “Give me a list of my holdings in Banking and Finance companies.” Claude will securely pull live data, instantly rendering a table showing your exact shares, average cost, and invested amounts in companies like HDFC, PNB, or Bank of Baroda.
Once Claude has the data, you can prompt it to act as your financial analyst: “Do a SWOT analysis based on current economic scenarios… Then, prepare a small dashboard and share with me which shows everything discussed above in charts and infographics.”
Claude will analyze macro tailwinds, governance issues, and regulatory risks. It will then literally write the HTML code to build a beautiful, dark-themed “Banking & Finance Portfolio Dashboard.” This interactive UI visually tracks your Total Invested capital, Unrealised P&L, Sector Allocation (via colorful pie charts), and Top 10 Holdings (via bar charts).
Frequently Asked Questions (FAQs)
Yes, but it requires more manual work. The seamless MCP integration shown here requires the paid “Pro” version of Claude. To do this for free, you would need to manually download your portfolio as an Excel sheet from your broker and upload it directly into a free LLM like ChatGPT or Google Gemini to ask for an analysis.
When setting up the MCP connector, Claude asks for permissions. You can set the tool permissions to “Needs Approval” rather than “Always Allow.” This ensures that the AI cannot extract data or execute tasks without explicitly asking for your authorization via a prompt on the screen.
Tokens are the currency of AI computation. Advanced tasks—like querying a live database, performing a macroeconomic SWOT analysis across 70+ stocks, and writing complex HTML/CSS code for a custom dashboard—are highly intensive. If you run out of tokens on a Pro plan, they will replenish every few hours.