The Zerodha MCP Integration allows you to interact with your Zerodha trading account directly through Claude AI using the Multi-Cloud Plugin (MCP) framework. This integration enables you to check your portfolio, place orders, manage mutual funds, and more through simple conversational prompts.
Install zerodha-mcp for Claude Desktop automatically:
npx -y @smithery/cli install @aptro/zerodha-mcp --client claude
http://127.0.0.1:5000/zerodha/auth/redirect
After creating your app, you'll receive:
Create a .env
file in the root directory with:
KITE_API_KEY=your_api_key_here
KITE_API_SECRET=your_api_secret_here
uv pip install kiteconnect fastapi uvicorn python-dotenv httpx
mcp install main.py
To check login status or authenticate:
Can you please check if I'm logged into my Zerodha account and authenticate if needed?
Check margins:
What are my current margins on Zerodha?
View holdings:
Show me my current holdings on Zerodha
Check positions:
What positions do I currently have open on Zerodha?
Get quotes:
What's the current price of RELIANCE and INFY on NSE?
Place an order:
Place a buy order for 10 shares of INFY at market price on NSE
Get historical data:
Can you show me the historical price data for SBIN for the last 30 days?
View mutual fund holdings:
Show me my mutual fund holdings on Zerodha
Get mutual fund orders:
List all my mutual fund orders on Zerodha
Place a mutual fund order:
Place a buy order for ₹5000 in the mutual fund with symbol INF090I01239
Cancel a mutual fund order:
Cancel my mutual fund order with order ID 123456789
View SIPs:
Show all my active SIPs on Zerodha
Create a new SIP:
Set up a monthly SIP of ₹2000 for the fund with symbol INF090I01239 for 12 installments
Modify an existing SIP:
Change my SIP with ID 987654321 to ₹3000 per month
Cancel a SIP:
Cancel my SIP with ID 987654321
Browse available mutual funds:
Show me a list of available mutual funds on Zerodha
When using any Zerodha functionality for the first time:
Your session remains active until the token expires (typically 24 hours), after which Claude will automatically initiate the login flow again.
.tokens
file and restart authentication.env
fileThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.