Skip to main content

토스증권 MCP

PyPI Python License CI

토스증권 Open API를 MCP 도구로 노출하는 서버입니다. Claude 같은 AI 에이전트가 한국 주식(KRX) 시세/보유 종목/주문/기술적 분석을 도구로 사용할 수 있습니다.

English: MCP server exposing the Toss Securities (토스증권) Open API as tools for Claude and other AI agents. Covers Korean stock market (KRX) quotes, holdings, order execution, conditional orders (SINGLE/OCO/OTO), market rankings, index indicators, and a session-aware technical-analysis dashboard (MACD/RSI/Bollinger/VWAP). Read-only by default; opt-in trading. (Korean docs below.)

실거래 경고: 주문 실행 툴은 실제 주문/실자금을 발생시킵니다. 기본값은 읽기 전용이며, TOSS_ENABLE_TRADING=true일 때만 주문 실행 툴이 켜집니다.

할 수 있는 일

  • 시세: 현재가, 호가, 체결 내역, 캔들 차트, 상/하한가
  • 종목/시장: 종목 정보, 매수 유의사항, 환율, 국내/해외 장 운영시간
  • 랭킹/지표: 거래대금/거래량/등락률 랭킹, 시장 지표(국내 지수·국채 시세/캔들/투자자별 매매대금)
  • 기술적 분석: 지표 대시보드(이동평균/MACD/RSI/볼린저밴드/ATR/OBV/MFI 등), 장중 VWAP, 호재/악재 데이터 신호
  • 계좌/조회: 계좌 목록, 보유 종목, 주문·조건주문 내역, 매수 가능 금액, 매도 가능 수량, 수수료
  • 주문 실행 (거래 활성화 시): 주문 생성/정정/취소, 조건주문 등록/수정/취소 (단일·OCO·OTO)
  • 워크플로 프롬프트: 포트폴리오 분석, 차트 분석, 매수 전 체크리스트 등 바로 쓰는 분석 템플릿

빠른 시작

  1. 토스증권 OpenAPI 콘솔에서 client_id/client_secret 발급
  2. 설정 후 실행:
cp .env.example .env   # 발급받은 키 입력
uv sync
uv run tossinvest-mcp

설정할 수 있는 모든 값은 .env.example에 정리되어 있습니다.

Claude Code에 등록

추천: uvx (설치/클론 없이 어디서나)

uvx로 바로 실행할 수 있습니다. 자격증명은 --env로 전달하므로 .env 파일이 필요 없습니다:

claude mcp add tossinvest \
  --env TOSS_CLIENT_ID=발급받은_CLIENT_ID \
  --env TOSS_CLIENT_SECRET=발급받은_CLIENT_SECRET \
  -- uvx tossinvest-mcp

주문 실행까지 쓰려면 --env TOSS_ENABLE_TRADING=true를 추가하세요.

로컬 체크아웃 (개발용)

저장소를 클론해 수정하며 쓸 때. 자격증명은 .env로 설정합니다:

claude mcp add tossinvest -- uv --directory /path/to/tossinvest-mcp run tossinvest-mcp

거래 활성화

기본은 안전하게 읽기 전용입니다. 주문 실행까지 쓰려면 .env에 추가하세요:

TOSS_ENABLE_TRADING=true

AI가 직접 실주문을 낼 수 있으니 신뢰할 수 있는 환경에서만 켜세요.

테스트

uv run pytest -m "not e2e"

라이선스

Apache-2.0

NOTICE

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tossinvest_mcp-0.4.1.tar.gz (95.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tossinvest_mcp-0.4.1-py3-none-any.whl (85.7 kB view details)

Uploaded Python 3

File details

Details for the file tossinvest_mcp-0.4.1.tar.gz.

File metadata

  • Download URL: tossinvest_mcp-0.4.1.tar.gz
  • Upload date:
  • Size: 95.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tossinvest_mcp-0.4.1.tar.gz
Algorithm Hash digest
SHA256 59bc6d175d120542dd1759b4fd764d96f48ca6edd32fc99ff5f490f0c81a7e8f
MD5 62e32f544bd92f112542a6ae8ea2c9cb
BLAKE2b-256 4d5996ae4f1337f91bbb767dcff614074471580c64efae18c323f29fac68fc64

See more details on using hashes here.

File details

Details for the file tossinvest_mcp-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: tossinvest_mcp-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 85.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tossinvest_mcp-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70d983fb41900745f92b46384f24ce17596e25c6806050dbcaa4a9dd73bfab72
MD5 ddd0a5a3a49ccd98cd15924d50dd2467
BLAKE2b-256 d60ff30d6ea2a3b3f442f9a39ce49c10c2983381d286a1a682b3b5a5bff0c17c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page