Instructions for an AI agent setting up CNEquity for a user. CNEquity is a local China A-share data lake; cne mcp exposes it to MCP clients as six read-only tools. No account or API token is needed.
Requires Python 3.10+. Either install the package:
pip install cnequityor skip installation and let the client run it with uvx cnequity … (needs uv).
The server refuses to start without data. Ask the user which they want:
-
Try it in about a minute (recommended first): real data for 5 stocks over the last 30 trading days, in a separate directory.
cne init --profile demo --data-root ~/cnequity-demo --config-out ~/cnequity-demo/cnequity.toml
-
The full lake: every Shanghai, Shenzhen and Beijing A-share over the last 3 years. The first run can take hours; if it stops, running the same command again resumes it.
cne init
This writes
configs/cnequity.tomlin the current directory.
cne init prints the absolute path of the config it wrote. Use that path below.
--config must be an absolute path: the client starts the server from a directory of its own choosing, and a relative path resolves to an empty lake.
Cline (cline_mcp_settings.json) and most other clients:
{
"mcpServers": {
"cnequity": {
"command": "cne",
"args": ["mcp", "--config", "/absolute/path/to/cnequity.toml"],
"disabled": false,
"autoApprove": []
}
}
}If cne is not on the PATH the client sees, use the absolute path of the executable (which cne), or "command": "uvx" with "args": ["cnequity", "mcp", "--config", "/absolute/path/to/cnequity.toml"].
ChatGPT and other clients that only accept a remote URL need the HTTP mode and a tunnel; see the MCP guide.
Call the describe_lake tool. It returns the lake's data_root, the datasets it holds and their coverage. If it reports no data, the --config path is wrong or relative.
| Tool | Use |
|---|---|
describe_lake |
Coverage, freshness and the query rules; call it first |
resolve_symbol |
Company name or code → 600519.SH-style symbol |
query_bars |
Daily, index and minute bars, optionally adjusted |
query_fundamentals |
Financial statements with a point-in-time as_of cutoff |
query_dataset |
Any other dataset |
run_sql |
One read-only DuckDB SELECT across all datasets |
All tools are read-only; ingestion and updates are cne commands (cne run daily).