kiwoom-private-mcp-server
Enables querying Kiwoom Securities account information and portfolio evaluation through MCP tools, supporting account balance and holdings analysis.
README
π kiwoom-private-mcp-server
ν€μμ¦κΆ REST APIλ₯Ό νμ©νμ¬ μ£Όμ κ³μ’ μ 보 λ° λ³΄μ μ’ λͺ©μ νκ° νν©μ μ‘°νν μ μλ κ°μΈμ© Model Context Protocol (MCP) μλ²μ λλ€. Claude Desktop, Cursor λ± LLM ν΄λΌμ΄μΈνΈμ μ°λνμ¬ AIκ° μ§μ ν¬μ μμ° νν©μ νμ νκ³ μΉν° μ ν©λ λΆμ λ±μ μνν μ μλλ‘ λμ΅λλ€.
π μ£Όμ κΈ°λ₯ (MCP Tools)
get_accounts: μ¬μ©μκ° μ μν ν€μμ¦κΆ κ³μ’ λͺ©λ‘κ³Ό κ° κ³μ’λ³ νκ² μΉν° μ 보λ₯Ό μ‘°νν©λλ€.get_account_balance: νΉμ κ³μ’μ μ΄ νκ° μμ°, κ°λ³ 보μ μ’ λͺ©μ νκ° κΈμ‘, λΉμ€, νλ¨κ° λ° μμ΅λ₯ μ μ‘°νν©λλ€. (μ€μ μλ² API μ°λ λ° λͺ¨μ Mock μ‘°ν μ§μ)
π οΈ μꡬ μ¬ν λ° κΈ°μ μ€ν
- Python:
3.10μ΄μ - μμ‘΄μ± λꡬ:
- uv: Rust κΈ°λ°μΌλ‘ κ°λ°λ μ΄κ³ μ νμ΄μ¬ ν¨ν€μ§/νλ‘μ νΈ κ΄λ¦¬μ
mcp: Anthropic Model Context Protocol SDKrequests: 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μ λ±λ‘λμ΄ κΉ κ΄λ¦¬μμ λ°°μ λ©λλ€.)
-
νκ²½ λ³μ νμΌ (
.env) μμ±:.env.exampleνμΌμ 볡μ¬νμ¬.envνμΌμ λ§λ€κ³ ν€μ API μΈμ¦μ νμν AppKey λ° SecretKeyλ₯Ό μ λ ₯ν©λλ€.cp .env.example .envKIWOOM_USE_MOCK=falseλ‘ μ€μ νλ©΄ μ€μ ν€μ API μλ²μμ μ€μκ° μ 보λ₯Ό κ°μ Έμ΅λλ€.trueμΌ κ²½μ° λ΄μ₯λ λͺ¨μ ν¬νΈν΄λ¦¬μ€ μ 보λ₯Ό λ°νν©λλ€.
-
κ³μ’ λ§€ν μ€μ νμΌ (
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 μ°λ μ€μ
- Cursor μ€μ (
Settings->Features->MCP)μΌλ‘ μ΄λν©λλ€. + Add New MCP Serverλ²νΌμ λλ¦ λλ€.- λ€μκ³Ό κ°μ΄ μ
λ ₯ν©λλ€:
- 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
- Name:
π 보μ μ£Όμ μ¬ν
- λ³Έ νλ‘μ νΈλ κ°μΈ ν¬μ κ³μ’ λ° λ―Όκ°ν API μΈμ¦ μ 보(
AppKey,SecretKey)λ₯Ό λ€λ£Ήλλ€. - μ λ
.envνμΌκ³Όaccounts_config.jsonνμΌμ Public GitHub μ μ₯μμ 컀λ°/νΈμνμ§ μλλ‘ κ°λ³ν μ μν΄ μ£Όμμμ€. (κΈ°λ³Έμ μΌλ‘.gitignoreκ° λ°©μ΄νκ³ μμ΅λλ€.)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.