Connector guide8-minute read16 MCP tools7 languages

Connect Korea Investment to Gemini CLI via MCP

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

HCBy HelpCode teamUpdated 8 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Korea Investment & Securities

Korea Investment & Securities

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

tools

16

Region

INTL

Category

Finance

Authentication

Sign-in token

Required env vars

KIS_APP_KEYKIS_APP_SECRET
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Korea Investment & Securities in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

Try asking

Example prompts for Korea Investment & Securities

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Korea Investment & Securities · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Korea Investment & Securities, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Korea Investment & Securities + Gemini

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

KIS_APP_KEY, KIS_APP_SECRET

Step 1 — Get credentials

Setting up takes a few minutes. You need a securities account at Korea Investment & Securities (한국투자증권) and the Open API service of KIS Developers for that account, which gives you an App Key and an App Secret.

Market data only: the connector reads quotes, charts, order books, investor flows, indices and master data. It cannot place, change or cancel orders, and it does not read account balances, positions or deposits. WebSocket streaming, futures and options, and bond trading are not covered either.

  1. Apply for the Open API service at apiportal.koreainvestment.com (KIS Developers, API 신청) and choose your account for real trading (실전투자).
  2. Copy the App Key into KIS_APP_KEY and the App Secret, shown next to it, into KIS_APP_SECRET. The App Key is 20 to 64 letters and digits; the App Secret is a long string of about 180 characters: paste it whole, without spaces or line breaks.
  3. Install the connector. Run korea_investment_get_stock_price with the code 005930 (Samsung Electronics) to check the connection.

Real-trading keys only: mock trading (모의투자) keys work only on the separate KIS host openapivts.koreainvestment.com:29443, which this connector does not use. Reading quotes with real-trading keys places no trades.

Tokens: the connector exchanges the App Key and App Secret for an access token (POST /oauth2/tokenP) and sends it with every call, together with the headers KIS requires. A KIS token lasts 24 hours, and KIS allows about one token request per minute; asking again within 6 hours returns the same token, and KIS may send a KakaoTalk notice for every new token. The connector keeps the token and only asks for a new one shortly before it expires.

Cloud and self-hosted work the same way: both use your own App Key and App Secret. A self-hosted server must be allowed to open outbound connections to openapi.koreainvestment.com on port 9443.

Rate limits and paging: KIS allows about 20 calls per second per account on real-trading keys; EGW00201 means too many calls, so slow down. Chart and history tools return about 100 rows per call and the minute chart up to 30 bars: for older data, call again with an earlier end date or time.

Codes: Korean stocks, ETFs and ETNs use the six-digit short code (005930 Samsung Electronics, 000660 SK hynix, 035420 NAVER, 069500 KODEX 200); ETNs take a Q in front. Quotes come from KRX by default; Nextrade (NXT) or both combined are available on request. Korean indices have four digits: 0001 KOSPI, 1001 KOSDAQ, 2001 KOSPI 200. Foreign stocks need an exchange code and a ticker, e.g. NAS + AAPL, NYS + KO, TSE + 7203, HKS + 00700. Codes for overseas indices, exchange rates, bonds and gold (such as SPX or .DJI) come from the KIS overseas index master file.

Dates, times and prices: dates are YYYYMMDD and times HHMMSS, both in Korean time (KST, UTC+9). Korean prices are in KRW, foreign prices in the local currency. KIS answers with Korean field abbreviations, such as stck_prpr (current price), prdy_vrss (change from the previous close), prdy_ctrt (change rate in percent) and acml_vol (volume).

US quotes may be delayed: real-time US prices need a separate subscription in the KIS app. Without one, US prices are delayed.

Common errors: every answer carries rt_cd (0 means success) with msg_cd and msg1, which say what went wrong. A refused App Key or App Secret (401) usually means a key was copied incompletely or belongs to a mock-trading account. A 403 means the Open API service is not active for the account, the App Key was reissued, or a token was requested less than a minute after the last one: wait a minute and try again. If openapi.koreainvestment.com:9443 cannot be reached, outbound connections to port 9443 are blocked.

What it reads: current quotes of Korean stocks, ETFs and ETNs with change, volume, traded value, price limits, 52-week range, PER, PBR, EPS, BPS, market capitalisation and foreign ownership; daily, weekly, monthly and yearly candles and today's one-minute bars; time-and-sales; the ten-level order book with expected auction prices; net buying by individuals, foreigners and institutions; master data of Korean listed products; the level and history of KOSPI, KOSDAQ, KOSPI 200 and sector indices; quotes, detailed quotes, history, order books and master data of US, Japanese, Hong Kong, Chinese and Vietnamese stocks; candles of overseas indices, exchange rates, government bonds and gold futures.

Read-only: all 16 tools only read market data, so none is switched off at install. Market data is for information only and is not investment advice.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Gemini

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell) — anythingmcp should show as connected.
  4. Start prompting — Gemini CLI can now call the Korea Investment & Securities tools.

Available tools

ToolWhat it does
korea_investment_get_stock_priceCurrent quote of one Korean stock, ETF or ETN: last price (stck_prpr), change and change rate against the previous close (prdy_vrss…
korea_investment_get_daily_pricesLast 30 trading days (or 30 weeks or 30 months) of one Korean stock: per row the date (stck_bsop_date), open, high, low, close, change…
korea_investment_get_price_chartDaily, weekly, monthly or yearly candles (OHLCV) of one Korean stock between two dates, at most 100 candles per call: output1 is the…
korea_investment_get_minute_chartOne-minute candles of one Korean stock for today, up to 30 per call, ending at a given time: output1 is the quote summary, output2 the…
korea_investment_get_orderbookOrder book of one Korean stock: the ten best ask and bid prices with their remaining quantities (askp1..10, bidp1..10, askp_rsqn1..10…
korea_investment_get_trades_by_timeTime-and-sales of one Korean stock today: executions at or before a given time with price, change, volume per print and execution strength…
korea_investment_get_investor_flowsNet buying by investor type for one Korean stock over the recent trading days: individuals (prsn_ntby_qty), foreigners (frgn_ntby_qty) and…
korea_investment_get_stock_infoBasic master data of a Korean listed product: Korean and English names (prdt_name, prdt_eng_name), listing market, sector classification…
korea_investment_get_index_priceCurrent level of a Korean market or sector index: index value (bstp_nmix_prpr), change and change rate, open, high, low, volume and traded…
korea_investment_get_index_daily_pricesHistory of a Korean market or sector index up to a given date, one row per day, week or month (about 100 rows per call): date, close…
korea_investment_get_overseas_priceCurrent quote of a foreign stock (US, Japan, Hong Kong, China, Vietnam): last price (last), previous close (base), change and change rate…
korea_investment_get_overseas_price_detailDetailed quote of a foreign stock: open, high, low, previous close, 52-week high and low with their dates, PER, PBR, EPS, BPS, market…
korea_investment_get_overseas_daily_pricesDaily, weekly or monthly history of a foreign stock up to a given date, about 100 rows per call: date (xymd), close (clos), change, open…
korea_investment_get_overseas_orderbookOrder book of a foreign stock: best ask and bid prices with quantities (ten levels for US stocks, one level elsewhere) and the current…
korea_investment_get_overseas_index_chartDaily, weekly, monthly or yearly candles of a foreign index, exchange rate, government bond or gold future between two dates (about 100…
korea_investment_get_overseas_stock_infoMaster data of a foreign stock as KIS lists it: Korean and English names, exchange, currency, listing status, tick size, minimum order…

Example prompts

  • "How is Samsung Electronics (005930) trading right now, and what are its PER, PBR and foreign ownership?"
  • "Show me the daily candles of SK hynix for the last three months and the highest close in that period."
  • "Did foreigners or institutions buy NAVER on balance over the last few trading days?"
  • "Where are KOSPI and KOSDAQ today, and how many KOSPI issues are rising versus falling?"
  • "Compare Apple and Toyota: last price, today's change, and 52-week high and low."

FAQ

Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.

Next steps

Was this guide helpful?

Your Korea Investment & Securities agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Related guides

Connectors

Connect Korea Investment to ChatGPT via MCP

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

Connectors

Connect Korea Investment to Claude via MCP

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

Connectors

Connect Korea Investment to Microsoft Copilot via MCP

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

Connectors

Connect Korea Investment to Cursor via MCP

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

Connectors

Connect Korea Investment to Meta Muse via MCP

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.

Connectors

Korea Investment MCP Server: Quotes, Charts and Indices

Read Korean and overseas market data from the KIS Developers Open API of Korea Investment & Securities: stock and ETF quotes, daily and minute charts, order books, investor flows, KOSPI and KOSDAQ indices, and US, Japanese, Hong Kong and Chinese stock prices. Read-only, no trading.