Skip to main content
Glama
aptro

Zerodha MCP Integration

by aptro

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
KITE_API_KEYYesYour Zerodha API Key (also called Consumer Key)
KITE_API_SECRETYesYour Zerodha API Secret (also called Consumer Secret)

Tools

Functions exposed to the LLM to take actions

NameDescription
initiate_login

Start the Zerodha login flow by opening the login URL in a browser and starting a local server to handle the redirect

get_request_token

Get the current request token after login redirect

get_holdings

Get user's holdings/portfolio

get_positions

Get user's positions

get_margins

Get account margins

place_order

Place an order on Zerodha

Args: tradingsymbol: Trading symbol (e.g., 'INFY') exchange: Exchange (NSE, BSE, NFO, etc.) transaction_type: BUY or SELL quantity: Number of shares/units product: Product code (CNC, MIS, NRML) order_type: Order type (MARKET, LIMIT, SL, SL-M) price: Price for LIMIT orders trigger_price: Trigger price for SL orders

get_quote

Get quote for symbols

Args: symbols: List of symbols (e.g., ['NSE:INFY', 'BSE:RELIANCE'])

get_historical_data

Get historical data for an instrument

Args: instrument_token: Instrument token from_date: From date (format: 2024-01-01) to_date: To date (format: 2024-03-13) interval: Candle interval (minute, day, 3minute, etc.)

check_and_authenticate

Check if Kite is authenticated and initiate authentication if needed. Returns the authentication status and any relevant messages.

get_mf_orders

Get all mutual fund orders

place_mf_order

Place a mutual fund order

Args: tradingsymbol: Trading symbol (e.g., 'INF090I01239') transaction_type: BUY or SELL amount: Amount to invest or redeem tag: Optional tag for the order

cancel_mf_order

Cancel a mutual fund order

Args: order_id: Order ID to cancel

get_mf_instruments

Get all available mutual fund instruments

get_mf_holdings

Get user's mutual fund holdings

get_mf_sips

Get all mutual fund SIPs

place_mf_sip

Place a mutual fund SIP (Systematic Investment Plan)

Args: tradingsymbol: Trading symbol (e.g., 'INF090I01239') amount: Amount per instalment instalments: Number of instalments (minimum 6) frequency: weekly, monthly, or quarterly initial_amount: Optional initial amount instalment_day: Optional day of month/week for instalment (1-31 for monthly, 1-7 for weekly) tag: Optional tag for the SIP

modify_mf_sip

Modify a mutual fund SIP

Args: sip_id: SIP ID to modify amount: New amount per instalment frequency: New frequency (weekly, monthly, or quarterly) instalments: New number of instalments instalment_day: New day of month/week for instalment status: SIP status (active or paused)

cancel_mf_sip

Cancel a mutual fund SIP

Args: sip_id: SIP ID to cancel

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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

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