
A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

An unofficial MCP server that exposes Korea Investment & Securities REST APIs as MCP tools for stock lookup, account inquiry, and order-related calls.
KIS REST API MCP Server is cataloged as an MCP server attributed to migusdn. An unofficial MCP server that exposes Korea Investment & Securities REST APIs as MCP tools for stock lookup, account inquiry, and order-related calls. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for KIS REST API MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
README.md · 595d5d1cdbbe · Fetched 2026-11-13 09:54:02 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
한국투자증권(KIS) REST API를 MCP 도구로 호출하는 서버입니다. 국내/해외 주식 조회, 계좌 조회, 주문 관련 API를 카탈로그 기반 범용 도구와 자주 쓰는 편의 도구로 제공합니다.
이 프로젝트는 개인/커뮤니티가 운영하는 비공식 오픈소스 프로젝트이며 한국투자증권, KIS Developers, true friend 한국투자 Open API와 제휴·후원·승인·공식 배포 관계가 없습니다. 본 프로젝트의 설치, 설정, API 호출, 계좌 조회, 주문 실행, 투자 판단 및 그 결과로 발생하는 손실·장애·보안 문제 등 사용상의 모든 책임은 사용자에게 있습니다. 실제 거래 전 한국투자증권 공식 문서와 입력값을 직접 확인하세요.
API_CATALOG.mdstdio, sse, streamable-http transport 지원.env 또는 명령줄 인자 기반 설정주문/정정/취소처럼 계좌 상태를 바꾸는 API는 기본적으로 차단됩니다.
KIS_ENABLE_TRADING=true
위 값을 명시적으로 설정한 경우에만 상태 변경 API가 실행됩니다. 조회 API만 사용하는 경우에는 설정하지 마세요.
설치는 INSTALL.md를 기준으로 진행하세요. LLM이나 MCP 클라이언트가 설정할 때도 이 파일을 우선 읽으면 됩니다.
INSTALL.md에는 다음 내용이 포함되어 있습니다.
uv 기반 의존성 설치.env 생성과 KIS_APP_KEY, KIS_APP_SECRET, KIS_CANO, KIS_ACNT_PRDT_CD 설정KIS_MCP_TOOLSET=catalog 설정call-kis-api 예시빠른 로컬 준비:
pip install uv
uv sync
cp .env.example .env
chmod 600 .env
그 다음 .env에 아래 값을 설정합니다. 자세한 값 설명과 클라이언트별 등록 명령은 INSTALL.md를 참고하세요.
KIS_APP_KEY="발급받은 앱키"
KIS_APP_SECRET="발급받은 시크릿키"
KIS_ACCOUNT_TYPE="REAL" # REAL 또는 VIRTUAL
KIS_CANO="계좌번호 앞 8자리"
KIS_ACNT_PRDT_CD="01"
KIS_MCP_TOOLSET="catalog"
# stdio, 로컬 MCP 클라이언트 권장
uv run python server.py
명령줄 인자로도 설정할 수 있습니다.
uv run python server.py \
--app-key "앱키" \
--app-secret "시크릿키" \
--account-type "REAL" \
--cano "계좌번호" \
--acnt-prdt-cd "01"
Transport 선택:
MCP_TYPE=stdio uv run python server.py
MCP_TYPE=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8000 MCP_PATH=/mcp uv run python server.py
MCP_TYPE=sse MCP_HOST=127.0.0.1 MCP_PORT=8000 MCP_PATH=/sse uv run python server.py
MCP 클라이언트 등록 예시:
아래는 일반 MCP 클라이언트용 최소 예시입니다. Codex CLI, Claude Code, Claude Desktop 명령은 INSTALL.md를 사용하세요.
{
"mcpServers": {
"kis-mcp-server": {
"command": "uv",
"args": ["run", "python", "server.py"],
"cwd": "<project-root>",
"env": {
"KIS_MCP_TOOLSET": "catalog",
"KIS_MCP_LOG_LEVEL": "WARNING"
}
}
}
}
| 도구 | 설명 |
|---|---|
list-kis-api-specs | API 그룹/검색어 기준 목록 조회 |
get-kis-api-spec | 단일 API의 경로, TR_ID 후보, 파라미터 확인 |
call-kis-api | group, api_type, params로 카탈로그 API 호출 |
list-kis-api-specs는 필수 파라미터의 라벨, 예시값, 주요 코드값을 함께 반환합니다.
get-kis-api-spec는 전체 파라미터의 label, guide, examples, values, default, auto_fill 정보를 반환하므로 LLM이 호출에 필요한 입력 형태를 바로 확인할 수 있습니다.
call-kis-api는 다음 처리를 공통으로 수행합니다.
params를 JSON 문자열로 보낼 때 객체로 파싱자주 쓰는 국내/해외 주식 기능은 별도 MCP 도구로도 제공합니다.
| 도구 | 설명 |
|---|---|
inquery-stock-price | 국내주식 현재가 조회 |
inquery-balance | 국내주식 잔고 조회 |
inquery-order-list | 국내주식 일별 주문/체결 조회 |
inquery-order-detail | 국내주식 주문 상세 조회 |
inquery-stock-info | 국내주식 일별 시세 조회 |
inquery-stock-history | 국내주식 기간 시세 조회 |
inquery-stock-ask | 국내주식 호가 조회 |
inquery-stock-market | 국내 업종/지수 현재가 조회 |
inquery-stock-basic-info | 국내주식 기본정보 조회 |
inquery-overseas-stock-price | 해외주식 현재가 조회 |
order-stock | 국내주식 매수/매도 주문 |
order-overseas-stock | 해외주식 매수/매도 주문 |
주문 도구도 KIS_ENABLE_TRADING=true가 없으면 실행되지 않습니다.
MCP 클라이언트는 서버 연결 시 도구 이름, 설명, 입력 스키마를 컨텍스트에 올립니다. 편의 도구를 많이 노출할수록 대화 시작 시점의 컨텍스트 사용량이 늘어나므로, 필요한 경우 카탈로그 도구 3개만 노출하는 경량 모드를 사용할 수 있습니다.
KIS_MCP_TOOLSET=catalog uv run python server.py
| 값 | 노출 도구 수 | 노출 도구 | 용도 |
|---|---|---|---|
full | 15개 | 카탈로그 도구 + 편의 도구 전체 | 기존 동작과 호환 |
catalog | 3개 | list-kis-api-specs, get-kis-api-spec, call-kis-api | 낮은 컨텍스트 사용량 |
catalog 모드는 MCP 도구 스키마 로드량을 줄이기 위한 모드입니다. 편의 도구는 숨기지만, 166개 API는 그대로 call-kis-api로 호출할 수 있습니다. 필요한 API는 list-kis-api-specs로 찾고, 필요한 상세 파라미터는 get-kis-api-spec로 그때그때 조회하면 됩니다.
권장 사용 흐름:
list-kis-api-specs로 API를 검색합니다.get-kis-api-spec로 필수 파라미터, 예시값, 코드값을 확인합니다.call-kis-api로 실제 API를 호출합니다.MCP 클라이언트 설정에서도 환경변수만 추가하면 됩니다.
{
"env": {
"KIS_MCP_TOOLSET": "catalog"
}
}
자주 쓰는 편의 도구를 도구 목록에 직접 노출하고 싶으면 기본값인 full을 사용하세요.
call-kis-api 예시국내주식 현재가:
{
"group": "domestic_stock",
"api_type": "inquire_price",
"params": {
"fid_cond_mrkt_div_code": "J",
"fid_input_iscd": "005930"
}
}
해외주식 잔고:
{
"group": "overseas_stock",
"api_type": "inquire_balance",
"params": {
"ovrs_excg_cd": "NASD",
"tr_crcy_cd": "USD"
}
}
해외주식 체결기준 현재잔고:
{
"group": "overseas_stock",
"api_type": "inquire_present_balance",
"params": {
"wcrc_frcr_dvsn_cd": "01",
"natn_cd": "000",
"tr_mket_cd": "00",
"inqr_dvsn_cd": "00"
}
}
해외주식 매수가능금액:
{
"group": "overseas_stock",
"api_type": "inquire_psamount",
"params": {
"ovrs_excg_cd": "NASD",
"ovrs_ord_unpr": "1",
"item_cd": "QQQ"
}
}
| 그룹 | 설명 | API 수 |
|---|---|---|
auth | 인증 | 2 |
domestic_stock | 국내주식 | 74 |
overseas_stock | 해외주식 | 34 |
domestic_bond | 국내채권 | 14 |
domestic_futureoption | 국내선물옵션 | 20 |
overseas_futureoption | 해외선물옵션 | 19 |
elw | ELW | 1 |
etfetn | ETF/ETN | 2 |
전체 API ID, 경로, TR_ID, 필수 파라미터 가이드는 API_CATALOG.md에 정리되어 있습니다.
| 이름 | 설명 | 기본값 |
|---|---|---|
KIS_APP_KEY | KIS 앱키 | - |
KIS_APP_SECRET | KIS 시크릿키 | - |
KIS_ACCOUNT_TYPE | REAL 또는 VIRTUAL | - |
KIS_CANO | 계좌번호 앞 8자리 | - |
KIS_ACNT_PRDT_CD | 계좌상품코드 | 01 |
KIS_TOKEN_FILE | 토큰 캐시 파일 | token.json |
KIS_ENABLE_TRADING | 주문/정정/취소 API 활성화 | 비활성 |
KIS_MCP_TOOLSET | MCP 도구 노출 범위 (full, catalog) | full |
KIS_MCP_LOG_LEVEL | 로그 레벨 | INFO |
MCP_TYPE | stdio, sse, streamable-http | stdio |
MCP_HOST | HTTP/SSE host | 127.0.0.1 |
MCP_PORT | HTTP/SSE port | 8000 |
MCP_PATH | HTTP/SSE path | /mcp |
uv run python -m compileall main.py server.py example.py tests
uv run python -m unittest discover -v
git diff --check
AI 공동작성자는 기여자 목록에서 제외했습니다.
| Contributor | Role |
|---|---|
| migusdn | Maintainer |
| mickeykim70 | Contributor |
| haesam5060-arch | Contributor |
MIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for KIS REST API MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/kis_mcp_server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.