Korea Stock MCP Server
๐ฐ๐ท ํ๊ตญ์ด | ๐บ๐ธ English
ํ๊ตญ ์ฃผ์ ๋ถ์์ ์ํ MCP ์๋ฒ์
๋๋ค.
DART(์ ์๊ณต์์์คํ
)์ KRX(ํ๊ตญ๊ฑฐ๋์) ๊ณต์ API๋ฅผ ํตํด ์ฃผ๊ฐ ์ ๋ณด์ ๊ณต์ ์๋ฃ ๊ธฐ๋ฐ์ AI๋ถ์์ด ๊ฐ๋ฅํฉ๋๋ค.
๐ฏ ์ฃผ์ ๊ธฐ๋ฅ
- ๐ ๊ณต์๊ฒ์ - ํ์ฌ๋ณ, ๊ธฐ๊ฐ๋ณ ๊ณต์ ๊ฒ์
- ๐ ๊ณต์ ๋ฐ์ดํฐ - ๊ณต์๋ณด๊ณ ์ ์๋ณธํ์ผ ํ์ฑํ ๋ฐ์ดํฐ ์ ๊ณต
- ๐ผ ์ฌ๋ฌด์ ํ ๋ถ์ - XBRL ๊ธฐ๋ฐ ์์ธ ์ฌ๋ฌด ๋ฐ์ดํฐ
- ๐ ์ฃผ์ ๋ฐ์ดํฐ - KRX(์ฝ์คํผ/์ฝ์ค๋ฅ) ์ผ๋ณ ์ฃผ๊ฐ์ ๋ณด, ์ข ๋ชฉ ๊ธฐ๋ณธ์ ๋ณด
โก ๋น ๋ฅธ ์์
1๏ธโฃ API KEY ๋ฐ๊ธ
๋จผ์ DART์ KRX์ API KEY๋ฅผ ๋ฐ๊ธ๋ฐ์์ผ ํฉ๋๋ค.
๐ DART API KEY ๋ฐ๊ธ
- ํ์๊ฐ์ : OPEN DART ํ์๊ฐ์
- ํค ์ ์ฒญ: ์ธ์ฆํค ์ ์ฒญ ํ์ด์ง์์ API KEY ์ ์ฒญ
- ํค ํ์ธ: ์คํAPI ์ด์ฉํํฉ์์ ๋ฐ๊ธ๋ API KEY ํ์ธ
๐ KRX API KEY ๋ฐ๊ธ
-
ํ์๊ฐ์ : KRX OPEN API์์ ํ์๊ฐ์ ๋ฐ ๋ก๊ทธ์ธ
-
ํค ์ ์ฒญ: ๋ง์ดํ์ด์ง โ API ์ธ์ฆํค ์ ์ฒญ์์ ์ ์ฒญ
-
์๋น์ค ์ ์ฒญ: ์น์ธ ํ ์๋น์ค์ด์ฉ โ ์ฃผ์ ๋ฉ๋ด๋ก ์ด๋
-
API ์ด์ฉ์ ์ฒญ: ๋ค์ 6๊ฐ ํญ๋ชฉ์์ ๊ฐ๊ฐ "API ์ด์ฉ์ ์ฒญ" ํด๋ฆญ
- ์ ๊ฐ์ฆ๊ถ ์ผ๋ณ๋งค๋งค์ ๋ณด
- ์ฝ์ค๋ฅ ์ผ๋ณ๋งค๋งค์ ๋ณด
- ์ฝ๋ฅ์ค ์ผ๋ณ๋งค๋งค์ ๋ณด
- ์ ๊ฐ์ฆ๊ถ ์ข ๋ชฉ๊ธฐ๋ณธ์ ๋ณด
- ์ฝ์ค๋ฅ ์ข ๋ชฉ๊ธฐ๋ณธ์ ๋ณด
- ์ฝ๋ฅ์ค ์ข ๋ชฉ๊ธฐ๋ณธ์ ๋ณด
> โฑ๏ธ ์น์ธ๊น์ง ์ฝ 1์ผ ์์๋ฉ๋๋ค.
-
ํค ํ์ธ: ์น์ธ ํ ๋ง์ดํ์ด์ง โ API ์ธ์ฆํค ๋ฐ๊ธ๋ด์ญ์์ API KEY ํ์ธ
2๏ธโฃ Claude Desktop ์ค์
- Claude Desktop ์คํ
- ์ค์ โ ๊ฐ๋ฐ์ โ ๊ตฌ์ฑํธ์ง ํด๋ฆญ
claude_desktop_config.json
ํ์ผ์ ๋ค์ ๋ด์ฉ ์ถ๊ฐ:
{
"mcpServers": {
"korea-stock-mcp": {
"command": "npx",
"args": ["-y", "korea-stock-mcp@latest"],
"env": {
"DART_API_KEY": "<your_dart_api_key>",
"KRX_API_KEY": "<your_krx_api_key>"
}
}
}
}
- ์ฌ์์: Claude Desktop์ ์ฌ์์ํ์ฌ ์ค์ ์ ์ฉ
> ์ด์ Claude์์ ํ๊ตญ ์ฃผ์ ๋ฐ์ดํฐ ๋ถ์์ ์์ํ ์ ์์ต๋๋ค.
์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ
DART (์ ์๊ณต์์์คํ )
-
get_disclosure_list - ๊ณต์๊ฒ์
- ๊ณต์ ์ ํ๋ณ, ํ์ฌ๋ณ, ๋ ์ง๋ณ ๊ณต์๋ณด๊ณ ์ ๊ฒ์
-
get_corp_code - ๊ณ ์ ๋ฒํธ ์กฐํ
- DART ๋ฑ๋ก ๊ณต์๋์ํ์ฌ์ ๊ณ ์ ๋ฒํธ, ํ์ฌ๋ช , ์ข ๋ชฉ์ฝ๋ ์ ๊ณต
-
get_disclosure - ๊ณต์๋ณด๊ณ ์ ์๋ฌธ
- DART API๋ฅผ ํตํ ๊ณต์๋ณด๊ณ ์ ์๋ณธํ์ผ ํ์ฑ
-
get_financial_statement - ์ฌ๋ฌด์ ํ
- ์์ฅ๋ฒ์ธ ๋ฐ ์ฃผ์ ๋น์์ฅ๋ฒ์ธ XBRL ์ฌ๋ฌด์ ํ
- ์ ๊ธฐ๋ณด๊ณ ์ ๋ด ๋ชจ๋ ๊ณ์ ๊ณผ๋ชฉ ๋ฐ์ดํฐ ์ ๊ณต
KRX (ํ๊ตญ๊ฑฐ๋์)
-
get_stock_base_info - ์ข ๋ชฉ ๊ธฐ๋ณธ์ ๋ณด
- ์ฝ์คํผ, ์ฝ์ค๋ฅ, ์ฝ๋ฅ์ค ์์ฅ ์ข ๋ชฉ ๊ธฐ๋ณธ ์ ๋ณด
- ์ข ๋ชฉ๋ช , ์ข ๋ชฉ์ฝ๋, ์์ฅ๊ตฌ๋ถ ๋ฑ ๊ธฐ๋ณธ ๋ฐ์ดํฐ
-
get_stock_trade_info - ์ผ๋ณ ๋งค๋งค์ ๋ณด
- ์ฝ์คํผ, ์ฝ์ค๋ฅ, ์ฝ๋ฅ์ค ์ข ๋ชฉ๋ณ ์ผ๋ณ ๊ฑฐ๋ ๋ฐ์ดํฐ
- ์ฃผ๊ฐ, ๊ฑฐ๋๋, ์๊ฐ์ด์ก ๋ฑ ์์ธ ๊ฑฐ๋ ์ ๋ณด
-
get_market_type - ์์ฅ๊ตฌ๋ถ ์กฐํ
- ์ข ๋ชฉ์ฝ๋๋ก ํด๋น ์ข ๋ชฉ์ ์์ฅ๊ตฌ๋ถ(์ฝ์คํผ/์ฝ์ค๋ฅ/์ฝ๋ฅ์ค) ์กฐํ
- ์ฃผ์ ๋ฐ์ดํฐ ์กฐํ ์ ํ์ํ ์์ฅ ์ ๋ณด ์ ๊ณต
๊ธฐํ ๋๊ตฌ
- get_today_date - ์ค๋ ๋ ์ง ์กฐํ
- ํ์ฌ ๋ ์ง๋ฅผ YYYYMMDD ํ์์ผ๋ก ์ ๊ณต
- AI์ ์ ํํ ๋ ์ง ์กฐํ๋ฅผ ์ํ ๋๊ตฌ
์ค์ ์ฌ์ฉ ์์
๐ ์ฌ๋ฌด ๋ถ์ ์์
ํ๋กฌํํธ: "์ผ์์ํ์ 2023๋
, 2024๋
1~4๋ถ๊ธฐ, 2025๋
1,2๋ถ๊ธฐ ๋งค์ถ, ์์
์ด์ต ์กฐ์ฌํด์ฃผ๊ณ ์ฑ์ฅ๋ฅ ๋ ์กฐ์ฌํด์ค"
โ ์ผ์์ํ ๋ถ์ ๊ฒฐ๊ณผ ๋ณด๊ธฐ
ํ๋กฌํํธ: "์์ดํผ์์ 23๋
1๋ถ๊ธฐ๋ถํฐ 25๋
2๋ถ๊ธฐ๊น์ง์ ๋งค์ถ, ์์
์ด์ต ์ฑ์ฅ๊ณผ ์ฃผ๊ฐ, ์๊ฐ์ด์ก ํ๋ฆ์ ์กฐ์ฌํด์ค"
โ ์์ดํผ์ ๋ถ์ ๊ฒฐ๊ณผ ๋ณด๊ธฐ
๐ข ๊ธฐ์ ๋ถ์ ์์
ํ๋กฌํํธ: "HJ์ค๊ณต์
์ ๋ญ ํด์ ๋์ ๋ฒ๋ ํ์ฌ์ธ์ง๋ ์ฌ์
๋ถ๋ฌธ๋ณ ๋งค์ถ๊น์ง ๊ฐ์ด ์๋ ค์ค"
โ HJ์ค๊ณต์
๋ถ์ ๊ฒฐ๊ณผ ๋ณด๊ธฐ
API ๋ฐ์ดํฐ ์์ค
- DART (์ ์๊ณต์์์คํ ): ์์ฅ๊ธฐ์ ๊ณต์ ์ ๋ณด ๋ฐ ์ฌ๋ฌด์ ํ
- KRX (ํ๊ตญ๊ฑฐ๋์): ์ข ๋ชฉ ๊ธฐ๋ณธ์ ๋ณด ๋ฐ ์ผ๋ณ ๋งค๋งค์ ๋ณด
๊ธฐ์ฌํ๊ธฐ
๊ธฐ์ฌ๋ฅผ ํ์ํฉ๋๋ค! Pull Request๋ฅผ ๋ณด๋ด์ฃผ์ธ์.
- ์ด ์ ์ฅ์๋ฅผ ํฌํฌํ์ธ์
- ๊ธฐ๋ฅ ๋ธ๋์น๋ฅผ ๋ง๋์ธ์ (
git checkout -b feature/AmazingFeature
) - ๋ณ๊ฒฝ์ฌํญ์ ์ปค๋ฐํ์ธ์ (
git commit -m 'Add some AmazingFeature'
) - ๋ธ๋์น์ ํธ์ํ์ธ์ (
git push origin feature/AmazingFeature
) - Pull Request๋ฅผ ์ด์ด์ฃผ์ธ์
๋ผ์ด์ ์ค
ISC ๋ผ์ด์ ์ค
์ง์
- ๐ ์ด์๊ฐ ์๋ค๋ฉด GitHub Issues์ ๋ฑ๋กํด์ฃผ์ธ์
- โญ ์ ์ฉํ๋ค๋ฉด ์คํ๋ฅผ ๋๋ฌ์ฃผ์ธ์!
๋ฉด์ฑ ์กฐํญ
๋ณธ ๋๊ตฌ๋ ์ ๋ณด ์ ๊ณต ๋ชฉ์ ์ด๋ฉฐ, ํฌ์ ์กฐ์ธ์ด ์๋๋๋ค. ๋ชจ๋ ํฌ์ ๊ฒฐ์ ์ ๋ณธ์ธ ์ฑ ์์ ๋๋ค.
English Version
MCP Server for Korean stock analysis.
Enables AI-powered analysis of stock prices and disclosure data through official APIs from DART (Data Analysis, Retrieval and Transfer System) and KRX (Korea Exchange).
๐ฏ Key Features
- ๐ Disclosure Search - Search corporate disclosures by company and date
- ๐ Disclosure Data - Provides parsed data from original disclosure reports
- ๐ผ Financial Statement Analysis - Detailed financial data based on XBRL
- ๐ Stock Data - KRX (KOSPI/KOSDAQ) daily stock prices and basic stock information
โก Quick Start
1๏ธโฃ API KEY Registration
You need to obtain API KEYs from both DART and KRX.
๐ DART API KEY Registration
- Sign Up: Register at OPEN DART
- Request Key: Apply for API KEY at Authentication Key Application Page
- Check Key: Verify issued API KEY at Open API Usage Status
๐ KRX API KEY Registration
-
Sign Up: Register and login at KRX OPEN API
-
Request Key: Apply for API authentication key in My Page โ API Authentication Key Application
-
Service Application: After approval, go to Service Use โ Stock menu
-
API Usage Application: Click "API Usage Application" for each of the following 6 items
- Securities Daily Trading Information
- KOSDAQ Daily Trading Information
- KONEX Daily Trading Information
- Securities Basic Information
- KOSDAQ Basic Information
- KONEX Basic Information
> โฑ๏ธ Approval takes approximately 1 day.
-
Key Verification: After approval, check API KEY in My Page โ API Authentication Key Issuance History
2๏ธโฃ Claude Desktop Setup
- Launch Claude Desktop
- Go to Settings โ Developer โ Edit Configuration
- Add the following content to
claude_desktop_config.json
:
{
"mcpServers": {
"korea-stock-mcp": {
"command": "npx",
"args": ["-y", "korea-stock-mcp@latest"],
"env": {
"DART_API_KEY": "<your_dart_api_key>",
"KRX_API_KEY": "<your_krx_api_key>"
}
}
}
}
- Restart: Restart Claude Desktop to apply settings
> You can now start analyzing Korean stock data with Claude.
Available Tools
DART (Data Analysis, Retrieval and Transfer System)
-
get_disclosure_list - Disclosure Search
- Search disclosure reports by type, company, and date
-
get_corp_code - Corporate Code Inquiry
- Provides unique codes, company names, and stock codes of DART-registered disclosure companies
-
get_disclosure - Disclosure Report Content
- Parse original disclosure report files through DART API
-
get_financial_statement - Financial Statements
- XBRL financial statements for listed and major unlisted companies
- Provides all account data from periodic reports
KRX (Korea Exchange)
-
get_stock_base_info - Basic Stock Information
- Basic information for KOSPI, KOSDAQ, and KONEX listed stocks
- Basic data including stock names, codes, and market classifications
-
get_stock_trade_info - Daily Trading Information
- Daily trading data for KOSPI, KOSDAQ, and KONEX stocks
- Detailed trading information including stock prices, trading volume, and market capitalization
-
get_market_type - Market Type Inquiry
- Query market classification (KOSPI/KOSDAQ/KONEX) by stock code
- Provides market information needed for stock data queries
Other Tools
- get_today_date - Today's Date Inquiry
- Provides current date in YYYYMMDD format
- Tool for AI's accurate date inquiry
Real Usage Examples
๐ Financial Analysis Examples
Prompt: "Investigate Samyang Foods's sales and operating profit for Q1-Q4 2023, Q1-Q4 2024, and Q1-Q2 2025, and also check growth rates"
โ See Samyang Foods Analysis Results
Prompt: "Investigate APR's sales and operating profit growth from Q1 2023 to Q2 2025, along with stock price and market cap trends"
โ See APR Analysis Results
๐ข Corporate Analysis Examples
Prompt: "Tell me what HJ SHIPBUILDING & CONSTRUCTION does to make money and include sales by business segment"
โ See HJ SHIPBUILDING & CONSTRUCTION Analysis Results
API Data Sources
- DART (Data Analysis, Retrieval and Transfer System): Listed company disclosure information and financial statements
- KRX (Korea Exchange): Basic stock information and daily trading information
Contributing
Contributions are welcome! Please send us a Pull Request.
- Fork this repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
ISC License
Support
- ๐ If you have issues, please register them in GitHub Issues
- โญ If you find it useful, please give it a star!
Disclaimer
This tool is for informational purposes only and is not investment advice. All investment decisions are your own responsibility. </your_krx_api_key></your_dart_api_key></your_krx_api_key></your_dart_api_key>