tossinvest-mcp

tossinvest-mcp

A read-only MCP server for Toss Securities Open API that enables AI assistants to retrieve stock prices, resolve symbols, check holdings, buying power, exchange rates, and OHLCV candles without placing orders.

Category
Visit Server

README

tossinvest-mcp

English

토스증권 Open API를 위한 Model Context Protocol (MCP) 서버입니다. 시세·계좌 조회와 함께, 사용자 확인을 거친 주식·조건주문 기능을 제공합니다.

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 이상이 필요합니다.

제공 도구

도구 설명
toss_get_price 한국·미국 주식의 현재가 조회
toss_resolve_symbol 회사 이름을 티커 또는 국내 종목 코드로 변환
toss_get_holdings 보유 종목과 손익 조회
toss_get_buying_power 원화 또는 달러 주문 가능 금액 조회
toss_get_exchange_rate 환율 조회 (기본: USD → KRW)
toss_get_candles 1분봉 또는 일봉 OHLCV 조회
toss_get_orderbook / toss_get_recent_trades 실시간 호가와 최근 체결 조회
toss_get_market_calendar 한국·미국 장 운영 시간 및 휴장일 조회
toss_get_stock_warnings 투자 유의사항·거래 경고 조회
toss_get_stock_investor_trading / toss_get_short_selling 국내 종목 투자자 수급·공매도 동향 조회
toss_get_rankings 거래대금·거래량·상승·하락 종목 랭킹 조회
toss_get_market_indicator_prices / toss_get_market_indicator_candles 지수·시장 지표의 현재가와 캔들 조회
toss_get_market_investor_trading 코스피·코스닥 투자자별 매매대금 조회
toss_prepare_order 주식 주문을 검증·미리보기만 함 (실주문 없음)
toss_prepare_conditional_order SINGLE·OCO·OTO 조건주문을 검증·미리보기
toss_submit_prepared_order 사용자 확인을 거친 일회용 주문을 제출

주문 안전 절차

주문은 항상 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회입니다.

면책 사항

이 프로젝트는 토스증권과 무관한 비공식 도구이며 투자 조언을 제공하지 않습니다. 사용에 따른 책임은 사용자에게 있습니다.

라이선스

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured