Skip to main content
Glama
moony211

kiwoom-private-mcp-server

by moony211

πŸ“Š kiwoom-private-mcp-server

ν‚€μ›€μ¦κΆŒ REST APIλ₯Ό ν™œμš©ν•˜μ—¬ 주식 κ³„μ’Œ 정보 및 보유 μ’…λͺ©μ˜ 평가 ν˜„ν™©μ„ μ‘°νšŒν•  수 μžˆλŠ” 개인용 Model Context Protocol (MCP) μ„œλ²„μž…λ‹ˆλ‹€. Claude Desktop, Cursor λ“± LLM ν΄λΌμ΄μ–ΈνŠΈμ™€ μ—°λ™ν•˜μ—¬ AIκ°€ 직접 투자 μžμ‚° ν˜„ν™©μ„ νŒŒμ•…ν•˜κ³  μ„Ήν„° 적합도 뢄석 등을 μˆ˜ν–‰ν•  수 μžˆλ„λ‘ λ•μŠ΅λ‹ˆλ‹€.


πŸš€ μ£Όμš” κΈ°λŠ₯ (MCP Tools)

  • get_accounts: μ‚¬μš©μžκ°€ μ •μ˜ν•œ ν‚€μ›€μ¦κΆŒ κ³„μ’Œ λͺ©λ‘κ³Ό 각 κ³„μ’Œλ³„ νƒ€κ²Ÿ μ„Ήν„° 정보λ₯Ό μ‘°νšŒν•©λ‹ˆλ‹€.

  • get_account_balance: νŠΉμ • κ³„μ’Œμ˜ 총 평가 μžμ‚°, κ°œλ³„ 보유 μ’…λͺ©μ˜ 평가 κΈˆμ•‘, 비쀑, 평단가 및 수읡λ₯ μ„ μ‘°νšŒν•©λ‹ˆλ‹€. (μ‹€μ œ μ„œλ²„ API 연동 및 λͺ¨μ˜ Mock 쑰회 지원)


Related MCP server: QuantPlay MCP Server

πŸ› οΈ μš”κ΅¬ 사항 및 기술 μŠ€νƒ

  • Python: 3.10 이상

  • μ˜μ‘΄μ„± 도ꡬ:

    • uv: Rust 기반으둜 개발된 μ΄ˆκ³ μ† 파이썬 νŒ¨ν‚€μ§€/ν”„λ‘œμ νŠΈ κ΄€λ¦¬μž

    • mcp: Anthropic Model Context Protocol SDK

    • requests: API HTTP 톡신 라이브러리

    • python-dotenv: 둜컬 ν™˜κ²½ λ³€μˆ˜(.env) λ‘œλ“œ 라이브러리


πŸ“¦ μ„€μΉ˜ 및 둜컬 μ„€μ •

1. uv 도ꡬ μ„€μΉ˜ (Rust 기반의 μ΄ˆκ³ μ† νŒ¨ν‚€μ§€ λ§€λ‹ˆμ €)

터미널(PowerShell λ˜λŠ” bash)μ—μ„œ μ•„λž˜ λͺ…λ Ήμ–΄λ₯Ό μ‹€ν–‰ν•˜μ—¬ uvλ₯Ό μ„€μΉ˜ν•©λ‹ˆλ‹€.

  • Windows (PowerShell):

    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  • macOS / Linux:

    curl -LsSf https://astral.sh/uv/install.sh | sh
  • κΈ°μ‘΄ pipλ₯Ό μ‚¬μš©ν•˜λŠ” 경우:

    pip install uv

2. κ°€μƒν™˜κ²½ ꡬ좕 및 νŒ¨ν‚€μ§€ μ„€μΉ˜

ν”„λ‘œμ νŠΈ 루트 λ””λ ‰ν† λ¦¬μ—μ„œ λ‹€μŒ λͺ…령을 μ‚¬μš©ν•˜μ—¬ μ˜μ‘΄μ„±μ„ μ΄ˆκ³ μ†μœΌλ‘œ λ™κΈ°ν™”ν•©λ‹ˆλ‹€.

# κ°€μƒν™˜κ²½(.venv) 생성
uv venv

# pyproject.toml에 μ •μ˜λœ νŒ¨ν‚€μ§€ μ„€μΉ˜ 및 둜컬 ν”„λ‘œμ νŠΈ λΉŒλ“œ
uv pip install -e .

3. ν™˜κ²½ μ„€μ • 파일 ꡬ성

둜컬 λ³΄μ•ˆ 및 κ³„μ’Œ 정보 맀핑을 μœ„ν•΄ μ„€μ • ν…œν”Œλ¦Ώ νŒŒμΌλ“€μ„ λ³΅μ‚¬ν•˜μ—¬ μ‹€μ œ μ„€μ • νŒŒμΌμ„ μž‘μ„±ν•©λ‹ˆλ‹€. (이 νŒŒμΌλ“€μ€ .gitignore에 λ“±λ‘λ˜μ–΄ κΉƒ κ΄€λ¦¬μ—μ„œ λ°°μ œλ©λ‹ˆλ‹€.)

  1. ν™˜κ²½ λ³€μˆ˜ 파일 (.env) 생성: .env.example νŒŒμΌμ„ λ³΅μ‚¬ν•˜μ—¬ .env νŒŒμΌμ„ λ§Œλ“€κ³  킀움 API 인증에 ν•„μš”ν•œ AppKey 및 SecretKeyλ₯Ό μž…λ ₯ν•©λ‹ˆλ‹€.

    cp .env.example .env
    • KIWOOM_USE_MOCK=false둜 μ„€μ •ν•˜λ©΄ μ‹€μ œ 킀움 API μ„œλ²„μ—μ„œ μ‹€μ‹œκ°„ 정보λ₯Ό κ°€μ Έμ˜΅λ‹ˆλ‹€. true일 경우 λ‚΄μž₯된 λͺ¨μ˜ 포트폴리였 정보λ₯Ό λ°˜ν™˜ν•©λ‹ˆλ‹€.

  2. κ³„μ’Œ λ§€ν•‘ μ„€μ • 파일 (accounts_config.json) 생성: accounts_config.json.example νŒŒμΌμ„ λ³΅μ‚¬ν•˜μ—¬ accounts_config.json νŒŒμΌμ„ λ§Œλ“€κ³  μ‚¬μš© 쀑인 κ³„μ’Œ λ²ˆν˜Έμ™€ 각 κ³„μ’Œλ³„λ‘œ λΆ€μ—¬ν•˜κ³ μž ν•˜λŠ” νƒ€κ²Ÿ 투자 μ„Ήν„°λͺ…을 μž…λ ₯ν•©λ‹ˆλ‹€.

    cp accounts_config.json.example accounts_config.json

πŸ’» μ‹€ν–‰ 및 연동 κ°€μ΄λ“œ

1. 둜컬 단독 ν…ŒμŠ€νŠΈ

uvλ₯Ό 톡해 FastMCP μ„œλ²„λ₯Ό λͺ…λ Ήμ€„μ—μ„œ 직접 ꡬ동해 기동 μ—λŸ¬κ°€ μ—†λŠ”μ§€ κ²€μ¦ν•©λ‹ˆλ‹€.

uv run mcp_server.py
  • μ„œλ²„κ°€ μ •μƒμ μœΌλ‘œ κΈ°λ™λ˜λ©΄ mcp.server.fastmcp 엔진이 μž‘λ™ν•˜λ©° μž…μΆœλ ₯ λŒ€κΈ° μƒνƒœλ‘œ μ§„μž…ν•©λ‹ˆλ‹€.

2. Claude Desktop 연동 μ„€μ •

Claude Desktop μ•±μ—μ„œ 이 μ„œλ²„λ₯Ό 인식할 수 μžˆλ„λ‘ μ„€μ • 파일(config.json)에 μ•„λž˜μ™€ 같이 μΆ”κ°€ν•©λ‹ˆλ‹€.

  • μ„€μ • 파일 μœ„μΉ˜: C:\Users\<μ‚¬μš©μžλͺ…>\AppData\Roaming\EasyConnect\config.json λ˜λŠ” %APPDATA%\Claude\claude_desktop_config.json

  • μ„€μ • μΆ”κ°€ λ‚΄μš© (Windows μ˜ˆμ‹œ):

{
  "mcpServers": {
    "kiwoom-private-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "c:/Users/moony/home_document/kiwoom-rest-api/kiwoom-private-mcp-server",
        "mcp_server.py"
      ]
    }
  }
}

3. Cursor IDE 연동 μ„€μ •

  1. Cursor μ„€μ • (Settings -> Features -> MCP)으둜 μ΄λ™ν•©λ‹ˆλ‹€.

  2. + Add New MCP Server λ²„νŠΌμ„ λˆ„λ¦…λ‹ˆλ‹€.

  3. λ‹€μŒκ³Ό 같이 μž…λ ₯ν•©λ‹ˆλ‹€:

    • Name: kiwoom-private-mcp-server

    • Type: command

    • Command: uv run --directory c:/Users/moony/home_document/kiwoom-rest-api/kiwoom-private-mcp-server mcp_server.py


πŸ”’ λ³΄μ•ˆ 주의 사항

  • λ³Έ ν”„λ‘œμ νŠΈλŠ” 개인 투자 κ³„μ’Œ 및 λ―Όκ°ν•œ API 인증 정보(AppKey, SecretKey)λ₯Ό λ‹€λ£Ήλ‹ˆλ‹€.

  • μ ˆλŒ€ .env 파일과 accounts_config.json νŒŒμΌμ„ Public GitHub μ €μž₯μ†Œμ— 컀밋/ν‘Έμ‹œν•˜μ§€ μ•Šλ„λ‘ κ°λ³„νžˆ μœ μ˜ν•΄ μ£Όμ‹­μ‹œμ˜€. (기본적으둜 .gitignoreκ°€ λ°©μ–΄ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.)

Install Server
F
license - not found
B
quality
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Provides comprehensive Taiwan stock market data and analysis through MCP tools. Enables querying real-time stock prices, historical data, company information, technical analysis, and market overviews for TWSE and TPEx listed companies.
    Last updated
    8
    16
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Provides access to the QuantPlay trading API for managing broker accounts, tracking positions, and analyzing holdings. It enables users to interact with their trading data through MCP-compatible clients like Claude Desktop.
    Last updated
  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that enables natural language control of Kiwoom Securities accounts through Claude Desktop. It provides tools for stock price lookup, buying and selling stocks, and analyzing portfolios or trade history via the Kiwoom REST API.
    Last updated
    11
    2
  • A
    license
    -
    quality
    C
    maintenance
    Provides Korean stock market data (KOSPI, KOSDAQ, KONEX) including prices, fundamentals, investor trading, short selling, and indices via MCP protocol, enabling natural language queries from AI agents like ChatGPT and Claude.
    Last updated
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.

  • 7-factor stock scoring MCP server. US/HK/CN, 74 stocks. Free + Premium (USDC/Base). x402 ready.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/moony211/kiwoom-private-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server