๐ Zerodha Trading Agent (MCP x Bun.js)
@mvk24199
About ๐ Zerodha Trading Agent (MCP x Bun.js)
MCP Server on Zerodha Trading Platform
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"zerodha-trade": {
"command": "bun",
"args": [
"login.ts"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is ๐ Zerodha Trading Agent (MCP x Bun.js)?
This is an intelligent stock trading agent built with Bun.js, the Zerodha Kite Connect API, and Claude MCP Server Integration. It allows users to place trades, auto-buy or sell stocks based on triggers, and (on the roadmap) predict stock trends using historical data and live news.
How to use ๐ Zerodha Trading Agent (MCP x Bun.js)?
Install dependencies with bun install, then configure your Kite Connect API key, secret, and access token in tokenStore.json. Optionally run bun login.ts to generate an access token. Start the server with bun index.ts; it runs on http://localhost:3000. For HTTPS (required by Kite Connect), tunnel with ngrok. Finally, add the MCP server configuration to your Claude toolchain, pointing to the Bun binary and index.ts.
Key features of ๐ Zerodha Trading Agent (MCP x Bun.js)
- Place buy and sell orders automatically via MCP Agent
- Authenticate securely using Kite Connect
- Auto-refresh access tokens periodically
- Built with Bun.js for superfast runtime
- Fully compatible with Claude Toolchain / MCP Agents
- Smart GTTโlike watchlist and stock prediction (coming soon)
Use cases of ๐ Zerodha Trading Agent (MCP x Bun.js)
- Automated stock trading through natural language conversation with Claude
- Auto-buy or sell stocks based on preโdefined triggers
- Secure order placement without manual login each time
- Future: GTTโstyle threshold orders for price crossing
- Future: Stock trend prediction using historical data and news
FAQ from ๐ Zerodha Trading Agent (MCP x Bun.js)
What runtime and dependencies are required?
Bun.js must be installed. After cloning the repo, run bun install to pull dependencies. You also need a Zerodha Kite Connect API key and secret.
How do I obtain an access token?
Run bun login.ts to generate one manually. The server will then autoโrefresh the access token every 24 hours during normal operation.
How do I expose the server to Kite Connect via HTTPS?
Use ngrok to tunnel local port 3000 to a public HTTPS URL (e.g., https://abc1234.ngrok.io). Set that URL as the Redirect URL in your Kite Connect App configuration.
Does the agent currently support stock predictions?
No. Stock future prediction using charts and news is on the roadmap but not yet implemented. The current version handles placing buy and sell orders.
What transport and authentication does the MCP server use?
The server runs on HTTP (default port 3000). Authentication relies on Kite Connect API credentials (apiKey, apiSecret) and a persistent access token stored in tokenStore.json.
More Finance & Commerce MCP servers
Yahoo Finance MCP Server
Alex2Yang97This is a Model Context Protocol (MCP) server that provides comprehensive financial data from Yahoo Finance. It allows you to retrieve detailed information about stocks, including historical prices, company information, financial statements, options data, and market news.
China Stock MCP Server
peikuoAKShare One MCP Server
zwldarrenMCP server that provides access to Chinese stock market data using akshare-one
Market Fiyatฤฑ MCP Server
EnesCinrEdwin
edwin-financeEmpowering AI agents to dominate DeFAI
Comments