Zerodha Trading MCP Server
Provides integration with Zerodha's trading APIs, enabling authentication, fetching stock prices and historical data, analyzing price changes, retrieving portfolio and positions, and generating buy/sell recommendations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Zerodha Trading MCP ServerWhat's the current price of Reliance Industries?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zerodha Trading MCP Server
A MCP (Model Context Protocol) server built with FastMCP that interfaces with Zerodha broker APIs to provide stock trading tools and analysis.
Features
Authentication with Zerodha
Fetch stock prices from Zerodha
Analyze price changes
Get user portfolio
Get buy/sell recommendations
Find potential stocks to buy
Fetch historical data
Related MCP server: Kite MCP Server
Installation
Clone this repository
Install dependencies:
npm installConfigure Zerodha API credentials:
Create a
.envfile in the root directoryAdd your Zerodha API credentials:
# Zerodha API Credentials
API_KEY=your_api_key
API_SECRET=your_api_secret
USER_ID=your_user_id
PASSWORD=your_password
PIN=your_pin
# Optional - if you already have an access token
ACCESS_TOKEN=your_access_tokenRunning the Server
You can run the server in different ways:
Using npm start
npm startUsing FastMCP CLI for testing
npm run devThis launches the FastMCP CLI for interactively testing the server in the terminal.
Using MCP Inspector for visual testing
npm run inspectThis launches the MCP Inspector web UI for testing the server.
Integrating with Cursor IDE
To integrate this MCP server with Cursor IDE:
Install Cursor IDE from https://cursor.sh/
Open Cursor settings
Navigate to "AI" > "MCP Servers"
Add a new MCP server configuration:
{
"mcpServers": {
"zerodha-trading-mcp": {
"command": "node",
"args": ["path/to/your/project/index.js"],
"env": {
"API_KEY": "your_zerodha_api_key",
"API_SECRET": "your_zerodha_api_secret"
}
}
}
}Replace path/to/your/project with the actual path to your project directory and add your Zerodha API credentials.
Restart Cursor
When using Claude or another AI assistant in Cursor, you should now see your Zerodha trading tools available for the AI to use.
Authentication Flow
Before using the tools that require authentication, you need to:
Call the
getLoginURLtool to get the Zerodha login URLVisit the URL and complete the login process
Copy the request token from the redirect URL
Call the
generateSessiontool with the request tokenNow you can use all the other tools that require authentication
Available Tools
checkAuthStatus: Check if the Zerodha API client is authenticatedgetLoginURL: Get the Zerodha login URL for authenticationgenerateSession: Generate a session using the request token obtained after logingetProfile: Get user profile information from ZerodhagetPortfolio: Get user's stock portfolio (holdings) from ZerodhagetPositions: Get user's current day trading positions from ZerodhagetStockPrice: Get current market price for given stocksgetFavoriteStockPrices: Get current market price for favorite/common stocksanalyzePriceChanges: Analyze price changes for given stocksanalyzePortfolio: Analyze portfolio for buy/sell recommendationsfindPotentialBuys: Find potential stocks to buy based on price analysisgetHistoricalData: Get historical price data for a given instrument
Customizing the Server
You can modify the following files to customize the server:
config.js: Configure favorite stocks, trading parameters, and technical analysis parameterszerodha.js: Implement additional Zerodha API functionsindex.js: Add or modify tools
Disclaimer
This server is provided for educational and informational purposes only. It is not intended to provide investment advice. Always conduct your own research before making investment decisions.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Connect AI agents to bank accounts, transactions, balances, and investments.
Connects AI agents to live, verified financial data from 18,000+ institutions — ready to reason from
Build, backtest, and deploy quantitative trading strategies from your AI agent.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Zerodha trading platform for placing stock orders, viewing portfolio holdings, and managing mutual fund investments. Provides secure OAuth authentication and real-time trading capabilities through Zerodha's official API.1
- AlicenseBqualityDmaintenanceEnables trading and portfolio management on Zerodha Kite Connect through natural language. Supports placing orders, viewing positions/holdings, accessing real-time market data, and managing GTT orders.24MIT
- FlicenseNot gradedqualityDmaintenanceEnables natural language access to Zerodha trading accounts for retrieving portfolio holdings, positions, orders, funds, and real-time market prices. Supports secure authentication for Indian stock market trading operations via Claude, Cursor, and other MCP-compatible AI tools.1
- FlicenseNot gradedqualityDmaintenanceEnables AI models to interact with the Zerodha trading platform for portfolio management, trading, and account operations through natural language.3
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mahAnuj/mcp-zerodha'
If you have feedback or need assistance with the MCP directory API, please join our Discord server