JungHoonGhae/tossinvest-cli

토스증권을 AI 에이전트와 터미널에서 다루는 도구. CLI 와 MCP 서버로 계좌·시세·주문은 물론 웹앱 전용 기능(수급·AI 시그널·스크리너·배당)까지, JSON·CSV 구조화 출력으로 AI 도구·자동화에 바로 연동.

What it solves

tossinvest-cli provides a flexible way to connect to Toss Securities, extending the capabilities of the official Open API. It allows users to access account summaries, portfolios, market data, and trading functions via a command-line interface (CLI) or as an MCP server for AI agents, bridging the gap between the limited official API and the full feature set available in the Toss web app (WTS).

How it works

The tool is built with Go and operates as a CLI (tossctl) and an MCP server. It can connect to Toss Securities using either official API keys or by utilizing web sessions (via QR login), allowing it to access features not available in the official API. It includes a safety gate in config.json to disable trading actions by default, requiring explicit user permission to execute trades.

Who it’s for

  • AI Agent Users: Those using Claude Code, Cursor, Gemini, or GitHub Copilot who want their agents to manage accounts and trades via MCP.
  • Developers and Automators: Users who want to programmatically access Toss Securities data for scripts, dashboards, or automated trading.
  • Investors: Individuals seeking advanced analysis tools for realized profit/loss, dividends, and market supply/demand flows that are not in the official API.

Highlights

  • Extended Coverage: Supports 100% of the official Open API plus 24 additional features from the web app, such as AI signals, market indices, and dividend history.
  • AI Agent Integration: Native support for MCP (Model Context Protocol), enabling natural language interaction with Toss Securities via various AI agents.
  • Hybrid Routing: Automatically routes requests through the official API or web sessions to bypass rate limits and access restricted features.
  • Comprehensive Trading: Supports limit orders, fractional shares (including KRW payment mode), and a "dry-run preview" for trade verification.
  • Headless Login: Supports QR-based authentication for environments without a GUI (SSH/CI).