kospi-kosdaq

Integrations

  • Available as a PyPI package that can be installed via the Python package manager to enable the KOSPI/KOSDAQ stock data functionality.

kospi-kosdaq股票服务器

使用 FastMCP 提供 KOSPI/KOSDAQ 股票数据的 MCP 服务器。

特征

  • 查找 KOSPI/KOSDAQ 股票代码和名称
  • 检索特定股票的 OHLCV 数据
  • 检索特定股票的市值数据
  • 检索特定股票的基本数据(市盈率/市净率/股息收益率)
  • 按投资者类型检索特定股票的交易量

可用工具

  • load_all_tickers - 将 KOSPI 和 KOSDAQ 的所有股票代码和名称加载到内存中。
    • 没有争论。
  • get_stock_ohlcv - 检索特定股票的 OHLCV(开盘价/最高价/最低价/收盘价/成交量)数据。
    • fromdate (字符串,必需):检索开始日期(YYYYMMDD)
    • todate (字符串,必需):检索结束日期(YYYYMMDD)
    • ticker (字符串,必需):股票代码
    • adjusted (布尔值,可选):是否使用调整后的价格(True:已调整,False:未调整)。默认为 True。
  • get_stock_market_cap - 检索特定股票的市值数据。
    • fromdate (字符串,必需):检索开始日期(YYYYMMDD)
    • todate (字符串,必需):检索结束日期(YYYYMMDD)
    • ticker (字符串,必需):股票代码
  • get_stock_fundamental - 检索特定股票的基本数据(PER/PBR/股息收益率)。
    • fromdate (字符串,必需):检索开始日期(YYYYMMDD)
    • todate (字符串,必需):检索结束日期(YYYYMMDD)
    • ticker (字符串,必需):股票代码
  • get_stock_trading_volume - 根据投资者类型检索特定股票的交易量。
    • fromdate (字符串,必需):检索开始日期(YYYYMMDD)
    • todate (字符串,必需):检索结束日期(YYYYMMDD)
    • ticker (字符串,必需):股票代码

安装

此包需要uv来安装和执行。

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 KOSPI/KOSDAQ 股票数据服务器:

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

手动安装

# 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

Claude.app 的配置

安装软件包后,您需要在claude_desktop_config.json文件中配置 MCP 服务器。

  1. 找到配置文件:
    • 在 macOS 上,该文件通常位于: /Users/username/Library/Application Support/Claude/claude_desktop_config.json
    • 在 Windows 上,该文件通常位于: %APPDATA%/Claude/claude_desktop_config.json
  2. **添加服务器配置:**打开claude_desktop_config.json文件并向mcpServers对象添加一个新条目:
{ "mcpServers": { "kospi-kosdaq": { "command": "uvx", "args": ["kospi_kosdaq_stock_server"] } } }

配置详细信息:

  • command :使用uvx来利用 uv 的隔离和依赖管理
  • args :由于入口点是在包中定义的,因此只需要包名称
  • 不需要额外的环境变量
  1. **重启 Claude:**将更改保存到claude_desktop_config.json后,重启 Claude 以使更改生效。

使用示例

配置完服务器后,就可以在 Claude 中使用它了,如下所示:

  1. 首先,加载所有可用的股票行情机:
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. 获取特定股票的 OHLCV 数据:
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 ...

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

使用 FastMCP 提供 KOSPI/KOSDAQ 股票数据的 MCP 服务器。

  1. 特征
    1. 可用工具
      1. 安装
        1. 通过 Smithery 安装
        2. 手动安装
      2. Claude.app 的配置
        1. 使用示例

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            An MCP server implementation that integrates with Angle One APIs to provide standardized access to financial market data, trading operations, and portfolio management.
            Last updated -
            Python
          • -
            security
            A
            license
            -
            quality
            An MCP server that integrates with the AlphaVantage financial data API, providing access to stock market data, technical indicators, and fundamental financial information.
            Last updated -
            Python
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A TypeScript-based MCP server that fetches real-time stock market data and company financial information through the Alpha Vantage API.
            Last updated -
            JavaScript
            • Apple
          • A
            security
            F
            license
            A
            quality
            An MCP server that provides real-time financial data integration with Alpha Vantage's API, enabling access to stock market data, cryptocurrency prices, forex rates, and technical indicators.
            Last updated -
            7
            2
            JavaScript

          View all related MCP servers

          ID: i1judi5h55