tossinvest-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tossinvest-mcp What's the current price of Apple?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
토스증권 MCP 서버 (tossinvest-mcp)
Claude에서 토스증권 계좌로 국내·미국 주식을 조회하고 주문할 수 있게 해주는 Model Context Protocol (MCP) 서버입니다. 토스증권 Open API를 사용해 주식 시세·호가· 체결·차트·투자자 수급·보유 종목·주문 가능 금액·환율을 조회하고, 사용자 확인 절차를 거쳐 일반 주문과 SINGLE·OCO·OTO 조건주문을 등록합니다. Claude Code, Claude Desktop 등 MCP를 지원하는 AI 클라이언트에서 바로 사용할 수 있습니다.
toss client key 생성 : https://corp.tossinvest.com/ko/open-api
Claude Code에서 사용하기
이 패키지가 npm에 배포된 뒤에는 저장소를 clone할 필요가 없습니다. Claude Code를
사용할 프로젝트의 .mcp.json에 아래 내용을 추가하세요.
{
"mcpServers": {
"toss": {
"command": "npx",
"args": ["-y", "@soehd0889/tossinvest-mcp"],
"env": {
"TOSS_CLIENT_ID": "토스_클라이언트_ID",
"TOSS_CLIENT_SECRET": "토스_클라이언트_시크릿"
}
}
}
}토스증권 Open API 개발자 콘솔에서 TOSS_CLIENT_ID와
TOSS_CLIENT_SECRET을 발급받아 입력한 뒤 Claude Code를 재시작하세요.
자격 증명은 Git에 커밋하거나 프롬프트에 공유하면 안 됩니다.
npx는 첫 실행 때 패키지를 내려받고 이후에는 캐시를 사용합니다. Node.js 18 이상이 필요합니다.
Related MCP server: tossinvest-openapi-mcp
제공 도구
도구 | 설명 |
| 한국·미국 주식의 현재가 조회 |
| 회사 이름을 티커 또는 국내 종목 코드로 변환 |
| 보유 종목과 손익 조회 |
| 원화 또는 달러 주문 가능 금액 조회 |
| 환율 조회 (기본: USD → KRW) |
| 1분봉 또는 일봉 OHLCV 조회 |
| 실시간 호가와 최근 체결 조회 |
| 한국·미국 장 운영 시간 및 휴장일 조회 |
| 투자 유의사항·거래 경고 조회 |
| 국내 종목 투자자 수급·공매도 동향 조회 |
| 거래대금·거래량·상승·하락 종목 랭킹 조회 |
| 지수·시장 지표의 현재가와 캔들 조회 |
| 코스피·코스닥 투자자별 매매대금 조회 |
| 주식 주문을 검증·미리보기만 함 (실주문 없음) |
| SINGLE·OCO·OTO 조건주문을 검증·미리보기 |
| 사용자 확인을 거친 일회용 주문을 제출 |
주문 안전 절차
주문은 항상 2단계로 진행됩니다. toss_prepare_order 또는
toss_prepare_conditional_order는 주문을 실행하지 않고 미리보기만 만듭니다.
AI는 내용을 사용자에게 보여주고 명시적인 확인을 받은 후에만
toss_submit_prepared_order를 호출해야 합니다. 확인 토큰은 정확히 그 주문에만
연결되며 60초 후 만료되고, 한 번 사용하거나 서버를 재시작하면 무효화됩니다.
이는 착오주문 위험을 낮추는 장치이며 사용자의 최종 검토를 대체하지 않습니다.
로컬 개발
git clone https://github.com/Jeric1223/tossinvest-mcp.git
cd tossinvest-mcp
npm install
npm test로컬에서 실행할 때는 .env.example을 복사해 자격 증명을 입력합니다.
cp .env.example .env참고 사항
처음 실행하면 KOSPI, KOSDAQ, NASDAQ, NYSE, AMEX의 종목 마스터를 다운로드하며, 이후에는 캐시를 사용하고 하루에 한 번 백그라운드 갱신합니다.
API의 숫자 필드는 문자열로 오며, 등락률은 소수 형식입니다. 예:
-0.3799는 -37.99%입니다.API 제한은 시세 초당 15회, 자산 초당 5회, 계좌 초당 1회입니다.
면책 사항
이 프로젝트는 토스증권과 무관한 비공식 도구이며 투자 조언을 제공하지 않습니다. 사용에 따른 책임은 사용자에게 있습니다.
라이선스
Available Tools
29 toolstoss_get_buying_powerGet buying powerARead-only
Returns available cash in the Toss Securities account. toss_get_holdings excludes cash, so call this too when computing total assets.
Inputs: currency.
toss_get_candlesGet OHLCV candlesARead-only
Returns OHLCV candles for a symbol, for trend and volatility analysis. Interval is 1m or 1d; at most 200 candles per call.
Inputs: symbol (required), interval (required), count, before, +1 more.
toss_get_commissionsGet commissionsARead-only
Returns applicable Korean and US stock trading commission schedules.
Inputs: no named parameters.
toss_get_conditional_orderGet conditional order detailARead-only
Gets one conditional order in full, including whether its trigger has fired and what each leg is doing. Use it to check on an armed condition before modifying it.
Inputs: conditionalOrderId (required).
toss_get_conditional_ordersGet conditional ordersARead-only
Lists conditional (trigger-based) orders in the account, filtered by status. Use it to find the conditionalOrderId needed by toss_prepare_conditional_order_modify and toss_prepare_conditional_order_cancel. Regular orders are listed separately by toss_get_orders.
Inputs: status (required), limit, cursor, symbol.
toss_get_exchange_rateGet exchange rateARead-only
Returns the Toss Securities FX rate, defaulting to USD -> KRW. Use it to convert USD positions to KRW. Quotes expire in about five minutes, so do not cache the result.
Inputs: baseCurrency, quoteCurrency.
toss_get_holdingsGet holdingsARead-only
Returns the actual positions and P&L in the Toss Securities account. Prefer this over any hand-maintained portfolio file, which may be out of date.
Inputs: no named parameters.
toss_get_market_calendarGet market hoursARead-only
Returns session and holiday information for the Korean or US market, including adjacent business days.
Inputs: market (required), date.
toss_get_market_indicator_candlesGet market indicator candlesBRead-only
Returns 1-minute or daily OHLCV candles for a market indicator.
Inputs: symbol (required), interval (required), count, before.
toss_get_market_indicator_pricesGet market indicator pricesARead-only
Returns current prices for market indicators such as KOSPI and KOSDAQ. Pass one or more documented indicator symbols.
Inputs: symbols (required).
toss_get_market_investor_tradingGet index investor tradingBRead-only
Returns investor trading value trends for KOSPI or KOSDAQ.
Inputs: symbol (required), interval (required), count, until.
toss_get_orderGet order detailARead-only
Gets one regular order in full, including its current status and every partial execution. Use it to confirm what actually filled after submitting an order.
Inputs: orderId (required).
toss_get_orderbookGet order bookBRead-only
Returns live ask and bid levels for a Korean stock code or US ticker.
Inputs: symbol (required).
toss_get_ordersGet ordersARead-only
Lists regular orders in the account, filtered by status. Use it to find the orderId needed by toss_prepare_order_modify and toss_prepare_order_cancel, or to check whether an order filled. Conditional orders are listed separately by toss_get_conditional_orders.
Inputs: status (required), to, from, limit, +2 more.
toss_get_priceGet current priceARead-only
Fetches current prices from Toss Securities. Korean listings use the 6-digit code (e.g. 005930); US listings use the ticker (e.g. NVDA). Both can be mixed in one call. If you only know the company name, call toss_resolve_symbol first.
Inputs: symbols (required).
toss_get_rankingsGet stock rankingsARead-only
Ranks Korean or US stocks by traded value, traded volume, or price change, for screening what is active today. Returns a leaderboard, not data about a stock you already picked — use toss_get_price for that.
Inputs: type (required), duration (required), marketCountry (required), count, +1 more.
toss_get_recent_tradesGet recent tradesARead-only
Returns recent executions for a Korean stock code or US ticker.
Inputs: symbol (required), count.
toss_get_sellable_quantityGet sellable quantityARead-only
Returns how many shares of one symbol can be sold right now. This can be lower than the holding shown by toss_get_holdings, because shares reserved by open sell orders or still settling are excluded. Check it before sizing a SELL order.
Inputs: symbol (required).
toss_get_short_sellingGet short-selling trendsARead-only
Returns daily Korean-stock short-selling volume, value, and ratio.
Inputs: symbol (required), count, until.
toss_get_stock_investor_tradingGet stock investor tradingARead-only
Returns daily Korean-stock trading trends for retail, foreign, institutional, and other investors.
Inputs: symbol (required), count, until.
toss_get_stock_warningsGet stock warningsARead-only
Returns investment cautions, liquidation trading, volatility interruption, and warrant warnings.
Inputs: symbol (required).
toss_prepare_conditional_orderPrepare conditional stock orderADestructive
Previews a NEW conditional order that stays dormant until its trigger price is reached. SINGLE arms one leg. OCO arms two legs where filling either one cancels the other (typical take-profit plus stop-loss pair). OTO arms a second leg that is placed only after the first leg fills. For an order that should execute right away use toss_prepare_order instead. Nothing reaches the market from this call: it only validates the request and returns a preview plus a confirmation token. Show that preview to the user, obtain explicit approval, then pass the token to toss_submit_prepared_order. The token is single-use and expires 60 seconds after this call.
Inputs: type (required), first (required), symbol (required), quantity (required), +3 more.
toss_prepare_conditional_order_cancelPrepare conditional order cancellationADestructive
Previews the removal of an EXISTING conditional order so that it can no longer trigger. Legs that already triggered and became live orders are unaffected — cancel those with toss_prepare_order_cancel. Find the conditionalOrderId with toss_get_conditional_orders. Nothing reaches the market from this call: it only validates the request and returns a preview plus a confirmation token. Show that preview to the user, obtain explicit approval, then pass the token to toss_submit_prepared_order. The token is single-use and expires 60 seconds after this call.
Inputs: conditionalOrderId (required).
toss_prepare_conditional_order_modifyPrepare conditional order modificationADestructive
Previews a change to an EXISTING conditional order that has not triggered yet — its trigger prices, legs, quantity, or expiry. Every field is replaced, so send the complete intended state rather than only the parts you want changed. The symbol cannot be changed; cancel and create a new order for that. Find the conditionalOrderId with toss_get_conditional_orders (status 'OPEN'). Nothing reaches the market from this call: it only validates the request and returns a preview plus a confirmation token. Show that preview to the user, obtain explicit approval, then pass the token to toss_submit_prepared_order. The token is single-use and expires 60 seconds after this call.
Inputs: type (required), first (required), quantity (required), orderType (required), +3 more.
toss_prepare_orderPrepare stock orderADestructive
Previews a NEW market or limit order to buy or sell one stock immediately. For trigger-based orders use toss_prepare_conditional_order; to change or withdraw an order that already exists use toss_prepare_order_modify or toss_prepare_order_cancel. Nothing reaches the market from this call: it only validates the request and returns a preview plus a confirmation token. Show that preview to the user, obtain explicit approval, then pass the token to toss_submit_prepared_order. The token is single-use and expires 60 seconds after this call.
Inputs: side (required), symbol (required), orderType (required), price, +3 more.
toss_prepare_order_cancelPrepare order cancellationADestructive
Previews the withdrawal of an EXISTING open regular order so that none of its remaining quantity can fill. Already-executed shares are unaffected — cancelling never reverses a fill. Find the orderId with toss_get_orders (status 'OPEN'). Use toss_prepare_conditional_order_cancel for conditional orders. Nothing reaches the market from this call: it only validates the request and returns a preview plus a confirmation token. Show that preview to the user, obtain explicit approval, then pass the token to toss_submit_prepared_order. The token is single-use and expires 60 seconds after this call.
Inputs: orderId (required).
toss_prepare_order_modifyPrepare order modificationADestructive
Previews a change to an EXISTING open regular order — its quantity, price, or order type. The order keeps its identity; only the listed fields change. Find the orderId with toss_get_orders (status 'OPEN'). Use toss_prepare_conditional_order_modify for conditional orders. Nothing reaches the market from this call: it only validates the request and returns a preview plus a confirmation token. Show that preview to the user, obtain explicit approval, then pass the token to toss_submit_prepared_order. The token is single-use and expires 60 seconds after this call.
Inputs: orderId (required), orderType (required), price, quantity.
toss_resolve_symbolResolve a company name to a symbolARead-only
Finds the Toss Securities symbol for a company name or ticker, e.g. '삼성전자' -> 005930. When exact is false the query matched several candidates — ask the user which one instead of picking one yourself.
Inputs: query (required).
toss_submit_prepared_orderSubmit confirmed prepared orderADestructive
Places the previously prepared order. Call only after the user has explicitly confirmed the exact preview in this conversation. The confirmation token is single-use and expires after 60 seconds.
Inputs: userConfirmed (required), confirmationToken (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Each tool targets a distinct resource or action, with clear descriptions separating singular/plural pairs (e.g., toss_get_order vs toss_get_orders) and stock vs market indicator variants. No two tools appear to overlap in purpose.
All tools follow a consistent toss_<verb>_<noun> pattern in snake_case, with verbs like get, prepare, submit, and resolve. The prepare family is uniformly named (prepare_order, prepare_conditional_order, etc.), making the set predictable.
At 29 tools, the set exceeds the 25-tool threshold for 'too many.' While the domain is broad, several tools could be consolidated (e.g., singular/plural getters, separate indicator tools), making the surface feel heavier than necessary.
The tool surface covers the full lifecycle of trading: market data, account positions, order placement (regular and conditional), order modification/cancellation, and auxiliary data like commissions and market calendar. No obvious gaps for a stock trading MCP.
Maintenance
Related MCP Connectors
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Read-only MCP server for Sidechair. Your assistant reads your lessons, price bars and watchlist.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Official Intrinio MCP server. US stock prices, options and fundamentals for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server wrapping Toss Securities Open API, enabling stock price queries and trading for Korean and US stocks via natural language.3623 npmMIT
- AlicenseCqualityCmaintenanceSafe-by-default MCP server for the official Toss Securities Open API, providing read-only market and account data with optional order operations protected by multiple safety gates.272MIT
- AlicenseAqualityDmaintenanceSelf-hosted MCP server that wraps the Toss Securities Open API, enabling natural language queries for account balances, holdings, transactions, and stock prices via Claude.4MIT
- AlicenseNot gradedqualityBmaintenanceRead-only MCP server that connects LLMs to personal investment accounts (Toss Securities, KIS), market data, SEC filings, and Binance futures for context-aware investment responses.1MIT