Skip to main content
Glama
toss-invest

toss-invest

by nangchang

Toss Invest MCP Server

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

요구사항

  • Node.js 18+

  • 토스증권 WTS에서 발급받은 client_id, client_secret

Related MCP server: tossinvest-mcp

설치 및 빌드

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):

{
  "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는 실제 계좌에서 거래가 발생합니다.

Available Tools

20 tools
toss_cancel_order주문 취소 (실거래 주의)A
Destructive

⚠️ 경고: 이 도구는 실제 주식 주문을 취소합니다.

미체결(PENDING/PARTIAL_FILLED) 상태의 주문을 취소합니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스

  • orderId (string, 필수): 취소할 주문의 orderId

Returns:

  • orderId: 취소된 주문의 식별자

Inputs: orderId (required), accountSeq (required).

toss_create_order주문 생성 (실거래 주의)A
Destructive

⚠️ 경고: 이 도구는 실제 주식 주문을 생성합니다. 실제 자금이 사용됩니다.

주문을 생성합니다. 수량 기반 또는 금액 기반(US 시장가 매수만) 주문을 지원합니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스. toss_get_accounts 응답의 accountSeq 값

  • symbol (string, 필수): 종목 심볼. KRX: 6자리 숫자 (예: 005930), US: 영문 티커 (예: AAPL)

  • side (string, 필수): 주문 방향. "BUY" (매수) 또는 "SELL" (매도)

  • orderType (string, 필수): 호가 유형. "LIMIT" (지정가) 또는 "MARKET" (시장가)

  • quantity (string, 선택): 주문 수량. quantity 또는 orderAmount 중 하나 필수

    • KR: 양의 정수 (예: "10")

    • US MARKET SELL: 소수점 허용 (예: "0.5")

  • orderAmount (string, 선택): 주문 금액 (USD). US 시장가 매수(MARKET BUY)만 사용 가능 (예: "100.5")

  • price (string, 선택): 주문 가격. orderType=LIMIT일 때 필수

    • KR: 정수 원화 (예: "70000")

    • US: 소수점 달러 (예: "185.50")

  • timeInForce (string, 선택): 주문 유효 조건. "DAY" (기본, 당일 유효) 또는 "CLS" (장마감, US LIMIT만)

  • clientOrderId (string, 선택): 클라이언트 주문 ID. 최대 36자, 영숫자/-/_. 멱등성 키로 사용 (10분간 유효)

  • confirmHighValueOrder (boolean, 선택): 고액 주문 확인 플래그. 1억원 이상 주문 시 true 필수

Returns:

  • orderId: 서버 생성 주문 식별자 (정정/취소 시 사용)

  • clientOrderId: 요청한 clientOrderId (미전달 시 null)

Inputs: side (required), symbol (required), orderType (required), accountSeq (required), +6 more.

toss_get_accounts계좌 목록 조회A
Read-onlyIdempotent

토스증권 계좌 목록을 조회합니다. 반환된 accountSeq 값은 계좌/자산/주문 관련 API 호출 시 필요합니다.

Returns: 배열:

  • accountNo: 계좌번호

  • accountSeq: 계좌 시퀀스 (다른 API에서 X-Tossinvest-Account 헤더로 사용)

  • accountType: 계좌 유형 (현재 "BROKERAGE"만 지원)

Inputs: no named parameters.

toss_get_buying_power매수 가능 금액 조회A
Read-onlyIdempotent

특정 계좌의 매수 가능 금액(현금 기준)을 조회합니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스. toss_get_accounts 응답의 accountSeq 값

  • currency (string, 필수): 통화 코드. "KRW" (국내 주식 매수 가능 금액) 또는 "USD" (해외 주식 매수 가능 금액)

Returns:

  • currency: 통화 코드 (KRW/USD)

  • cashBuyingPower: 현금 기반 매수 가능 금액 (미수 미발생 기준, decimal string)

Inputs: currency (required), accountSeq (required).

toss_get_candles캔들 차트 조회A
Read-onlyIdempotent

특정 종목의 캔들 차트 데이터를 조회합니다.

Args:

  • symbol (string, 필수): 종목 심볼. KRX: 6자리 숫자, US: 영문 티커

  • interval (string, 필수): 캔들 간격. "1m" (1분봉) 또는 "1d" (일봉)

  • count (number, 선택): 조회 건수. 기본값 100, 최대 200

  • before (string, 선택): 페이지네이션 상한 (ISO 8601). 이 시간 이전 캔들을 반환

  • adjusted (boolean, 선택): 수정주가 적용 여부. 기본값 true

Returns:

  • candles[]: 캔들 목록 (timestamp, openPrice, highPrice, lowPrice, closePrice, volume, currency)

  • nextBefore: 다음 페이지 조회용 cursor (더 이전 데이터가 없으면 null)

Inputs: symbol (required), interval (required), count, before, +1 more.

toss_get_commissions매매 수수료 조회A
Read-onlyIdempotent

특정 계좌의 매매 수수료 정보를 조회합니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스. toss_get_accounts 응답의 accountSeq 값

Returns: 수수료 정보 (API 응답 그대로 반환)

Inputs: accountSeq (required).

toss_get_exchange_rate환율 조회A
Read-onlyIdempotent

KRW ↔ USD 환율 정보를 조회합니다.

Args:

  • baseCurrency (string, 필수): 기준 통화. "KRW" 또는 "USD"

  • quoteCurrency (string, 필수): 상대 통화. "KRW" 또는 "USD" (baseCurrency와 달라야 함)

  • dateTime (string, 선택): 조회 기준 시간 (ISO 8601). 생략 시 현재 시간 기준

Returns:

  • baseCurrency: 기준 통화

  • quoteCurrency: 상대 통화

  • rate: 환율

  • midRate: 중간 환율

  • basisPoint: 환율 변동 basis point

  • rateChangeType: 변동 유형

  • validFrom: 유효 시작 시간 (ISO 8601)

  • validUntil: 유효 종료 시간 (ISO 8601)

Inputs: baseCurrency (required), quoteCurrency (required), dateTime.

toss_get_holdings보유 주식 조회A
Read-onlyIdempotent

특정 계좌의 보유 주식 현황을 조회합니다. 계좌 시퀀스(accountSeq)는 toss_get_accounts로 조회할 수 있습니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스. toss_get_accounts 응답의 accountSeq 값

  • symbol (string, 선택): 종목 심볼 필터. 특정 종목만 조회 시 사용

Returns:

  • totalPurchaseAmount: 총 매수 금액 (krw, usd)

  • marketValue: 평가 금액 (amount, amountAfterCost - 수수료 차감)

  • profitLoss: 평가 손익 (amount, amountAfterCost, rate, rateAfterCost)

  • dailyProfitLoss: 일간 손익 (amount, rate)

  • items[]: 보유 종목 목록

    • symbol, name, marketCountry, currency

    • quantity: 보유 수량

    • lastPrice: 현재가

    • averagePurchasePrice: 평균 매수가

    • marketValue: 평가 금액

    • profitLoss: 손익

    • dailyProfitLoss: 일간 손익

    • cost: 수수료/세금 정보

Inputs: accountSeq (required), symbol.

toss_get_kr_market_calendar국내 장 운영 정보 조회A
Read-onlyIdempotent

국내(KRX) 주식 시장의 장 운영 시간 정보를 조회합니다. 특정 날짜의 프리마켓/정규장/애프터마켓 시간과 전/다음 영업일 정보를 반환합니다.

Args:

  • date (string, 선택): 조회 기준 날짜 (YYYY-MM-DD). 생략 시 오늘

Returns:

  • today.date: 기준 날짜

  • today.integrated: 통합장 시간 (preMarket, regularMarket, afterMarket)

  • previousBusinessDay: 전 영업일 정보

  • nextBusinessDay: 다음 영업일 정보

Inputs: date.

toss_get_order주문 상세 조회A
Read-onlyIdempotent

특정 주문의 상세 정보를 조회합니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스. toss_get_accounts 응답의 accountSeq 값

  • orderId (string, 필수): 주문 식별자. toss_create_order 또는 toss_get_orders 응답의 orderId 값

Returns:

  • orderId, symbol, side (BUY/SELL), orderType (LIMIT/MARKET)

  • timeInForce, status, price, quantity, orderAmount, currency

  • orderedAt, canceledAt

  • execution: 체결 정보 (filledQuantity, averageFilledPrice, filledAmount, commission, tax, filledAt, settlementDate)

Inputs: orderId (required), accountSeq (required).

toss_get_orderbook호가 조회A
Read-onlyIdempotent

특정 종목의 현재 호가(매수/매도 잔량) 정보를 조회합니다.

Args:

  • symbol (string, 필수): 종목 심볼. KRX: 6자리 숫자 (예: 005930), US: 영문 티커 (예: AAPL)

Returns:

  • timestamp: 호가 기준 시간 (ISO 8601)

  • currency: 통화 코드 (KRW/USD)

  • asks[]: 매도 호가 목록 (price, volume)

  • bids[]: 매수 호가 목록 (price, volume)

예시: 삼성전자(005930) 호가 조회, 애플(AAPL) 호가 조회

Inputs: symbol (required).

toss_get_orders주문 목록 조회A
Read-onlyIdempotent

특정 계좌의 주문 목록을 조회합니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스. toss_get_accounts 응답의 accountSeq 값

  • status (string, 필수): 주문 상태 필터.

    • "OPEN": 미체결 주문 (PENDING, PARTIAL_FILLED, PENDING_CANCEL, PENDING_REPLACE)

    • "CLOSED": 체결/취소/거부된 주문 (FILLED, CANCELED, REJECTED, REPLACED 등)

  • symbol (string, 선택): 종목 심볼 필터

  • from (string, 선택): 조회 시작일 (YYYY-MM-DD). 주문 생성 시간 기준

  • to (string, 선택): 조회 종료일 (YYYY-MM-DD)

  • cursor (string, 선택): 페이지네이션 cursor. 이전 응답의 nextCursor 값 (CLOSED만)

  • limit (number, 선택): 조회 건수. 기본값 20, 최대 100 (CLOSED만)

Returns:

  • orders[]: 주문 목록

    • orderId, symbol, side (BUY/SELL), orderType (LIMIT/MARKET)

    • timeInForce, status, price, quantity, orderAmount, currency

    • orderedAt, canceledAt

    • execution: 체결 정보 (filledQuantity, averageFilledPrice, filledAmount, commission, tax, filledAt, settlementDate)

  • nextCursor: 다음 페이지 cursor (CLOSED, hasNext=true일 때)

  • hasNext: 다음 페이지 존재 여부

Inputs: status (required), accountSeq (required), to, from, +3 more.

toss_get_price_limits상/하한가 조회A
Read-onlyIdempotent

특정 종목의 상한가/하한가를 조회합니다. (국내 KRX 종목에 적용)

Args:

  • symbol (string, 필수): 종목 심볼. KRX: 6자리 숫자 (예: 005930)

Returns:

  • timestamp: 기준 시간 (ISO 8601)

  • upperLimitPrice: 상한가 (decimal string)

  • lowerLimitPrice: 하한가 (decimal string)

  • currency: 통화 코드

Inputs: symbol (required).

toss_get_prices현재가 조회A
Read-onlyIdempotent

여러 종목의 현재가를 한번에 조회합니다. 최대 200개 심볼 지원.

Args:

  • symbols (string, 필수): 콤마로 구분된 종목 심볼 목록 (최대 200개). 예: "005930,000660" 또는 "AAPL,TSLA,NVDA"

Returns: 각 종목별 배열:

  • symbol: 종목 심볼

  • timestamp: 기준 시간 (ISO 8601)

  • lastPrice: 현재가 (decimal string)

  • currency: 통화 코드 (KRW/USD)

Inputs: symbols (required).

toss_get_sellable_quantity판매 가능 수량 조회A
Read-onlyIdempotent

특정 계좌에서 특정 종목의 판매 가능 수량을 조회합니다.

Args:

  • accountSeq (number, 필수): 계좌 시퀀스. toss_get_accounts 응답의 accountSeq 값

  • symbol (string, 필수): 종목 심볼. KRX: 6자리 숫자 (예: 005930), US: 영문 티커 (예: AAPL)

Returns:

  • sellableQuantity: 판매 가능 수량 (decimal string). KR: 정수, US: 소수점 포함 가능

Inputs: symbol (required), accountSeq (required).

toss_get_stocks종목 기본 정보 조회A
Read-onlyIdempotent

여러 종목의 기본 정보를 조회합니다. 최대 200개 심볼 지원.

Args:

  • symbols (string, 필수): 콤마로 구분된 종목 심볼 목록 (최대 200개). 예: "005930,000660" 또는 "AAPL,TSLA"

Returns: 각 종목별:

  • symbol: 종목 심볼

  • name: 종목명 (한글)

  • englishName: 종목명 (영문)

  • isinCode: ISIN 코드

  • market: 시장 (KOSPI, KOSDAQ, NASDAQ 등)

  • securityType: 증권 유형

  • isCommonShare: 보통주 여부

  • status: 거래 상태

  • currency: 통화 코드 (KRW/USD)

  • listDate: 상장일

  • delistDate: 상장폐지일 (null이면 상장 중)

  • sharesOutstanding: 발행주식수

  • leverageFactor: 레버리지 배수 (null이면 일반주)

  • koreanMarketDetail: 국내 주식 추가 정보 (null이면 해외주)

Inputs: symbols (required).

toss_get_stock_warnings종목 매수 유의사항 조회A
Read-onlyIdempotent

특정 종목의 투자 유의사항 및 경고 정보를 조회합니다.

Args:

  • symbol (string, 필수): 종목 심볼. KRX: 6자리 숫자 (예: 005930), US: 영문 티커 (예: AAPL)

Returns: 경고 목록 (없으면 빈 배열):

  • warningType: 경고 유형

    • LIQUIDATION_TRADING: 정리매매

    • OVERHEATED: 과열종목

    • INVESTMENT_WARNING: 투자경고

    • INVESTMENT_RISK: 투자위험

    • VI_STATIC: 정적 VI (변동성완화장치)

    • VI_DYNAMIC: 동적 VI

    • VI_STATIC_AND_DYNAMIC: 정적+동적 VI

    • STOCK_WARRANTS: 신주인수권증권

  • exchange: 거래소

  • startDate: 유의 시작일

  • endDate: 유의 종료일 (null이면 종료일 미정)

Inputs: symbol (required).

toss_get_trades최근 체결 내역 조회A
Read-onlyIdempotent

특정 종목의 최근 체결 내역을 조회합니다.

Args:

  • symbol (string, 필수): 종목 심볼. KRX: 6자리 숫자, US: 영문 티커

  • count (number, 선택): 조회 건수. 기본값 50, 최대 50

Returns: 각 체결 내역:

  • price: 체결 가격 (decimal string)

  • volume: 체결 수량 (decimal string)

  • timestamp: 체결 시간 (ISO 8601)

  • currency: 통화 코드 (KRW/USD)

Inputs: symbol (required), count.

toss_get_us_market_calendar미국 장 운영 정보 조회A
Read-onlyIdempotent

미국 주식 시장의 장 운영 시간 정보를 조회합니다. 특정 날짜의 프리마켓/정규장/애프터마켓 시간과 전/다음 영업일 정보를 반환합니다.

Args:

  • date (string, 선택): 조회 기준 날짜 (YYYY-MM-DD, 미국 현지 날짜). 생략 시 오늘

Returns:

  • today.date: 기준 날짜 (미국 현지)

  • today.dayMarket: 데이마켓 시간

  • today.preMarket: 프리마켓 시간 (null이면 미운영)

  • today.regularMarket: 정규장 시간 (null이면 휴장)

  • today.afterMarket: 애프터마켓 시간 (null이면 미운영)

  • previousBusinessDay: 전 영업일 정보

  • nextBusinessDay: 다음 영업일 정보

Inputs: date.

toss_modify_order주문 정정 (실거래 주의)A
Destructive

⚠️ 경고: 이 도구는 실제 주식 주문을 정정합니다.

미체결(PENDING/PARTIAL_FILLED) 상태의 주문을 정정합니다. KR 주식: 수량과 가격 변경 가능. US 주식: 가격만 변경 가능 (수량 변경 불가).

Args:

  • accountSeq (number, 필수): 계좌 시퀀스

  • orderId (string, 필수): 정정할 주문의 orderId

  • orderType (string, 필수): 변경할 호가 유형. "LIMIT" 또는 "MARKET"

  • quantity (string, 선택): 변경할 수량. KR 주식 필수, US 주식 불가 (양의 정수만)

  • price (string, 선택): 변경할 가격. orderType=LIMIT일 때 필수

  • confirmHighValueOrder (boolean, 선택): 고액 주문 확인 플래그. 1억원 이상 시 true 필수

Returns:

  • orderId: 정정된 주문의 식별자

Inputs: orderId (required), orderType (required), accountSeq (required), price, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables querying Korean and US stock information, quotes, account assets, and order history via Toss Securities Open API. Optionally supports order placement with preview and confirmation safeguards.
      1
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Toss Securities (토스증권) Open API MCP server for the Korean stock market. Supports real-time quotes, orderbook, candles, account holdings, buying power, and order management (create/modify/cancel) with a built-in safety gate requiring explicit confirmation before any real order is placed.
      36
      281 npm
      4
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables MCP clients to read Toss Securities market data and account info, and optionally place real-money orders.
      20
      -
    • F
      license
      B
      quality
      D
      maintenance
      Enables natural language interaction with Toss Securities Open API for stock quotes, account management, and order placement via Claude.
      28
      -