Here's the OHLCV (Open, High, Low, Close, Volume) data for Samsung Electronics for the past month.
3. Get market capitalization data:
Human: What's the market cap of Naver for the last week? Assistant: I'll retrieve Naver's (035420) market cap data for the last week.
Using tool 'get_stock_market_cap'... Date Market Cap 2024-02-14 49,321,050,000,000 2024-02-13 48,987,320,000,000 ...
## Acknowledgements
This package is built on:
- [fastmcp](https://github.com/Quansight/fastmcp) for MCP server functionality
- [FinanceDataReader](https://github.com/financedata-org/FinanceDataReader) for financial data retrieval
## License
This project is licensed under the MIT License.
AI: This MCP server provides KOSPI/KOSDAQ stock data through a straightforward interface, allowing you to retrieve various stock information including ticker symbols, price data, market capitalization, and fundamental metrics.
## Installation
### Prerequisites
This package requires [uv](https://github.com/astral-sh/uv) for installation and execution.
### Option 1: Installing via Smithery
To install automatically via Smithery:
```bash
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
After installation, configure the MCP server in your Claude Desktop configuration file:
Locate the configuration file:
/Users/username/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the server configuration:
{
"mcpServers": {
"kospi-kosdaq": {
"command": "uvx",
"args": ["kospi_kosdaq_stock_server"]
}
}
}
get_stock_ohlcv: Retrieves OHLCV (Open/High/Low/Close/Volume) data
fromdate
(string, required): Start date (YYYYMMDD)todate
(string, required): End date (YYYYMMDD)ticker
(string, required): Stock ticker symboladjusted
(boolean, optional): Use adjusted prices (defaults to True)get_stock_market_cap: Retrieves market capitalization data
fromdate
(string, required): Start date (YYYYMMDD)todate
(string, required): End date (YYYYMMDD)ticker
(string, required): Stock ticker symbolget_stock_fundamental: Retrieves PER/PBR/Dividend Yield data
fromdate
(string, required): Start date (YYYYMMDD)todate
(string, required): End date (YYYYMMDD)ticker
(string, required): Stock ticker symbolget_stock_trading_volume: Retrieves trading volume by investor type
fromdate
(string, required): Start date (YYYYMMDD)todate
(string, required): End date (YYYYMMDD)ticker
(string, required): Stock ticker symbolHuman: 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.
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
...
Human: What's the market cap of Naver for the last week?
Assistant: I'll retrieve Naver's (035420) market cap data for the last week.
> Using tool 'get_stock_market_cap'...
Date Market Cap
2024-02-14 49,321,050,000,000
2024-02-13 48,987,320,000,000
...
For retrieving fundamental data or trading volume information, use similar patterns with the appropriate tool and parameters.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.