Zerodha Trading Agent MCP server

Zerodha Trading Agent MCP server

zerodha-trade•bymvk24199

An MCP server built with Bun.js that exposes stock trading tools to Claude agents via the Zerodha Kite Connect API.

License: Not specified•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Exposes buy and sell stock tools to an MCP agent, which the server executes through the Kite Connect API.
  • •Authenticates securely with Kite Connect and automatically refreshes the access token periodically.
  • •Runs a local server that exposes trading functions to Claude agents on port 3000.

BEST FOR

  • •Placing buy and sell orders on Zerodha through a Claude MCP agent.
  • •Traders who want an MCP-connected agent to handle order execution with automatic daily token refresh.

ABOUT ZERODHA-TRADE

Zerodha Trading Agent MCP server is cataloged as an MCP server attributed to mvk24199. An MCP server built with Bun.js that exposes stock trading tools to Claude agents via the Zerodha Kite Connect API. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Zerodha Trading Agent MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the MCP agent place orders?

The MCP agent requests buyStock or sellStock, and the agent server uses the Kite Connect API to place the orders.

Does the agent refresh Kite Connect access tokens automatically?

Yes, the access token is refreshed every day automatically.

Upstream README

View this exact version on GitHub

README.md · e5acfddbfe30 · Fetched 2026-11-13 12:09:10 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

🚀 Zerodha Trading Agent (MCP x Bun.js)

This is an intelligent Stock Trading Agent built using:

  • Bun.js (fast JavaScript runtime)
  • Zerodha Kite Connect API
  • Claude MCP Server Integration

The agent allows you to place trades, auto-buy/sell stocks based on triggers, and (future roadmap) predict stock trends using historical data and live news.


📋 Features

  • 🔥 Place Buy and Sell orders automatically via MCP Agent
  • 🛡️ Authenticate securely using Kite Connect
  • 🔄 Auto-refresh access tokens periodically
  • 🎯 (Coming Soon) Smart GTT-like Watchlist based buying/selling
  • 🧠 (Coming Soon) Stock Future Prediction using charts and news analysis
  • ⚡ Built with Bun.js for superfast runtime
  • 🎯 Fully compatible with Claude Toolchain / MCP Agents

📂 Project Structure

zerodha-trade/
├── index.ts          # MCP Server setup, defines trading tools
├── trade.ts          # Trading logic: place order, generate session
├── refreshToken.ts   # Refreshes access token using request_token
├── login.ts          # (One time) Generate new access token
├── tokenStore.json   # Stores API key, secret, access token
├── watchlist.json    # (Coming soon) GTT trigger rules
├── README.md         # Project documentation

⚙️ Setup Instructions

1. Install Dependencies

bun install

(Make sure you have Bun.js installed:)

curl -fsSL https://bun.sh/install | bash

2. Configure API Credentials

Update tokenStore.json with:

{
  "apiKey": "YOUR_KITE_API_KEY",
  "apiSecret": "YOUR_KITE_API_SECRET",
  "accessToken": "YOUR_ACCESS_TOKEN"
}

If you don't have accessToken yet, run:

bun login.ts

to generate one manually.


3. Running the Agent Server

bun index.ts

✅ This will:

  • Auto-refresh your access token every 24 hours
  • Expose trading functions to Claude Agent via MCP Server
  • Run a server on http://localhost:3000

4. Using HTTPS Locally (via ngrok)

Since Kite Connect requires an HTTPS URL, you can use ngrok to tunnel your local server securely.

brew install ngrok   # Install ngrok (if not already installed)
ngrok http 3000      # Expose port 3000 via HTTPS

After running, you will get a public HTTPS URL like https://abc1234.ngrok.io. Use this URL as your Redirect URL when creating your Kite Connect App.


5. Creating Kite Connect App (to get API Key/Secret)

  1. Go to Kite Developer Console
  2. Click Create New App
  3. Fill in:
    • App Name: (Any meaningful name)
    • Redirect URL: (Paste your https://xyz.ngrok.io URL)
    • Postback URL: (Same or another ngrok HTTPS URL)
    • Products: Kite Connect
    • Exchange: NSE, BSE, etc.
  4. After creation, you will get API Key and API Secret
  5. Update tokenStore.json accordingly

🚀 MCP Server Configuration Example

{
  "mcpServers": {
    "zerodha-trade": {
      "command": "/Users/vamsi/.bun/bin/bun",
      "args": [
        "--directory",
        "/Users/vamsi/Projects/zerodha-trade",
        "index.ts"
      ]
    }
  }
}

🛠️ Future Enhancements (Roadmap)

  • 🔔 Smart GTT Trigger system: Buy/sell when price crosses target
  • 📈 Stock Future Prediction Agent (using historical price + live news)
  • 📊 Auto SIP Bot for ETFs like Nifty50
  • 📬 Telegram/Slack Alerts on successful order execution
  • 📉 Stop Loss Automation on Portfolio Holdings

🤖 How It Works (High Level)

  1. MCP Agent requests buyStock(symbol, quantity) or sellStock(symbol, quantity)
  2. Agent server uses Kite Connect API to place orders
  3. Access token refreshed every day automatically
  4. (Upcoming) Background service watches prices to auto-trigger GTT-like orders
  5. (Upcoming) News + Chart analysis predict stock trend

✨ Credits


Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Zerodha Trading Agent MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/zerodha-trade)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics