Zerodha MCP Server 371e2019

MCP安全风控

提供方 Kshitij-21

安全风控 未标注 API Key 官方维护

Enables AI assistants to interact with the Zerodha trading platform for placing stock orders, viewing portfolio holdings, and managing mutual fund investments. Provides secure OAuth authentication and real-time trading capabilities through Zerodha's official API.

一句话选型结论

按资料字段整理

Zerodha MCP Server 371e2019 属于安全风控类 MCP 服务器,传输方式未标注,API Key,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类安全风控 传输方式未标注 鉴权API Key 部署方式支持远程部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 官方维护 核验等级 仅资料核对

工具与能力

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

能力标签

安装与配置

未标注 API Key
上游未给出传输方式
  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

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

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
资产与漏洞排查

盘点资产、扫漏洞、看暴露面。

日志与审计

汇总日志、查异常行为。

合规检查

按规则检查配置与权限是否合规。

选择建议

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

值得选的地方

  • 基础信息齐全,可以先按官方文档接入试跑。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Zerodha MCP Server 371e2019当前 未标注 未标注 支持远程部署 无 2026-05-17
Cyber Strike AI 75 未标注 未标注 无 2026-05-17
mcp-for-beginners 未标注 stdio · 本地进程 本地部署 有 2026-04-13
casdoor 未标注 stdio · 本地进程 本地部署 有 2026-04-12
kubeshark 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Modelcontextprotocol C22988b0 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

安全风控
字段来自项目仓库与公开索引,中文说明由本站标注
提供方Kshitij-21上游标注的维护方 Kshitij-21
分类安全风控本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式API Key远程服务建议用最小权限凭据
维护方官方维护核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型支持远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

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

🚀 Zerodha MCP Server

A Model Context Protocol (MCP) server that provides tools for interacting with the Zerodha trading platform. This server enables AI assistants to place stock orders, view holdings, and manage mutual fund investments through Zerodha's API.

🎯 Features

Trading Tools

  • Place Stock Orders - Execute buy/sell orders on NSE and BSE
  • View Holdings - Get current stock portfolio holdings
  • Mutual Fund SIPs - View active Systematic Investment Plans
  • Mutual Fund Holdings - Check mutual fund portfolio (experimental)

Authentication

  • Zerodha Login - Secure OAuth-based authentication
  • Token Management - Automatic token storage and refresh
  • Session Handling - Persistent login sessions

Technical Features

  • TypeScript - Full type safety across the codebase
  • MCP Protocol - Standardized AI assistant integration
  • Error Handling - Comprehensive error management
  • Logging - Detailed operation logging

🏗️ Architecture```

zerodha-mcp/
├── config/
│ ├── KiteConfig.ts
│ └── tokens.json
├── functions/
│ └── OrderRelated.ts
├── utils/
│ └── readWrite.ts
├── .env
├── bun.lock
├── main.ts
└── package.json


## 🛠️ Tech Stack

- **TypeScript** - Type-safe JavaScript
- **MCP SDK** - Model Context Protocol implementation
- **KiteConnect** - Zerodha's official trading API
- **Axios** - HTTP client for API requests
- **Bun** - Required JavaScript runtime

## 📦 Installation

### Prerequisites
- Bun - Required runtime
- Zerodha trading account
- Zerodha API credentials

### 1. Clone the Repository```bash
git clone git@github.com:ManikLakhanpal/Zerodha-MCP.git
cd zerodha-mcp

2. Install Dependencies```bash

bun install


### 3. Environment Setup
Create a `.env` file in the root directory:```env
API_KEY=your_zerodha_api_key
API_SECRET=your_zerodha_api_secret

4. Get Zerodha API Credentials

  1. Log in to your Zerodha account
  2. Go to Zerodha Developers
  3. Create a new application
  4. Copy your API Key and API Secret

🚀 Usage

Starting the MCP Server```bash

bun main.ts


### Using with Claude

This MCP server is designed to work with Claude AI assistants. Here's how to set it up:

#### 1. Install Claude Desktop
First, download and install Claude Desktop for your operating system.

#### 2. Configure Claude to Use MCP ⚙️
1. 📱 Open Claude Desktop
2. 🔧 Go to **Settings** → **Developer Settings**
3. 📄 Click **Open Config File** to open `claude_desktop_config.json` in your default editor
4. ✏️ Add the following configuration to the `mcpServers` section:```json
{
  "mcpServers": {
    "kite": {
      "command": "/opt/homebrew/bin/bun", # Use `which bun` to get path
      "env": {
        "API_KEY": "your_zerodha_api_key",
        "API_SECRET": "your_zerodha_api_secret"
      },
      "args": ["/path/to/your/zerodha-mcp/main.ts"] # Paste the absolute path to main.ts
    }
  }
}

🔧 Important Notes:
- 🛠️ Replace /opt/homebrew/bin/bun with your Bun installation path (use which bun to find it)
- 📁 Replace /path/to/your/zerodha-mcp/main.ts with the actual path to your project's main.ts file
- 🔑 Replace your_zerodha_api_key and your_zerodha_api_secret with your actual Zerodha API credentials
- 🏷️ The server name "kite" can be changed to any name you prefer

3. Authentication Flow 🔐

  1. 🔑 First Login: Ask Claude to "login to Zerodha"
  2. 🌐 Get Login URL: Claude will provide a login URL
  3. ✅ Complete Login: Open the URL in your browser and complete Zerodha login
  4. 🔧 Set Tokens: Copy the request token from the URL and ask Claude to "set Zerodha tokens" with the token

4. Available Commands in Claude 💬

Once connected, you can ask Claude to:

  • 🔐 "Login to Zerodha" - Get authentication URL
  • 🔧 "Set Zerodha tokens with [request_token]" - Complete authentication
  • 📈 "Place a buy order for 10 shares of RELIANCE on NSE" - Execute trades
  • 📊 "Show my current holdings" - View portfolio
  • 💰 "Get my mutual fund SIPs" - View SIP investments
  • 🏦 "Check my mutual fund holdings" - View MF portfolio

5. Example Conversations 💭```

You: 🔐 "Login to Zerodha"
Claude: 🌐 [Provides login URL]

You: 🔧 "Set Zerodha tokens with abc123xyz"
Claude: ✅ [Confirms token setup]

You: 📈 "Buy 5 shares of TCS on NSE"
Claude: 💰 [Executes order and shows result]

You: 📊 "What stocks do I currently hold?"
Claude: 📋 [Shows your portfolio holdings]


### Available Tools 🛠️

#### 1. 🔐 Login to Zerodha```typescript
// Tool: login-to-zerodha
// Returns a login URL for user authentication

2. 🔧 Set Authentication Tokens```typescript

// Tool: set-zerodha-tokens
// Parameters: { request_token: string }
// Sets access tokens after successful login


#### 3. 📈 Place Stock Order```typescript
// Tool: place-stock-order
// Parameters: {
//   variety: "regular" | "amo" | "co" | "auction" | "iceberg",
//   stock: string,
//   qty: number,
//   exchange: "NSE" | "BSE",
//   orderType: "BUY" | "SELL"
// }

4. 📊 Get Holdings```typescript

// Tool: get-zerodha-holdings
// Returns current stock portfolio holdings


#### 5. 💰 Get Mutual Fund SIPs```typescript
// Tool: get-zerodha-mutual-fund-sips
// Returns active Systematic Investment Plans

6. 🏦 Get Mutual Fund Holdings```typescript

// Tool: zerodha-mf-holdings
// Returns mutual fund portfolio (experimental)


## 🔧 Configuration

### 🔐 Token Management
The server automatically manages authentication tokens:
- 📁 Tokens are stored in `config/tokens.json`
- 🔄 Automatic token refresh on session expiry
- 🛡️ Secure token handling with error recovery

### ⚡ API Limits
- ⏱️ Zerodha has rate limits on API calls
- 🛠️ The server includes built-in error handling
- 📝 Failed requests are logged with detailed error information

## 🔒 Security

- **🔐 Environment Variables** - API credentials stored securely on your local machine
- **📝 Error Logging** - No sensitive data in error messages

## 📊 API Reference

### 🏢 Zerodha API Integration
The server uses Zerodha's official KiteConnect API:
- **📈 Trading** - Place orders, view holdings
- **💰 Mutual Funds** - SIP management and holdings
- **🔐 Authentication** - OAuth-based login flow

### 🤖 MCP Protocol
Implements the Model Context Protocol for AI assistant integration:
- **🛠️ Tool Definitions** - Structured parameter schemas
- **🛡️ Error Handling** - Graceful failure responses
- **🔒 Type Safety** - Zod schema validation

## 🧪 Development

### 📁 Project Structure```
src/
├── main.ts              # Server entry point
├── config/
│   └── KiteConfig.ts    # Zerodha configuration
├── functions/
│   └── OrderRelated.ts  # Trading functions
└── utils/
    └── readWrite.ts     # File utilities

🛠️ Adding New Tools

  1. 📝 Define the tool in main.ts
  2. ⚙️ Implement the function in functions/
  3. 🛡️ Add proper error handling
  4. 📚 Update this README

🚨 Important Notes

⚠️ Trading Risks

  • 💰 Real Money Trading - This server executes real trades
  • ⏰ Market Hours - Orders only work during market hours
  • 🛡️ Risk Management - Implement proper stop-loss mechanisms
  • 🧪 Testing - Use paper trading for testing

🔧 API Limitations

  • ⏱️ Rate Limits - Respect Zerodha's API rate limits
  • 🕐 Market Hours - Some functions only work during trading hours
  • 🏦 Account Type - Requires a Zerodha trading account

🔧 Troubleshooting

🚨 Common Issues

🔐 Authentication Errors```bash

Check if tokens are valid

cat config/tokens.json

Re-authenticate if needed

Use login-to-zerodha tool

```

⚠️ API Errors

  • 🔑 Verify API credentials in .env
  • 🏦 Check Zerodha account status
  • ⏰ Ensure market hours for trading functions

🌐 Network Issues

  • 📡 Check internet connection
  • 🏢 Verify Zerodha API status
  • 📝 Review error logs for details

🤖 Claude MCP Connection Issues

  • 🔍 Server Not Found: Ensure the working directory path is correct
  • 🛠️ Command Not Found: Make sure bun is installed and in PATH
  • 🔐 Authentication Failed: Check environment variables are set correctly
  • ⏰ Token Expired: Re-authenticate using the login flow
  • 🚫 Permission Denied: Ensure the project folder has proper read/write permissions

🤝 Contributing

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/new-tool)
  3. ⚙️ Implement your changes
  4. 🛡️ Add proper error handling
  5. 📚 Update documentation
  6. 📤 Submit a pull request

📝 License

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

⚠️ Disclaimer

This software is for educational and personal use only. Trading involves substantial risk of loss and is not suitable for all investors. The developers are not responsible for any financial losses incurred through the use of this software. 🛡️

🆘 Support

  • 🐛 Issues - Report bugs via GitHub Issues
  • 📚 Documentation - Check this README and code comments
  • 🏢 Zerodha Support - Contact Zerodha for API-related issues

🙏 Acknowledgments

  • 🏢 Zerodha - Trading platform and API
  • 🤖 MCP SDK - Model Context Protocol implementation
  • 🔒 TypeScript - Type safety and development experience

Made by Kshitij Banerjee 🔥

常见问题

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

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

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

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

Zerodha MCP Server 371e2019 收费吗?

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

Zerodha MCP Server 371e2019 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Zerodha MCP Server 371e2019 能提供哪些能力?

资料显示能力标签包括 API密钥、安全、开发工具。具体工具清单以官方文档为准。

Zerodha MCP Server 371e2019 需要什么运行环境?

属于远程端点,不需要在本地装运行时。

Zerodha MCP Server 371e2019 是本地还是远程?

它是远程端点,连服务地址即可。

热门专题

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

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