Atlas / MCP servers / unohee / Kis Agent

Kis AgentSAFE

mcp/unohee/kis-agent

한국투자증권 OpenAPI Python 래퍼 — CLI · Python SDK · LLM Agent · 실시간 WebSocket. 문서: unohee.github.io/kis-agent

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
125 105r · 19w · 1d
Transport
—
License
—
Stars
52
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

한국투자증권 OpenAPI Python 래퍼 - Korea Investment & Securities Trading API Client

pip install kis-agent

[](https://pypi.org/project/kis-agent/) [](https://pypi.org/project/kis-agent/) [](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](https://unohee.github.io/kis-agent/)

📖 공식 문서: [unohee.github.io/kis-agent](https://unohee.github.io/kis-agent/) — 설치, 빠른 시작, 모의투자, CLI · Python API 레퍼런스, LLM Agent · MCP 연동, 아키텍처 가이드.

CLI

pip install kis-agent 하면 kis 명령이 바로 설치됩니다.

kis price 005930                    # 삼성전자 현재가
kis price 005930 --daily --days 5   # 일별 시세 5일

kis overseas NAS AAPL               # AAPL 시세
kis overseas NAS AAPL --detail      # PER/PBR/시총 포함

kis balance --holdings              # 계좌 잔고 + 보유종목
kis orderbook 005930                # 호가 10호가
kis futures 101S03                  # 선물 시세

kis order twap 005930 --side buy --qty 1000 --duration 30   # 30분 균등 분할 매수
kis order vwap 005930 --side buy --qty 1000 --duration 120  # 거래량 비례 분할 매수
kis order twap 005930 --side buy --qty 1000 --dry-run       # 스케줄만 확인

kis trades                          # 당일 체결내역
kis trades --from 7d --pretty       # 최근 7일 (사람 읽기용)
kis trades --from 30d --sell        # 최근 30일 매도만
kis trades --from 3m --profit       # 기간별 실현손익

kis query stock get_stock_price code=005930  # API 직접 호출
kis schema Stock                    # 타입 스키마 (LLM introspection)
  • JSON 출력 (LLM 파싱 최적화), --pretty로 사람 읽기용
  • 한투 필드명 자동 변환: stck_prpr → currentPrice, prdy_ctrt → changeRate
  • 휴장일/장외 시간 자동 감지 — 직전 영업일 기준 데이터 안내

주요 특징

  • **CLI 도구
Read from source at commit a0932a6cb917OBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add kis-agent --env KIS_APP_KEY=${KIS_APP_KEY} --env KIS_APP_SECRET=${KIS_APP_SECRET} --env KIS_SECRET=${KIS_SECRET} --env KIS_TOKEN_PATH=${KIS_TOKEN_PATH} -- uvx kis-agent
claude-desktop
{
  "mcpServers": {
    "kis-agent": {
      "command": "uvx",
      "args": [
        "kis-agent"
      ],
      "env": {
        "KIS_APP_KEY": "${KIS_APP_KEY}",
        "KIS_APP_SECRET": "${KIS_APP_SECRET}",
        "KIS_SECRET": "${KIS_SECRET}",
        "KIS_TOKEN_PATH": "${KIS_TOKEN_PATH}"
      }
    }
  }
}
03

Exposed tools (125)

105 read · 19 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
account_queryread계좌 정보 통합 조회
analyze_broker_accumulationread특정 증권사의 기간별 매집 종목 분석
analyze_foreign_institutional_flowread외국인/기관 동시 순매수 종목 분석
analyze_market_breadthread시장 폭(Market Breadth) 분석
broker_tradingread증권사 매매동향 통합 조회
calculate_support_resistanceread지지/저항선 계산
data_managementread데이터 관리 통합
derivativesread파생상품 조회
detect_volume_spikeread거래량 급등 종목 탐지
enable_adaptive_rate_limitingwrite적응형 Rate Limiting 활성화/비활성화
fetch_minute_dataread4일간 분봉 데이터 수집
find_price_momentumread가격 모멘텀 종목 탐색
get_account_balanceread계좌 잔고 조회
get_account_order_quantitywrite계좌별 주문 가능 수량 조회
get_all_methodsreadAgent의 모든 공개 메서드 조회
get_asking_price_exp_ccnread호가예상체결 조회
get_condition_stocksread조건검색식 종목 조회
get_daily_credit_balanceread신용잔고 일별추이 조회
get_daily_minute_priceread특정일 전체 분봉 데이터 조회 (내부 페이지네이션)
get_daily_priceread국내주식 기간별 시세 조회 (일봉 데이터)
get_fluctuation_rankread등락률 순위 상세 조회
get_foreign_broker_net_buyread외국인/기관 순매수 조회
get_frgnmem_pchs_trendread외국인 매수 추세 조회
get_frgnmem_trade_estimateread외국인 매매 추정 조회
get_frgnmem_trade_trendread외국인 매매 추세 조회
get_future_option_pricereadKOSPI200 선물옵션 가격 조회
get_holiday_inforead휴장일 정보 조회
get_index_daily_priceread지수 일봉 데이터 조회
get_index_minute_dataread지수 분봉 데이터 조회
get_interest_group_listread관심종목 그룹 목록 조회
get_interest_stock_listread관심종목 그룹별 종목 조회
get_intraday_priceread주식 당일 분봉 데이터 조회 (전체)
get_investor_daily_by_marketread시장별 투자자 일별 매매동향
get_investor_program_trade_todayread당일 투자자 프로그램 매매 조회
get_investor_time_by_marketread시장별 투자자 시간대별 매매동향
get_investor_trade_by_stock_dailyread종목별 투자자 일별 매매동향 조회
get_investor_trend_estimateread투자자별 추정 동향 조회
get_kospi200_futures_codereadKOSPI200 선물 종목코드 조회
get_market_fluctuationread시장 등락 현황 조회
get_market_rankingsread시장 순위 조회
get_memberread회원사 정보 조회
get_member_transactionread증권사 기간별 거래
get_minute_priceread[DEPRECATED] 분봉 데이터 조회 - get_intraday_price 또는 get_daily_minute_price 사용 권장
get_orderbook_rawread호가 조회
get_pbar_tratioread매수매도비율 조회
get_possible_order_amountwrite주문 가능 금액/수량 조회
get_program_trade_by_stockread종목별 프로그램 매매
get_program_trade_daily_summaryread프로그램 매매 일별 요약
get_program_trade_hourly_trendread프로그램 매매 시간대별 추세
get_program_trade_market_dailyread시장 프로그램 매매
get_program_trade_period_detailread프로그램 매매 기간 상세
get_rate_limiter_statusreadRate Limiter 상태 조회
get_stock_basicread종목 기본 조회
get_stock_ccnlread주식 체결 조회
get_stock_financialread종목 재무정보 조회
get_stock_inforead종목 기본정보 조회
get_stock_investorread종목별 투자자 매매동향
get_stock_memberread증권사별 매매동향
get_stock_priceread주식 현재가 조회
get_tool_registryread사용 가능한 도구 목록과 관계 조회
get_top_gainersread등락률 순위 조회
get_total_assetread총자산 조회
get_volume_powerread거래량 순위 조회
get_volume_power_rankread체결강도 순위 조회
get_volume_rankread거래량 순위 조회
index_dataread지수 데이터 통합 조회
init_minute_dbread분봉 데이터베이스 초기화
inquire_balance_rlz_plread잔고 평가 및 실현 손익 조회
inquire_ccnlread주식 체결 정보 조회
inquire_credit_order_psblwrite신용주문가능조회
inquire_credit_psamountread신용 거래 가능 금액 조회
inquire_daily_ccldread일자별 체결 내역 조회
inquire_daily_overtimepriceread시간외 일별 시세 조회
inquire_daily_priceread주식현재가 일자별 조회 (최근 30일/주/월)
inquire_elw_pricereadELW 시세 조회
inquire_index_category_priceread업종별 지수 조회
inquire_index_priceread지수 현재가 조회
inquire_index_tickpriceread지수 틱 데이터 조회
inquire_index_timepriceread지수 시간별 데이터 조회
inquire_intgr_marginread증거금 조회
inquire_minute_priceread분봉시세조회 - 하루 전체 분봉 데이터 조회
inquire_order_psblwrite주문가능조회 (상세)
inquire_overtime_asking_priceread시간외 호가 조회
inquire_overtime_priceread시간외 현재가 조회
inquire_period_rightsread기간별 권리 조회
inquire_period_trade_profitread기간별 매매 손익 조회
inquire_priceread주식 현재가 상세 조회
inquire_price_2read주식 현재가 상세 조회 2
inquire_psbl_orderwrite주문가능조회
inquire_psbl_rvsecnclread정정취소가능조회
inquire_psbl_sellread매도 가능 수량 조회
inquire_time_itemconclusionread주식 시간별 체결 조회
inquire_vi_statusreadVI 발동 상태 조회
interest_stocksread관심종목/조건검색 조회
investor_flowread투자자 매매동향 통합 조회
is_holidayread특정일 휴장일 여부 확인
market_rankingread시장 순위 통합 조회
method_discoveryreadAgent 메서드 탐색 통합
migrate_minute_csv_to_dbreadCSV 데이터를 데이터베이스로 마이그레이션
order_cashwrite현금 매수
order_cash_sorwrite시장가 매수
order_credit_buywrite신용 매수
order_credit_sellwrite신용 매도
order_executewrite주문 실행 통합
order_managewrite주문 관리 통합 (정정/취소/예약)
order_resvwrite예약 주문
order_resv_ccnlwrite예약 주문 전체 취소
order_resv_rvsecnclwrite예약 주문 정정/취소
order_rvsecnclwrite주문 정정/취소
order_stock_cashwrite현금 주문 (매수/매도)
order_stock_creditwrite신용 주문 (매수/매도)
overtime_tradingread시간외 거래 통합 조회
plan_query_executionread사용자 쿼리를 분석하여 실행 계획 생성
program_tradingread프로그램 매매 통합 조회
rate_limiterreadRate Limiter 관리 통합
reset_rate_limiterdestructiveRate Limiter 상태 초기화
search_methodsreadAgent 메서드 검색
search_stockread종목 검색 (종목코드 또는 종목명으로 검색)
set_rate_limitswriteRate Limiter 제한 값 설정
show_method_usageread특정 메서드의 상세 사용법 조회
stock_chartread주식 차트 데이터 통합 조회
stock_inforead종목 정보 통합 조회
stock_quoteread주식 시세/호가/체결 통합 조회
suggest_tool_combinationread목표 달성을 위한 도구 조합 제안
utilityread유틸리티 기능 통합
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (4 observation(s))
Network
none-observed
Shell
declared (3 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (13)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
reset_rate_limiter
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.hidden_file · CWE-1104
.cxtignore
.cxtignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.flake8
.flake8
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.openswarm-preserved
.openswarm-preserved
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
pykis-mcp-server/.mcp.json.example
.mcp.json.example
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInformation disclosure · disclose.log_secret · CWE-209, CWE-532
tests/unit/test_client.py:655
print(f"토큰 발급 성공: {self.client.token[:20]}...")
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
kis_agent/websocket/client.py:856
unpad(cipher.decrypt(b64decode(cipher_text)), AES.block_size)
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
kis_agent/websocket/data_processor.py:84
key = b64decode(header["tr_key"])
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
kis_agent/websocket/data_processor.py:85
iv = b64decode(header.get("tr_iv", ""))
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
kis_agent/websocket/ws_agent.py:680
unpad(cipher.decrypt(b64decode(cipher_text)), AES.block_size)
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
pykis-mcp-server/requirements-dev.txt
pytest, pytest-asyncio, pytest-cov, pytest-mock, ruff, black, mypy, isort
Why it matters. 9 requirement(s) not pinned with ==
Fix. pin exact versions
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
pykis-mcp-server/requirements.txt
mcp, python-dotenv, pykis
Why it matters. 3 requirement(s) not pinned with ==
Fix. pin exact versions
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
requests, pandas, pytz, python-dotenv, pycryptodome
Why it matters. 5 requirement(s) not pinned with ==
Fix. pin exact versions

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha a0932a6cb917full audit observations/trust-audit/mcp-server/unohee__kis-agent.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-08a0932a6cb917SAFEB89first audit
06

Questions

What is the Kis Agent MCP server?

한국투자증권 OpenAPI Python 래퍼 — CLI · Python SDK · LLM Agent · 실시간 WebSocket. 문서: unohee.github.io/kis-agent

What tools does Kis Agent expose?

125 in total: 105 read-only, 19 that write, and 1 that can delete or overwrite (reset_rate_limiter). Every one is listed on this page with its risk.

Is Kis Agent safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does Kis Agent need?

It reads KIS_APP_KEY, KIS_APP_SECRET, KIS_SECRET and KIS_TOKEN_PATH from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How current is this page?

The grade is for one exact copy of the source (a0932a6cb917), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement