JungHoonGhae/tossinvest-cli
토스증권을 AI 에이전트와 터미널에서 다루는 도구. CLI 와 MCP 서버로 계좌·시세·주문은 물론 웹앱 전용 기능(수급·AI 시그널·스크리너·배당)까지, JSON·CSV 구조화 출력으로 AI 도구·자동화에 바로 연동.
471 ★78 forksGoUpdated 1d ago
What you need to know
tossctl — a Go CLI and MCP server for Toss Securities (Korean brokerage). It covers 100% of the official Open API plus ~39 web(WTS)-only features (institutional flows, market indices, AI signals, screeners, watchlists, transaction ledgers, real-time push, KRW fractional orders, dry-run previews) and can be driven from any AI agent via MCP.
Install
curl -fsSL https://raw.githubusercontent.com/JungHoonGhae/tossinvest-cli/main/install.sh | sh (macOS/Linux) irm https://raw.githubusercontent.com/JungHoonGhae/tossinvest-cli/main/install.ps1 | iex (Windows PowerShell) brew tap JungHoonGhae/tossinvest-cli && brew install tossctl (macOS)
Usage
- •tossctl auth login (QR/browser login; needs Google Chrome + Python) or tossctl openapi login for the official key
- •Register with an agent: claude mcp add tossctl tossctl mcp
- •Always run `tossctl order preview` before any trading mutation; live orders need --execute + --confirm <token>
- •tossctl doctor to verify setup; tossctl auth extend to renew the ~7-day session
Key features
- ✓Full account/portfolio/quote/order coverage for KR and US stocks via official Open API (auto-routed when connected) plus WTS fallback
- ✓39 features beyond the official API: quote flows, market indices, AI signals, condition-search screener, watchlist management, transaction ledger, real-time SSE push, KRW fractional orders, dry-run preview, tax/realized-P&L reports
- ✓MCP server exposes a fixed 3-tool catalog (list_operations / describe_operation / call_operation) so resident context cost stays constant regardless of operation count
- ✓Safety gates: trading disabled by default, config.json toggles + scopes (sell/fractional) + allow_live_order_actions master switch + per-order confirm token
- ✓MCP reads combine official API + WTS; writes (orders) always go through the official API path only
Best for
Korean retail investors using Toss Securities who want AI agents (Claude Code, Codex, Cursor, Copilot) to query accounts, screen markets, and run research in natural language.
Caveats
- ⚠NOT an official Toss product; non-Open-API features use Toss's internal web (WTS) APIs unofficially, which may violate Toss's terms of service — use at your own risk (account restriction possible)
- ⚠Trading features are ALL off after install; must be enabled per-feature in config.json
- ⚠WTS session needs phone-app approval to extend (~7-day active expiry); without 2nd confirmation the session expires after ~1h idle
- ⚠MCP exposes reads (official + WTS) but writes only via the official API path; real-time streaming and WTS writes are CLI-only
- ⚠Status: beta
Platforms: macOS · Linux · WindowsClients: Claude Code · Claude Desktop · Codex · Gemini CLI · Cursor · GitHub Copilot · OpenCode · Qwen Code · DeepSeek · Mistral · Kimi CLI · OpenClaw
Documentation ↗Reviewed 2026-08-07
Topics
- Stars
- 471★
- Forks
- 78
- Language
- Go
- License
- MIT
- Created
- 2026-03-11
- Last push
- 2026-08-06