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.3.0.tar.gz (80.1 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.3.0-py3-none-any.whl (70.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tossinvest_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 80.1 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.3.0.tar.gz
Algorithm Hash digest
SHA256 b16047f6d407ead637d21537a040a2a4ce717532ddb59ca433349134d33f3f8a
MD5 5e901557f11850e53ae0f21ab695942f
BLAKE2b-256 d2358c9c8efbeb4f91529ce4d84425d7ec7479c4cbe301673185d9639d332351

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tossinvest_mcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 70.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3607a37f23c0f15148df491bf0d85e3b0c4fed7d6d0c04181d4abf51094ba39
MD5 d26e4426585ec2bc2624798f3f4592d1
BLAKE2b-256 34267f509962e282c5cf8b568b90ff24c1897038203302f7fea66a7016a5ad17

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