Skip to main content

토스증권 Open API용 MCP 서버

Project description

토스증권 MCP

토스증권 Open API를 MCP 도구로 노출하는 서버입니다. Claude 같은 AI 에이전트가 토스증권의 시세 조회·보유 종목·주문 기능을 도구로 사용할 수 있습니다.

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

할 수 있는 일

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

빠른 시작

  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를 유지하고, 수정한 파일에는 변경 사실을 명시해야 합니다(출처 표시 의무).

Project details


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.2.0.tar.gz (72.7 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.2.0-py3-none-any.whl (66.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tossinvest_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 72.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","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.2.0.tar.gz
Algorithm Hash digest
SHA256 6ba4e0597db36921d639ec6b19792fb8712c906cb219543dbdd7911f34c4ce28
MD5 c81b945a2fc596fbcbdb106219ee99db
BLAKE2b-256 d7fdc3df54d3bda0bf1ef899dad3f121b1d7f54b638b4f752f6877f117c469ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tossinvest_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 66.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27f1f7a2c9f029e97ff741059f700267d1760ee85177f706f2ea52f22e4a803a
MD5 58d4221a1b1be23d71409df322f3db26
BLAKE2b-256 53fa54d559fdbdf6c657a0c013938705e40083936b70d74dd4d5e36d48eca514

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page