Zerodha MCP Server & Client logo

Zerodha MCP Server & Client

by mtwn105

A Python-based trading assistant that connects to a Zerodha MCP server to help users manage their trading account. It provides an interactive chat interface for trading operations.

View on GitHub

Last updated: N/A

What is Zerodha MCP Server & Client?

This is a Python-based server and client application designed to facilitate trading on the Zerodha platform using the Model Context Protocol (MCP). It offers an interactive interface for managing your Zerodha trading account, orders, and positions through natural language commands.

How to use Zerodha MCP Server & Client?

First, clone the repository and install the necessary dependencies. Configure your environment variables with your Zerodha API key and secret, as well as API keys for OpenAI (for Agno client) or Google AI. Start the server, then run either the Agno or Google ADK client, providing the server host and port. Interact with the client using natural language commands to manage your trading account.

Key features of Zerodha MCP Server & Client

  • Account Management: Manage Zerodha trading account, orders, and positions

  • Interactive Chat Interface: Natural language interface for trading operations

  • MCP Integration: Built on the Model Context Protocol for standardized communication

  • Zerodha API Integration: Uses Zerodha's API to interact with the trading platform

  • Agno Agent: Uses Agno Agent to interact with the trading platform

  • Google ADK Agent: Uses Google ADK Agent to interact with the trading platform

Use cases of Zerodha MCP Server & Client

  • Automated trading strategies

  • Real-time portfolio monitoring

  • Order placement and management via natural language

  • Integration with AI agents for intelligent trading decisions

FAQ from Zerodha MCP Server & Client

What is MCP?

MCP stands for Model Context Protocol, a standardized communication protocol used for interacting with the server.

What API keys do I need?

You need a Zerodha API key and secret, and optionally an OpenAI API key (for the Agno client) or Google API key/Application Default Credentials (for the Google ADK client).

How do I configure the client?

The client can be configured using command-line arguments, environment variables, or variables in the .env file. Command-line arguments take precedence.

What commands can I use in the client?

You can use natural language commands such as 'Show me my portfolio holdings', 'What are my current positions?', 'Place a market order for 10 shares of RELIANCE', and 'Cancel order ID 123456'.

How do I exit the client?

Type 'quit' when prompted to exit the client.