Labsco
SamarJyoti496 logo

Trade-MCP

from SamarJyoti496

A modular trading automation project using the Zerodha Kite Connect API for tool-based and resource-based automation.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

Trade-MCP

A modular trading automation project using Zerodha Kite Connect and MCP (Modular Command Platform) for tool-based and resource-based automation. This project exposes trading actions (like placing orders and fetching holdings) as MCP tools, making them accessible to Claude Desktop and other MCP-compatible clients.


Features

  • Zerodha Integration: Place buy/sell orders and fetch holdings using the Kite Connect API.
  • MCP Tools: Expose trading actions as callable tools for automation and AI agents.
  • Environment-based Secrets: API keys and secrets are loaded from a .env file for security.
  • Extensible: Easily add new tools or resources for more trading actions.

Exposed Tools

  • add(a: int, b: int): Add two numbers.
  • place_zerodha_buy_order(symbol: str, quantity: int): Place a buy order.
  • place_zerodha_sell_order(symbol: str, quantity: int): Place a sell order.
  • get_zerodha_holdings(): Get all holdings from Zerodha.

Extending

To add a new tool, define a function in server.py and decorate it with @mcp.tool():

@mcp.tool()
def my_tool(...):
    ...