Skip to main content
Glama

Zerodha Trading Bot - MCP Server

by ssonthal
SETUP.md•1.81 kB
# Quick Setup Guide ## šŸš€ Getting Started ### 1. Install Dependencies ```bash npm install ``` ### 2. Configure Environment ```bash cp env.example .env ``` Edit `.env` with your Zerodha API credentials: ```env ZERODHA_API_KEY=your_api_key_here ZERODHA_API_SECRET=your_api_secret_here ZERODHA_REDIRECT_URI=http://localhost:3000/callback ``` ### 3. Get Zerodha API Credentials 1. Visit [Zerodha API Console](https://developers.kite.trade/) 2. Create a new application 3. Set redirect URI to `http://localhost:3000/callback` 4. Copy API Key and Secret to `.env` ### 4. Authenticate ```bash node src/auth-server.js ``` Visit `http://localhost:3000` and complete OAuth flow. ### 5. Test the Setup ```bash npm test ``` ### 6. Start MCP Server ```bash npm start ``` ## šŸ“‹ Available Commands - `npm start` - Start the MCP server - `npm run dev` - Start in development mode with auto-restart - `npm test` - Run tests - `node src/auth-server.js` - Start authentication server - `node examples/basic-usage.js` - Run basic usage example ## šŸ”§ Troubleshooting 1. **Environment variables not found**: Make sure `.env` file exists and has correct values 2. **Authentication failed**: Check API credentials and redirect URI 3. **Token expired**: Re-run authentication server 4. **Order rejected**: Verify account balance and order parameters ## šŸ“š Next Steps 1. Read the full [README.md](README.md) for detailed documentation 2. Check [examples/basic-usage.js](examples/basic-usage.js) for usage examples 3. Explore the available MCP tools in [src/mcp-server.js](src/mcp-server.js) 4. Customize trading strategies as needed ## āš ļø Important Notes - Never commit your `.env` file - Test thoroughly in paper trading mode first - Keep API credentials secure - Monitor your trading activities regularly

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/ssonthal/ZerodhaTradingBot-MCPServer'

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