Back to Home
SeonghakHong-Sch icon

kStock-mcp-server

Verified Safe

by SeonghakHong-Sch

Overview

This server provides an MCP (Micro-Capability Protocol) interface to interact with the Korean Investment API, enabling functionalities like fetching stock prices, account information, financial data, and executing stock buy/sell orders.

Installation

Run Command
./test

Environment Variables

  • K_appkey
  • K_appsecret
  • K_cano
  • K_cano2

Security Notes

Sensitive information (API keys, account numbers) is loaded from environment variables using `std::getenv`, which is a good practice. Access tokens are obtained via API calls and stored in memory. Request parameters are built from JSON, and `tool::build_query` handles string serialization, reducing direct injection risks. The `mcp::tool_builder` defines parameter schemas, implying input validation by the MCP framework, which is crucial. No direct use of 'eval' or shell command execution from user input is observed. The singleton pattern for `KInvestmentAPI` is noted; while simplifying access, it means credentials are globally shared within the server process, which requires careful management in highly concurrent or multi-tenant scenarios (though not explicitly problematic for the apparent use case).

Similar Servers

Stats

Interest Score34
Security Score8
Cost ClassMedium
Avg Tokens2
Stars2
Forks0
Last Update2025-11-26

Tags

Financial TradingStock MarketKorean Investment APIMCP ServerC++