- Home
- MCP servers
- MCP Stock Assistant
MCP Stock Assistant
- javascript
2
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"qqzhangyanhua-mcp-stock": {
"command": "node",
"args": [
"/Users/zhangyanhua/Documents/augment-projects/mcp-stock/build/index.js"
]
}
}
}You can run a dedicated MCP stock server that fetches real-time quotes, historical K-lines, market indices, and order-book details from a reliable data source. This server lets you query by stock code or name and use intuition-friendly tools to get up-to-date stock information in your MCP-enabled client.
How to use
Connect your MCP client to the stock server and use the built-in tools to retrieve data. You can get real-time stock information, fetch historical price data in daily/weekly/monthly views, obtain market index data, and inspect detailed order-book levels. Use the stock search capability to locate tickers by full name or short name and then request the specific data you need. The server is designed to be compatible with any MCP client via the standard stdio transport.
How to install
Prerequisites: you need Node.js and a package manager (pnpm is recommended in this setup). Ensure you have network access to install dependencies and build the project.
git clone <repository-url>
cd mcp-stock
pnpm install
pnpm run build
Configuration and usage notes
Configure your MCP client to connect to the stock server using a stdio-based setup. The server runs as a local process and is started with Node, pointing to the built entry file.
{
"mcpServers": {
"mcp_stock": {
"command": "node",
"args": [
"/Users/zhangyanhua/Documents/augment-projects/mcp-stock/build/index.js"
]
}
}
}
Examples of common data you can fetch
Use the following tools to access data. Each tool is available through the MCP interface and accepts the described parameters.
Order and data access patterns
- Get real-time stock information by stock code or name. - Retrieve historical data with period options (1d for daily, 1w for weekly, 1m for monthly) and a day range. - Fetch market index data for major indices like the Shanghai Composite Index and Shenzhen Component.
Available tools
get-stock-info
Fetch real-time information for a given stock by code or name, including price, volume, and basic indicators.
get-stock-history
Retrieve historical data for a stock with selectable period (1d, 1w, 1m) and day range (1-500 days).
get-market-index
Provide real-time data for major market indices such as the Shanghai Composite Index and Shenzhen Component.