ko-stock-mcp
Provides Korean stock market data, including DART electronic disclosures and KRX trading information, enabling users to query company profiles, financial statements, and stock trade details via MCP clients.
README
ko-stock-mcp
An MCP server that exposes Korean DART (전자공시시스템, Financial Supervisory Service electronic disclosure) data to MCP clients such as Claude Desktop.
한국어 문서는 README.ko.md를 참고하세요.
Tools
Both DART (electronic disclosure) and KRX (Korea Exchange) tools are provided.
DART (disclosure)
| Tool | Description |
|---|---|
get_corp_code |
Look up a company's DART corp_code (8-digit) by name or stock code (6-digit). Entry point for the other tools. |
get_company_info |
Company profile (name, CEO, market class, industry, incorporation date, etc.). |
get_disclosure_list |
Search disclosures by company / date range / disclosure type. |
get_disclosure |
Fetch a disclosure's original document. Large docs return a table of contents (toc); drill in with section_id. |
get_financial_statement |
XBRL financial statements (BS / IS / CIS / SCE / CF) from periodic reports. |
get_today_date |
Today's date in KST/UTC (YYYYMMDD + ISO). |
KRX (Korea Exchange) — requires KRX_API_KEY
| Tool | Description |
|---|---|
get_market_type |
Determine which market (KOSPI/KOSDAQ/KONEX) a stock code belongs to. Uses DART corp class first, falls back to KRX. |
get_stock_trade_info |
Daily trading data for a business day (close, change rate, volume, market cap, etc.). |
get_stock_base_info |
Stock base info (name, standard/short code, listing date, par value, shares outstanding, etc.). |
Typical flow — disclosures/financials: get_corp_code → (get_disclosure_list |
get_financial_statement | get_company_info) → get_disclosure for full text. Market data:
(optionally get_market_type →) get_stock_trade_info | get_stock_base_info (bas_dd
must be a business day; non-trading days return empty).
KRX tools return a friendly error when
KRX_API_KEYis unset; DART features are unaffected. Noteget_market_typeworks with just the DART key (via corp class).
KRX response fields
get_stock_trade_info / get_stock_base_info return the raw KRX fields verbatim under
result (amounts/quantities are strings, dates are YYYYMMDD).
get_stock_trade_info (daily trading data)
| Field | Meaning |
|---|---|
BAS_DD |
Base date (YYYYMMDD) |
ISU_CD |
Stock code (6-digit short code in this response) |
ISU_NM |
Stock name |
MKT_NM |
Market (KOSPI/KOSDAQ/KONEX) |
SECT_TP_NM |
Section/board |
TDD_CLSPRC |
Closing price |
CMPPREVDD_PRC |
Change vs. previous day |
FLUC_RT |
Change rate (%) |
TDD_OPNPRC / TDD_HGPRC / TDD_LWPRC |
Open / High / Low |
ACC_TRDVOL |
Accumulated trading volume (shares) |
ACC_TRDVAL |
Accumulated trading value (KRW) |
MKTCAP |
Market capitalization (KRW) |
LIST_SHRS |
Listed shares |
get_stock_base_info (stock base info)
| Field | Meaning |
|---|---|
ISU_CD |
Standard code (12-digit, e.g. KR7005930003) |
ISU_SRT_CD |
Short code (6-digit, e.g. 005930) |
ISU_NM |
Full stock name |
ISU_ABBRV |
Abbreviated name |
ISU_ENG_NM |
English name |
LIST_DD |
Listing date (YYYYMMDD) |
MKT_TP_NM |
Market (KOSPI/KOSDAQ/KONEX) |
SECUGRP_NM |
Security group (e.g. common stock) |
SECT_TP_NM |
Section/board |
KIND_STKCERT_TP_NM |
Share type (e.g. ordinary) |
PARVAL |
Par value |
LIST_SHRS |
Listed shares |
get_market_type returns { "market": "KOSPI"|"KOSDAQ"|"KONEX", "source": "dart"|"krx"|"cache" }
(source is where the classification came from).
Requirements
- Python >= 3.10
uv- A DART Open API key — sign up at https://opendart.fss.or.kr (free, instant).
- (Optional) A KRX Open API key — sign up at https://openapi.krx.co.kr, request a key, then apply for the six stock services (3 daily-trade + 3 base-info); approval takes ~1 day. Only needed for the KRX market-data tools.
Setup
uv sync
cp .env.example .env # then put your DART_API_KEY in .env
Run / develop
# Launch the MCP Inspector for local testing
uv run mcp dev src/ko_stock_mcp/server.py
# Or run the server directly (stdio)
uv run ko-stock-mcp
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"ko-stock-mcp": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/ko-stock-mcp", "run", "python", "-m", "ko_stock_mcp.server"]
}
}
}
uv --directory runs the server with this project as the working directory, so .env
(with DART_API_KEY, and optionally KRX_API_KEY) is loaded automatically — no need to
duplicate the keys here. If you prefer, you can instead pass them explicitly:
"env": { "DART_API_KEY": "<YOUR_DART_API_KEY>", "KRX_API_KEY": "<YOUR_KRX_API_KEY>" }
On macOS the config lives at
~/Library/Application Support/Claude/claude_desktop_config.json. Restart Claude Desktop
after editing.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。