Skip to main content
Glama
nangchang

toss-invest

by nangchang
README.md
# Toss Invest MCP Server

토스증권 Open API를 위한 MCP (Model Context Protocol) 서버입니다.

## 요구사항

- Node.js 18+
- 토스증권 WTS에서 발급받은 `client_id`, `client_secret`

## 설치 및 빌드

```bash
npm install
npm run build
```

## 환경변수

| 변수명 | 설명 | 필수 |
|--------|------|------|
| `TOSS_CLIENT_ID` | 토스증권 Open API Client ID | ✅ |
| `TOSS_CLIENT_SECRET` | 토스증권 Open API Client Secret | ✅ |

## Claude Desktop 설정

`~/.claude/claude_desktop_config.json` (또는 Claude Desktop > 설정 > MCP):

```json
{
  "mcpServers": {
    "toss-invest": {
      "command": "node",
      "args": ["/Volumes/data/Github/stock-toss-mcp/dist/index.js"],
      "env": {
        "TOSS_CLIENT_ID": "여기에_client_id",
        "TOSS_CLIENT_SECRET": "여기에_client_secret"
      }
    }
  }
}
```

## 제공 도구

### 시장 데이터
| 도구 | 설명 |
|------|------|
| `toss_get_orderbook` | 호가 조회 |
| `toss_get_prices` | 현재가 조회 (최대 200개 종목) |
| `toss_get_trades` | 최근 체결 내역 조회 |
| `toss_get_price_limits` | 상/하한가 조회 |
| `toss_get_candles` | 캔들 차트 조회 (1분봉/일봉) |

### 종목 정보
| 도구 | 설명 |
|------|------|
| `toss_get_stocks` | 종목 기본 정보 조회 (최대 200개) |
| `toss_get_stock_warnings` | 종목 매수 유의사항 조회 |

### 시장 정보
| 도구 | 설명 |
|------|------|
| `toss_get_exchange_rate` | KRW↔USD 환율 조회 |
| `toss_get_kr_market_calendar` | 국내 장 운영 시간 조회 |
| `toss_get_us_market_calendar` | 미국 장 운영 시간 조회 |

### 계좌 및 자산
| 도구 | 설명 |
|------|------|
| `toss_get_accounts` | 계좌 목록 조회 |
| `toss_get_holdings` | 보유 주식 조회 |
| `toss_get_buying_power` | 매수 가능 금액 조회 |
| `toss_get_sellable_quantity` | 판매 가능 수량 조회 |
| `toss_get_commissions` | 매매 수수료 조회 |

### 주문 (⚠️ 실거래)
| 도구 | 설명 |
|------|------|
| `toss_get_orders` | 주문 목록 조회 |
| `toss_get_order` | 주문 상세 조회 |
| `toss_create_order` | **주문 생성 (실거래)** |
| `toss_modify_order` | **주문 정정 (실거래)** |
| `toss_cancel_order` | **주문 취소 (실거래)** |

> ⚠️ `toss_create_order`, `toss_modify_order`, `toss_cancel_order`는 실제 계좌에서 거래가 발생합니다.

TDQS

A4.2/5.0

Scored across 20 tools

Disambiguation5/5

Each tool targets a distinct resource or action: market data (prices, candles, orderbook, trades), account info (holdings, buying power, commissions), and order management (create, modify, cancel, list, detail). The few similar-looking pairs like get_order/get_orders are clearly separated by singular/plural naming and detailed descriptions, leaving no real ambiguity.

Naming Consistency5/5

All tool names follow a consistent pattern: 'toss_' prefix + verb (get/create/modify/cancel) + noun. Read operations consistently use 'get_', and write operations use clear action verbs. The convention is uniformly snake_case with no mixed styles or unpredictable deviations.

Tool Count4/5

At 20 tools, the set is slightly above the typical 3-15 range, but each tool serves a distinct purpose justified by the dual Korean/US market support and the breadth of trading operations. The count feels comprehensive rather than bloated, with no redundant tools.

Completeness4/5

The tool surface covers the full trading lifecycle: market data lookup, account status checks, order placement, modification, cancellation, and detailed order queries. Minor gaps exist, such as lacking a dedicated account transaction history or deposit/withdrawal tools, but these are not critical to core trading workflows.