Schwab 모델 컨텍스트 프로토콜 서버
이는 schwab-py 와 MCP python-sdk를 사용하여 Schwab API에 대한 MCP(Model Context Protocol)를 구현하는 서버입니다.
특징
- 모델 컨텍스트 프로토콜을 통해 Schwab API 기능 노출
- 계정 정보 및 위치 가져오기
- 주식 시세 및 가격 내역 검색
- 시장 정보와 동향을 알아보세요
- 옵션 체인 및 만료 데이터 가져오기
- 주문 및 거래 내역 접근
- 특수 도구를 사용하여 계정 상태 수정(
--jesus-take-the-wheel
플래그 필요) - 대규모 언어 모델(LLM)과 통합되도록 설계되었습니다.
설치
지엑스피1
용법
입증
첫 번째 단계는 Schwab API로 인증하고 토큰을 생성하는 것입니다.
환경 변수를 통해 이러한 자격 증명을 설정하면 매번 입력할 필요가 없습니다.
SCHWAB_CLIENT_ID
SCHWAB_CLIENT_SECRET
SCHWAB_CALLBACK_URL
(기본값은 https://127.0.0.1:8182 )
기본적으로 토큰은 ~/.local/share/schwab-mcp/token.yaml
(플랫폼별로 다름)에 저장됩니다. 다른 경로를 지정할 수도 있습니다.
yaml과 json 토큰 형식이 모두 지원되며 파일 확장자에서 추론됩니다.
서버 실행
인증 후 서버를 실행할 수 있습니다.
토큰 연령이 검증되었습니다. 5일이 지나면 재인증하라는 메시지가 표시됩니다.
경고 :
--jesus-take-the-wheel
플래그를 사용하면 계정 상태를 수정할 수 있는 도구가 활성화됩니다. LLM이 주문을 취소하고 계정 상태를 변경하는 다른 작업을 수행할 수 있으므로 주의해서 사용해야 합니다.
사용 가능한 도구
서버는 다음과 같은 MCP 도구를 제공합니다.
날짜 및 시장 정보
get_datetime
- ISO 형식으로 현재 날짜/시간을 가져옵니다.get_market_hours
- 특정 시장의 시장 시간을 가져옵니다get_movers
- 특정 인덱스에 대한 이동자 가져오기get_instruments
- 특정 기호가 있는 악기 검색
계정 정보
get_account_numbers
- 계정 ID를 계정 해시에 매핑합니다.get_accounts
- 연결된 모든 Schwab 계정에 대한 정보를 가져옵니다.get_accounts_with_positions
- 포지션 정보가 있는 계정 가져오기get_account
- 특정 계정에 대한 정보 가져오기get_account_with_positions
- 포지션 정보가 포함된 특정 계정 가져오기get_user_preferences
- 별명을 포함한 모든 계정에 대한 사용자 기본 설정을 가져옵니다.
명령
get_order
- 특정 주문에 대한 세부 정보 가져오기get_orders
- 특정 계정에 대한 주문 가져오기
인용 부호
get_quotes
- 지정된 기호에 대한 인용문을 가져옵니다.
가격 내역
get_advanced_price_history
- 특정 심볼에 대한 고급 가격 내역을 가져옵니다.get_price_history_every_minute
- 분 단위 가격 내역 가져오기get_price_history_every_five_minutes
- 5분 간격으로 가격 내역을 가져옵니다.get_price_history_every_ten_minutes
- 10분 간격으로 가격 내역을 가져옵니다.get_price_history_every_fifteen_minutes
- 15분 간격으로 가격 내역을 가져옵니다.get_price_history_every_thirty_minutes
- 30분 간격으로 가격 내역을 가져옵니다.get_price_history_every_day
- 일일 빈도로 가격 내역 가져오기get_price_history_every_week
- 주별 빈도로 가격 내역 가져오기
옵션
get_option_chain
- 특정 심볼에 대한 옵션 체인 가져오기get_advanced_option_chain
- 특정 심볼에 대한 고급 옵션 체인을 가져옵니다.get_option_expiration_chain
- 심볼에 대한 옵션 만료 정보를 가져옵니다.
업무
get_transactions
- 특정 계정에 대한 거래 내역 가져오기get_transaction
- 특정 거래에 대한 세부 정보를 가져옵니다.
계정 수정 도구( --jesus-take-the-wheel
플래그 필요)
cancel_order
- 특정 주문 취소
보안 경고
--jesus-take-the-wheel
플래그를 사용하면 LLM이 다음을 포함하여 계정 상태를 수정할 수 있는 작업을 수행할 수 있습니다.
- 주문 취소
- 재정적 영향을 미칠 수 있는 기타 작업(향후 릴리스에서 추가될 도구)
이 플래그는 통제된 환경에서만 사용하고 관련 위험을 이해하세요.
개발
특허
이 프로젝트는 MIT 라이선스에 따라 제공됩니다.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Schwab API에 대한 모델 컨텍스트 프로토콜을 구현하는 서버로, 대규모 언어 모델과의 통합을 위해 설계되어 계정 정보, 포지션, 주식 시세, 주문/거래 내역에 액세스할 수 있습니다.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with the Tradovate API for managing trading contracts, positions, orders, and accounts.Last updated -JavaScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs like Claude to interact with the Alpaca trading API, allowing for trading stocks, checking positions, fetching market data, and managing accounts through natural language.Last updated -PythonMIT License
MCP TapData Serverofficial
-securityFlicense-qualityA Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.Last updated -Paddle MCP Serverofficial
AsecurityAlicenseAqualityA Model Context Protocol server that provides tools for interacting with the Paddle Billing API, enabling users to manage products, prices, customers, transactions, subscriptions, and create custom financial reports.Last updated -84319TypeScriptApache 2.0