kospi-kosdaq

kospi-kosdaq

An MCP server that provides KOSPI/KOSDAQ stock data using FastMCP.

dragon1086

Finance
Visit Server

Tools

load_all_tickers

Loads all ticker symbols and names for KOSPI and KOSDAQ into memory. Returns: Dict[str, str]: A dictionary mapping tickers to stock names. Example: {"005930": "삼성전자", "035720": "카카오", ...}

get_stock_ohlcv

Retrieves OHLCV (Open/High/Low/Close/Volume) data for a specific stock. Args: fromdate (str): Start date for retrieval (YYYYMMDD) todate (str): End date for retrieval (YYYYMMDD) ticker (str): Stock ticker symbol adjusted (bool, optional): Whether to use adjusted prices (True: adjusted, False: unadjusted). Defaults to True. Returns: DataFrame: >> get_stock_ohlcv("20210118", "20210126", "005930") Open High Low Close Volume Date 2021-01-26 89500 94800 89500 93800 46415214 2021-01-25 87300 89400 86800 88700 25577517 2021-01-22 89000 89700 86800 86800 30861661 2021-01-21 87500 88600 86500 88100 25318011 2021-01-20 89000 89000 86500 87200 25211127 2021-01-19 84500 88000 83600 87000 39895044 2021-01-18 86600 87300 84100 85000 43227951

get_stock_market_cap

Retrieves market capitalization data for a specific stock. Args: fromdate (str): Start date for retrieval (YYYYMMDD) todate (str): End date for retrieval (YYYYMMDD) ticker (str): Stock ticker symbol Returns: DataFrame: >> get_stock_market_cap("20150720", "20150724", "005930") Market Cap Volume Trading Value Listed Shares Date 2015-07-24 181030885173000 196584 241383636000 147299337 2015-07-23 181767381858000 208965 259446564000 147299337 2015-07-22 184566069261000 268323 333813094000 147299337 2015-07-21 186039062631000 194055 244129106000 147299337 2015-07-20 187806654675000 128928 165366199000 147299337

get_stock_fundamental

Retrieves fundamental data (PER/PBR/Dividend Yield) for a specific stock. Args: fromdate (str): Start date for retrieval (YYYYMMDD) todate (str): End date for retrieval (YYYYMMDD) ticker (str): Stock ticker symbol Returns: DataFrame: >> get_stock_fundamental("20210104", "20210108", "005930") BPS PER PBR EPS DIV DPS Date 2021-01-08 37528 28.046875 2.369141 3166 1.589844 1416 2021-01-07 37528 26.187500 2.210938 3166 1.709961 1416 2021-01-06 37528 25.953125 2.189453 3166 1.719727 1416 2021-01-05 37528 26.500000 2.240234 3166 1.690430 1416 2021-01-04 37528 26.218750 2.210938 3166 1.709961 1416

get_stock_trading_volume

Retrieves trading volume by investor type for a specific stock. Args: fromdate (str): Start date for retrieval (YYYYMMDD) todate (str): End date for retrieval (YYYYMMDD) ticker (str): Stock ticker symbol Returns: DataFrame with columns: - Volume (Sell/Buy/Net Buy) - Trading Value (Sell/Buy/Net Buy) Broken down by investor types (Financial Investment, Insurance, Trust, etc.)

README

kospi-kosdaq-stock-server

PyPI version smithery badge

<a href="https://glama.ai/mcp/servers/i1judi5h55"> <img width="380" height="200" src="https://glama.ai/mcp/servers/i1judi5h55/badge" /> </a>

An MCP server that provides KOSPI/KOSDAQ stock data using FastMCP.

Features

  • Lookup KOSPI/KOSDAQ ticker symbols and names
  • Retrieve OHLCV data for a specific stock
  • Retrieve market capitalization data for a specific stock
  • Retrieve fundamental data (PER/PBR/Dividend Yield) for a specific stock
  • Retrieve trading volume by investor type for a specific stock

Available Tools

  • load_all_tickers - Loads all ticker symbols and names for KOSPI and KOSDAQ into memory.

    • No arguments.
  • get_stock_ohlcv - Retrieves OHLCV (Open/High/Low/Close/Volume) data for a specific stock.

    • fromdate (string, required): Start date for retrieval (YYYYMMDD)
    • todate (string, required): End date for retrieval (YYYYMMDD)
    • ticker (string, required): Stock ticker symbol
    • adjusted (boolean, optional): Whether to use adjusted prices (True: adjusted, False: unadjusted). Defaults to True.
  • get_stock_market_cap - Retrieves market capitalization data for a specific stock.

    • fromdate (string, required): Start date for retrieval (YYYYMMDD)
    • todate (string, required): End date for retrieval (YYYYMMDD)
    • ticker (string, required): Stock ticker symbol
  • get_stock_fundamental - Retrieves fundamental data (PER/PBR/Dividend Yield) for a specific stock.

    • fromdate (string, required): Start date for retrieval (YYYYMMDD)
    • todate (string, required): End date for retrieval (YYYYMMDD)
    • ticker (string, required): Stock ticker symbol
  • get_stock_trading_volume - Retrieves trading volume by investor type for a specific stock.

    • fromdate (string, required): Start date for retrieval (YYYYMMDD)
    • todate (string, required): End date for retrieval (YYYYMMDD)
    • ticker (string, required): Stock ticker symbol

Installation

This package requires uv for installation and execution.

Installing via Smithery

To install KOSPI/KOSDAQ Stock Data Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @dragon1086/kospi-kosdaq-stock-server --client claude

Manual Installation

# Create and activate a virtual environment
uv venv .venv
source .venv/bin/activate  # On Unix/macOS
# .venv\Scripts\activate   # On Windows

# Install the package
uv pip install kospi-kosdaq-stock-server

Configuration for Claude.app

After installing the package, you need to configure the MCP server in your claude_desktop_config.json file.

  1. Locate the configuration file:

    • On macOS, the file is typically located at: /Users/username/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows, the file is typically located at: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the server configuration: Open the claude_desktop_config.json file and add a new entry to the mcpServers object:

{
    "mcpServers": {
        "kospi-kosdaq": {
            "command": "uvx",
            "args": ["kospi_kosdaq_stock_server"]
        }
    }
}

Configuration Details:

  • command: Use uvx to take advantage of uv's isolation and dependency management
  • args: Only the package name is needed since the entry point is defined in the package
  • No additional environment variables are required
  1. Restart Claude: After saving the changes to claude_desktop_config.json, restart Claude for the changes to take effect.

Usage Example

After configuring the server, you can use it in Claude like this:

  1. First, load all available stock tickers:
Human: Please load all available stock tickers.
Assistant: I'll help you load all KOSPI and KOSDAQ stock tickers.

> Using tool 'load_all_tickers'...
Successfully loaded 2,873 stock tickers.
  1. Get OHLCV data for a specific stock:
Human: Show me Samsung Electronics' stock data for the last month.
Assistant: I'll retrieve Samsung Electronics' (005930) OHLCV data for the last month.

> Using tool 'get_stock_ohlcv'...
Date        Open    High    Low     Close   Volume
2024-02-14  73,800  74,000  73,400  73,700  7,823,124
2024-02-13  73,600  74,200  73,200  73,800  8,943,217
...

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
chromia-mcp

chromia-mcp

Enables AI to interact with Chromia Wallet for sending $CHR transactions.

Official
Local
TypeScript
TripleWhale MCP Server

TripleWhale MCP Server

An implementation of Model Context Protocol (MCP) that allows users to interact with TripleWhale's e-commerce analytics platform using natural language queries through Claude Desktop.

Official
Local
TypeScript
Adamik MCP Server

Adamik MCP Server

Enables read and write interactions with 60+ blockchain networks through Claude Desktop, providing a standardized multi-chain API for transaction management, account insights, staking, and token interactions.

Official
Local
TypeScript
Open-Ledger-MCP-Server

Open-Ledger-MCP-Server

A Model Context Protocol (MCP) server implementation for the OpenLedger API. This server provides structured context to AI models according to the MCP specification.

Official
TypeScript
ntropy-mcp MCP Server

ntropy-mcp MCP Server

Enables enriching banking data with the Ntropy API, providing tools to create account holders and enrich transactions efficiently.

Official
Python
Iaptic MCP Server

Iaptic MCP Server

A server for interacting with the Iaptic API, allowing AI models like Claude to query customer, purchase, and transaction data, as well as retrieve statistical insights.

Official
TypeScript
Bitrefill Search and Shop

Bitrefill Search and Shop

This MCP wraps Bitrefill public API to allow agents to search for products and shop using cryptocurrencies like Bitcoin, Ethereum, Solana, and many more.

Official
TypeScript
MCP EVM Signer

MCP EVM Signer

A server that securely manages Ethereum private keys locally and enables Claude for Desktop to interact with EVM-compatible blockchains through Infura.

Local
TypeScript
Cryptocurrency Daemon MCP Server

Cryptocurrency Daemon MCP Server

Enables secure interactions with cryptocurrency daemon RPC interfaces through AI assistants, supporting transaction management, wallet operations, and daemon monitoring for Bitcoin-derived cryptocurrencies.

Local
TypeScript