Skip to main content
Glama

Zerodha Trading Bot MCP

Trading Bot with MCP

A trading bot built using the Model Context Protocol (MCP) that provides a set of tools for automated trading operations. This bot offers various functionalities for trading stocks, managing positions, and accessing market information.

Features

  • Stock Trading
    • Buy stocks with specified quantity
    • Sell stocks with specified quantity
    • Cancel existing orders
  • Market Information
    • Get real-time quotes for stocks
    • Check market status
    • View order history
  • Account Management
    • View current positions
    • Check account balance
    • Monitor order status

Prerequisites

  • Node.js (Latest LTS version recommended)
  • npm or yarn package manager
  • Trading account credentials (configured in mcp-conf.json)

Installation

  1. Clone the repository:
git clone https://github.com/AmritanshuPrashar/zerodha-mcp.git cd mcp-zerodha
  1. Install dependencies:
npm install
  1. Configure your trading credentials:
    • Create a mcp-conf.json file in the root directory
    • Add your trading platform credentials and configuration

Configuration

The mcp-conf.json file should contain the following structure:

{ "buyStock": { "prompt": "Your buy stock prompt" }, "sellStock": { "prompt": "Your sell stock prompt" }, "getPosition": { "prompt": "Your get position prompt" }, "getMarketStatus": { "prompt": "Your market status prompt" }, "getQuote": { "prompt": "Your quote prompt" }, "getOrderHistory": { "prompt": "Your order history prompt" }, "cancelOrder": { "prompt": "Your cancel order prompt" }, "getAccountBalance": { "prompt": "Your account balance prompt" } }

Usage

The bot provides several tools that can be used through the MCP interface:

  • buy-stock: Place buy orders for stocks
  • sell-stock: Place sell orders for stocks
  • get-positions: View current positions
  • get-market-status: Check market status
  • get-quote: Get real-time quotes
  • get-order-history: View order history
  • cancel-order: Cancel existing orders
  • get-account-balance: Check account balance

Development

The project is built using:

  • TypeScript
  • Model Context Protocol (MCP) SDK
  • Zod for schema validation

License

[Add your chosen license here]

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Disclaimer

This trading bot is for educational purposes only. Use at your own risk. Always test thoroughly before using with real money.

-
security - not tested
F
license - not found
-
quality - not tested

An automated trading bot that interfaces with Zerodha to execute stock trades, manage positions, and access market information through natural language commands.

  1. Features
    1. Prerequisites
      1. Installation
        1. Configuration
          1. Usage
            1. Development
              1. License
                1. Contributing
                  1. Disclaimer

                    Related MCP Servers

                    • -
                      security
                      A
                      license
                      -
                      quality
                      Integrates Zerodha's trading platform with Claude AI using the Multi-Cloud Plugin framework, allowing users to interact with their Zerodha trading account directly through Claude for stock trading and mutual fund operations.
                      Last updated -
                      2
                      Python
                      MIT License
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A server application that enables large language models to execute stock trading operations through QMT trading system, providing functionality for account queries, position management, and order placement.
                      Last updated -
                      Python
                    • -
                      security
                      -
                      license
                      -
                      quality
                      A Cloudflare Worker that provides a RESTful API interface to Zerodha trading functionalities, enabling users to authenticate, access profile information, manage orders, and view holdings and positions.
                      Last updated -
                      JavaScript
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI models to interact with the Zerodha trading platform, allowing users to execute trades, view portfolio holdings, and manage positions through a standardized interface.
                      Last updated -
                      1
                      TypeScript
                      MIT License

                    View all related MCP servers

                    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/AmritanshuPrashar/zerodha-mcp'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server