Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

An MCP server for Zerodha Kite Connect that enables AI agents to execute trades, manage portfolios, fetch market data, and perform technical and fundamental analysis.

README.md

!Bun !TypeScript !Node.js !MCP !Zerodha !Claude !Open Source

Kite MCP Trading Server

<p align="center"> <img src="./banner.png" alt="Kite MCP Server Banner" width="100%"> </p> A powerful Model Context Protocol (MCP) Server built with Bun + TypeScript for Zerodha Kite Connect.

This server enables AI agents, automation workflows, and trading applications to interact with Zerodha accounts for:

  • Order Execution
  • Portfolio Management
  • Market Data Retrieval
  • Technical Analysis
  • Fundamental Analysis

---

Features

Trading Operations

  • Place Buy Orders
  • Place Sell Orders
  • Modify Existing Orders
  • Cancel Orders
  • View Order History
  • Fetch Active Orders

Portfolio Management

  • Get Holdings
  • Get Positions
  • Calculate Profit & Loss (PnL)

Market Data

  • Live Quotes
  • Last Traded Price (LTP)
  • Multiple Instrument Support

Technical Analysis

  • EMA 20
  • EMA 50
  • RSI 14
  • Trend Detection
  • Buy / Sell / Hold Signals

Fundamental Analysis

  • P/E Ratio Analysis
  • Price to Book Ratio
  • Return on Equity (ROE)
  • Debt to Equity
  • Profit Margins
  • Earnings Growth

---

Technologies Used

Runtime & Language

  • Bun
  • TypeScript

Trading APIs

  • Zerodha Kite Connect API
  • Yahoo Finance API

MCP

  • Model Context Protocol (MCP)
  • MCP SDK
  • MCP Server

Validation

  • Zod
  • JSON Schema

---

Architecture

Claude Desktop / Cursor / OpenAI
                │
                ▼
       Kite MCP Server
        (Bun + TypeScript)
                │
                ▼
      Zerodha Kite Connect
                │
                ▼
       Indian Stock Market

---

Installation

git clone https://github.com/BrextherFx/kite-mcp-server.git

cd kite-mcp-server

bun install

---

Environment Variables

Create a .env file:

KITE_API_KEY=
KITE_API_SECRET=
KITE_REQUEST_TOKEN=
KITE_ACCESS_TOKEN=

---

Running the Server

Development:

bun run dev

Generate Token:

bun run gen

Production:

bun run start

---

Zerodha Kite Developer Setup

Step 1: Create a Zerodha Trading Account

Open:

https://zerodha.com/open-account

Login:

https://kite.zerodha.com

Step 2: Create Kite Developer Account

https://developers.kite.trade/signup

Create your developer account.

Step 3: Create Application

Open:

https://developers.kite.trade

Create a new application.

Example:

App Name: Kite MCP Server
Redirect URL: http://localhost:3000/callback

Save and collect:

API Key
API Secret

Step 4: Configure IP Whitelist

Find your public IP:

https://ifconfig.me

Add the IP in:

Developer Console
└── Profile
    └── IP Whitelist

Step 5: Generate Request Token

bun run gen

Login using the generated URL.

Copy:

request_token=xxxxxxxx

Step 6: Generate Access Token

Store it inside .env:

KITE_ACCESS_TOKEN=xxxxxxxx

---

Claude Desktop Setup

Open:

%APPDATA%\Claude\claude_desktop_config.json

Add:

{
  "mcpServers": {
    "kite": {
      "command": "bun",
      "args": [
        "run",
        "C:/Projects/kite-mcp/index.ts"
      ]
    }
  }
}

Restart Claude Desktop.

---

MCP Tools

| Tool | Description | | ------------- | -------------------------------- | | buy-stock | Place buy order | | sell-stock | Place sell order | | modify-order | Modify order | | cancel-order | Cancel order | | get-orders | Get orders | | get-holdings | Get holdings | | get-positions | Get positions | | get-quote | Get live quote | | get-ltp | Get LTP | | get-margins | Get margins | | get-pnl | Calculate PnL | | analyze-stock | Technical + Fundamental Analysis |

---

Roadmap

  • [ ] WebSocket Live Market Data
  • [ ] Option Chain Analysis
  • [ ] AI Trade Recommendations
  • [ ] Portfolio Risk Analysis
  • [ ] Historical Backtesting

---

Contributing

Contributions are welcome.

Feel free to open Issues or Pull Requests.

---

License

MIT License

---

Author

Momin Saad (BrextherFx)

Software Developer • AI Builder • Automation Enthusiast

🌐 Website: brextherfx.site

💻 GitHub: BrextherFx

Made with ❤️ by BrextherFx.

---

⭐ If you find this project useful, consider giving it a star.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Browser & Scraping servers.