
sparker0i/indian-stock-mcp-agent
Browser automationЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
MCP Server that deals with Indian Stocks, MFs, Crypto, etc.
Обзор
A Model Context Protocol (MCP) server that connects to Indian broker platforms — , , and — to provide a unified, read-only view of your financial portfolio through Claude Code, Claude Desktop, or any MCP-compatible client. No paid broker API subscriptions required. The server uses to capture data from the broker web apps after you log in via a visible Chrome window. - across multiple brokers - — all asset classes - captures structured JSON from broker SPAs (more reliable than DOM scraping) - — log in once per session expiry - (AES-256-GCM) in memory - — no order placement, no fund transfers - — partial data returned if one broker fails - 18+ - installed (Playwright uses your system Chrome via channel: 'chrome') - or (or any MCP client) Copy the example env file and edit as needed: Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json on Linux, ~/Library/Application Support/Claude/claude_desktop_config.
README
Показан фрагмент оригинального README. Открыть оригинал.
Indian Broker MCP Server
A Model Context Protocol (MCP) server that connects to Indian broker platforms — Groww, Zerodha Kite, and INDmoney — to provide a unified, read-only view of your financial portfolio through Claude Code, Claude Desktop, or any MCP-compatible client.
No paid broker API subscriptions required. The server uses Playwright browser automation to capture data from the broker web apps after you log in via a visible Chrome window.
Features
- Unified portfolio view across multiple brokers
- Stocks, F&O, Mutual Funds, US Stocks, Gold — all asset classes
- Network interception captures structured JSON from broker SPAs (more reliable than DOM scraping)
- Persistent browser sessions — log in once per session expiry
- Encrypted session storage (AES-256-GCM) in memory
- Read-only — no order placement, no fund transfers
- Graceful degradation — partial data returned if one broker fails
Broker Support Matrix
| Feature | Groww | Zerodha Kite | INDmoney |
|---|---|---|---|
| Stock Holdings | Yes | Yes | Yes |
| F&O Positions | Yes | Yes | — |
| Mutual Funds | Yes | Yes (Coin) | Yes |
| US Stocks | Yes | — | Yes |
| Gold / SGB | Yes | — | Yes |
| Orders | Yes | Yes | Yes |
| Login Method | Email + OTP | User ID + Password + TOTP | Phone + OTP |
Prerequisites
- Node.js 18+
- Google Chrome installed (Playwright uses your system Chrome via
channel: 'chrome') - Claude Code or Claude Desktop (or any MCP client)
Installation
git clone indian-broker-mcp
cd indian-broker-mcp
npm install
npx playwright install chromium
npm run build
Configuration
Copy the example env file and edit as needed:
cp .env.example .env
Environment Variables
| Variable | Default | Description |
|---|---|---|
SESSION_ENCRYPTION_KEY |
Auto-generated | 32-byte hex key for AES-256-GCM session encryption |
SESSION_TTL_HOURS |
6 |
Session expiry time in hours |
BROWSER_HEADLESS |
false |
Set true to run browsers headless (login still needs headed mode) |
BROWSER_SLOW_MO |
100 |
Delay in ms between Playwright actions (helps avoid detection) |
BROWSER_DATA_DIR |
./browser-data |
Persistent browser profile storage |
LOG_LEVEL |
info |
debug, info, warn, or error |
RECORDINGS_DIR |
./recordings |
Output directory for learn_broker_navigation |
Connecting to an MCP Client
Claude Code
claude mcp add indian-broker -- node /path/to/indian-broker-mcp/build/index.js
Claude Desktop
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json on Linux, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"indian-broker": {
"command": "node",
"args": ["/path/to/indian-broker-mcp/build/index.js"]
}
}
}
Restart Claude Desktop after adding the configuration.
Установка
npx playwright install chromiumКонфигурация
{
"mcpServers": {
"indian-broker": {
"command": "node",
"args": ["/path/to/indian-broker-mcp/build/index.js"]
}
}
}