Installation & Configuration
Install stock-sdk-mcp
Option 1: Run with npx (Recommended)
No installation needed — use npx directly in the configuration file:
{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": ["-y", "stock-sdk-mcp"]
}
}
}Option 2: Global Installation
npm install -g stock-sdk-mcpAfter installation, you can run the stock-mcp command directly.
Option 3: Local Development
git clone https://github.com/chengzuopeng/stock-sdk-mcp.git
cd stock-sdk-mcp
yarn install
yarn buildRequirements
- Node.js >= 18.0.0
- Supports macOS / Linux / Windows
AI Tool Configuration Guide
Cursor IDE
Configuration file: ~/.cursor/mcp.json
{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": ["-y", "stock-sdk-mcp"]
}
}
}After configuration, restart Cursor to use stock query capabilities in conversations.
Try it out:
Get me the real-time quote for Kweichow Moutai (600519)Claude Desktop
Configuration file path:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": ["-y", "stock-sdk-mcp"]
}
}
}OpenClaw (MCP Gateway / AI Assistant)
OpenClaw (formerly Clawdbot) is an open-source, MCP-capable AI assistant that can load external MCP servers.
Option 1: register via CLI
openclaw mcp add stock-sdk --command npx --arg -y --arg stock-sdk-mcp
openclaw mcp doctor stock-sdk --probe # verify connectivityOption 2: edit ~/.openclaw/openclaw.json under mcp.servers:
{
"mcp": {
"servers": {
"stock-sdk": {
"command": "npx",
"args": ["-y", "stock-sdk-mcp"]
}
}
}
}Refer to the OpenClaw docs for the exact commands and configuration.
Antigravity (Gemini Pro in VS Code)
Configuration file: ~/.antigravity/mcp.json
{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": ["-y", "stock-sdk-mcp"]
}
}
}Codex CLI (OpenAI)
Configuration file: ~/.codex/config.json
{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": ["-y", "stock-sdk-mcp"]
}
}
}Usage examples:
codex "Get Apple's real-time stock price"
codex "Analyze the ChiNext index recent technical pattern"Gemini CLI (Google)
Configuration file: ~/.gemini/settings.json
{
"mcpServers": {
"stock-sdk": {
"command": "npx",
"args": ["-y", "stock-sdk-mcp"]
}
}
}Usage examples:
gemini "What are the hot limit-up concepts in A-shares today?"
gemini "Get Tencent's daily K-line and calculate moving averages"Debug the MCP Server
You can test the MCP Server by piping JSON-RPC messages:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_quotes_by_query","arguments":{"queries":["AAPL"]}}}' | npx -y stock-sdk-mcp