free-stockdb MCP
A local database of China A-share and ETF market data with an MCP server for natural-language queries
- 3,162 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The MCP server runs a separate Python process and reaches a local network port for the database
Install
- Works in
Manual install
{
"mcpServers": {
"stockdb-native": {
"command": "python",
"args": [
"-u",
"C:/Users/elonm/stockdb/stockdb/调用方式/ai_mcp/stock_mcp_server.py"
]
}
}
}Replace the path in args with the script's actual location on your system. The local stockdb.exe server must be listening on port 7899 first.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The MCP server runs a separate Python process and reaches a local network port for the database
This is third-party code. Review the repository files before installing.
What it does
free-stockdb is a local engine for China A-share and ETF daily and minute-bar data: a C++ server syncs data, caches it locally, and accounts for corporate actions when computing adjusted prices. Several access methods sit on top of the database: an HTTP API, a Python SDK, an Excel add-on via WPS macros, and a separate MCP server written in plain Python with no third-party dependencies. The MCP server connects to Claude Desktop or Cursor and lets you query daily, weekly and 5-minute candles for a ticker with a plain phrase instead of an API call.
Who it is for. For traders and analysts who work with China A-share market data and want to query it from an agent in natural language.
Good fit when
- You need local historical A-share quotes without calling a paid API every time
- You need Claude Desktop or Cursor to answer questions about specific candles and trading volume
- You need local backtesting or technical indicator calculations over your own data
Not a fit when
- You need data for markets other than China A-share, not the US or elsewhere
- You're not willing to keep the local stockdb server running for the MCP server to answer queries
Example request
Get daily candles for ticker 600633 for the past week and describe the trendMCP
- Transport
- stdio
- Authentication
- not required
Limitations
Documentation is mostly in Chinese. The MCP server only works as a client to a separately running local stockdb server listening on port 7899, and requires Python dependencies to be installed first via a separate install script. Data is limited to the A-share and ETF market.
How to disable. Remove the stockdb-native entry from mcpServers in your Claude Desktop or Cursor config and stop the local stockdb server.
FAQ
Does the MCP tool need a separate server running?
Yes, the README requires the local stockdb.exe to be running and listening on port 7899 before the MCP server can answer queries.
Which clients are supported?
The README shows the config for Claude Desktop specifically; the same MCP server can be wired into Cursor and other clients that read an mcpServers config.
Discussion
No questions or reviews yet.
Related
MCP serversA server feeds agents quotes for A-shares, Hong Kong and US stocks, indicators, funds, futures and options, plus four skills.
A hosted MCP server for financial data: quotes, filings, macro statistics and FTShare's own factors, read-only
A skill and MCP server that give an agent quotes, candles and ticker search for the China, Hong Kong and US markets
MCP server and CLI with stock quotes for China, Hong Kong and the US: 92 tools for candles, indicators and funds, no API keys
MCP server for Chinese stock market data on akshare-one: quotes, news, financial statements and insider trades
MCP lets an agent read a local Chinese-market archive and inspect financial data coverage, provenance and dates
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| free-stockdb (this card) | no | not required | 3,162 | |
| AkTools MCP Server | no | not required | 391 | an akshare-based MCP server with quotes |
| Lava MCP: A-share news heat | no | key is optional | 100 | a remote MCP server for the paid Lava service |
README in short
The Chinese-language README describes free-stockdb as a local quant engine for A-share daily and minute quotes and ETF data with incremental sync, local caching, adjusted-price calculation, batch queries, backtesting and indicators. A separate folder called 调用方式 shows four ways to reach the data: an HTTP API, a Python SDK, Excel macros via WPS, and an MCP server. For the MCP server it gives a concrete claude_desktop_config.json example with the python command and script path, plus sample natural-language questions about specific candles. MIT licensed.