Zerodha MCP

MCPAI代理

提供方 mtwn105

AI代理 stdio · 本地进程 无需鉴权 社区 / 第三方
查看接入方式

Zerodha MCP Server \u0026 Client (Kite x Agno)

一句话选型结论

按资料字段整理

Zerodha MCP 属于AI代理类 MCP 服务器,stdio · 本地进程,无需鉴权,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 30 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

developer-toolspythonagentaimcpartificial-intelligencekitezerodha

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
python -m venv venv

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Zerodha MCP当前 未标注 stdio · 本地进程 本地部署 有 2026-05-18
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方mtwn105上游标注的维护方 mtwn105
分类AI代理本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Python本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-18上游最后核验时间

详细介绍

7.8 KB
来自项目仓库与上游目录的原文,未做删改

Zerodha MCP Server & Client

A Python-based trading assistant that connects to a Zerodha MCP server to help users manage their trading account.

Features

  • 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

Tech Stack

  • Protocol: Model Context Protocol (MCP)
  • Agent Framework:
  • Agno
  • Google ADK

Tools

  • Place Orders: Place orders in the trading platform
  • Modify Orders: Modify orders in the trading platform
  • Cancel Orders: Cancel orders in the trading platform
  • Get Orders: Get orders in the trading platform
  • Get Order History: Get order history in the trading platform
  • Get Order Trades: Get order trades in the trading platform
  • Get Margins: Get margins in the trading platform
  • Get Holdings: Get holdings in the trading platform
  • Get Positions: Get positions in the trading platform
  • Get User Profile: Get user profile in the trading platform

Prerequisites

  • Python
  • Zerodha trading account with Personal API access from here
  • Zerodha API key and secret
  • OpenAI API key (for Agno Agent)
  • Gemini API key or Application Default Credentials (for Google ADK Agent)

Installation

  1. Clone the repository:```bash
    git clone https://github.com/mtwn105/zerodha-mcp-server-client.git
    cd zerodha-mcp-server-client

2. Create and activate a virtual environment:```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:```bash
    pip install -r requirements.txt

4. Set up environment variables:```bash
# Copy the example environment file
cp .env.example .env

# Edit the .env file with your credentials
  1. Create a .env file with your configuration:```env

Server Configuration

ZERODHA_API_KEY=your_api_key
ZERODHA_API_SECRET=your_api_secret
PORT=8001
SERVER_MODE=sse # or stdio

Client Configuration

MCP_HOST=localhost
MCP_PORT=8001
OPENAI_API_KEY=your_openai_api_key

GOOGLE_API_KEY=your_google_api_key


## Server Usage

The server provides a set of tools for interacting with the Zerodha trading platform. To start the server:

1. Make sure your `.env` file is properly configured with your Zerodha API credentials.

2. Start the server using one of the following methods:```bash
# Using environment variables
python server.py

# Or using command line arguments
python server.py --api-key your_api_key --api-secret your_api_secret --port 8001 --mode sse

The server provides the following tools:

  • get_login_url: Get the login URL for user authentication
  • get_access_token: Generate access token using request token
  • get_user_profile: Get user's Zerodha profile information
  • get_margins: Get available margins and fund details
  • get_holdings: Get portfolio holdings
  • get_positions: Get current positions
  • get_orders: Get all orders for the day
  • get_order_history: Get history of a specific order
  • get_order_trades: Get trades generated by an order
  • place_order: Place a new order
  • modify_order: Modify an existing order
  • cancel_order: Cancel an order

Client Usage

This project provides three client implementations:

  1. Using the Agno framework (client/agno_client.py)
  2. Using Agno with Gradio web interface (client/agno_gradio_client.py)
  3. Using Google ADK (client/google_adk_client.py)

All clients connect to the MCP server and provide an interactive interface for trading operations.

Running the Agno Client

  1. Ensure your .env file includes OPENAI_API_KEY.
  2. Start the client using one of the following methods:```bash

Using environment variables from .env file

python client/agno_client.py

Using command line arguments

python client/agno_client.py --host localhost --port 8001

Using a combination (command line arguments take precedence)

MCP_HOST=localhost MCP_PORT=8001 python client/agno_client.py --host otherhost --port 9000


### Running the Google ADK Client

1. Ensure you have authenticated with Google AI, either by setting the `GOOGLE_API_KEY` environment variable (and uncommenting it in `.env`) or by using Application Default Credentials (run `gcloud auth application-default login`).
2. Start the client using one of the following methods:```bash
# Using environment variables from .env file
python client/google_adk_client.py

# Using command line arguments
python client/google_adk_client.py --host localhost --port 8001

# Using a combination (command line arguments take precedence)
MCP_HOST=localhost MCP_PORT=8001 python client/google_adk_client.py --host otherhost --port 9000

Running the Gradio Web Interface

  1. Ensure your .env file includes OPENAI_API_KEY.
  2. Start the Gradio web interface:```bash

Using environment variables from .env file

python client/agno_gradio_client.py

Using command line arguments for server configuration

python client/agno_gradio_client.py --host localhost --port 8001


3. Open your web browser and navigate to the URL shown in the terminal (typically `http://localhost:7860`).

4. Use the web interface to:
   - Connect to the MCP server by entering the host and port
   - Chat with the AI assistant using natural language
   - Manage your Zerodha account through a user-friendly interface

The Gradio interface provides:

- Easy connection management with host/port configuration
- Real-time chat interface with the AI assistant
- Visual feedback for connection status
- Mobile-friendly responsive design

### Client Configuration

Both clients support configuration through multiple sources, with the following precedence:

1. Command-line arguments (highest precedence)
2. Environment variables
3. `.env` file variables

Configuration options:

- Environment variables: `MCP_HOST` and `MCP_PORT`
- Command-line arguments: `--host` and `--port`
- `.env` file variables: `MCP_HOST`, `MCP_PORT`, `OPENAI_API_KEY`, and `GOOGLE_API_KEY`

Default values (if no configuration is provided):

- Host: localhost
- Port: 8001

The client automatically loads environment variables from the `.env` file in the project root directory. Make sure your `.env` file contains the necessary configuration:```env
# Client Configuration
MCP_HOST=localhost
MCP_PORT=8001
OPENAI_API_KEY=your_openai_api_key
# GOOGLE_API_KEY=your_google_api_key
  1. The client will automatically connect to the MCP server using the provided configuration.

  2. Once connected, you can interact with the assistant using natural language commands. For example:

  • "Show me my portfolio holdings"
  • "What are my current positions?"
  • "Place a market order for 10 shares of RELIANCE"
  • "Cancel order ID 123456"
  1. To exit the client, type 'quit' when prompted.

Development

Project Structure

  • client/agno_client.py: MCP client implementation using Agno
  • client/google_adk_client.py: MCP client implementation using Google ADK
  • client/agno_gradio_client.py: Web interface using Gradio and Agno
  • server.py: MCP server implementation with Zerodha API integration
  • generate_token.py: Utility for generating access tokens
  • requirements.txt: Project dependencies
  • .env: Environment configuration

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgments

  • Built using Agno
  • Built using Google ADK
  • Uses MCP for standardized communication
  • Powered by KiteConnect for Zerodha API integration

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Zerodha MCP 怎么安装?

在客户端按下面的安装命令接入:python -m venv venv。装完在客户端配置里引用同一个包或端点。

Zerodha MCP 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Zerodha MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Zerodha MCP 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Zerodha MCP 能提供哪些能力?

资料显示能力标签包括 Python、自然语言交互、AI代理。具体工具清单以官方文档为准。

Zerodha MCP 需要什么运行环境?

运行时为 Python;属于本地进程,需要在本机装好运行环境。

Zerodha MCP 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-18。