# CNEquity

Gives an AI agent prices, fundamentals, flows and events for China A-shares from a local Parquet lake. Useful for repeated backtests and long-term history.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 846
- Author: rootSunc
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rootSunc/CNEquity
- Updated: 2026-10-18
- HTML: https://affpapa.org/en/nevibecode/mcp/cnequity

## What it does

CNEquity pulls equities, futures, financial statements, corporate events and capital flows into a local Parquet lake. The agent then reads it over MCP in read-only mode. Inside are incremental collection, resume after failure, quality audits and one query layer. It registers 55 datasets: 47 curated and 8 derived, grouped into levels L0–L9.

You need Python 3.10+ on macOS, Linux or Windows. No account or token. A one-minute demo profile fetches 5 stocks over the last 30 trading days into a separate directory, while a full-market build over 3 years takes hours and survives a restart. Minute bars, ticks and derivatives are off by default; enable them and check the source's coverage.

What people come here for is control over口径: raw prices and adjustment factors are stored separately, delisted names stay in the historical universe, and statement queries distinguish strict PIT from after-the-fact reconstruction. If you backtest on today's list of tickers, you drop the delisted ones — that is a reason to check your pipeline. Data sits in open files, readable through Python, DuckDB, Polars, the console and MCP.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add cnequity -- uvx cnequity
```
uvx runs the command named after the package; if the README names another one, use uvx --from cnequity <command>

### Codex

**Platform CLI**
```bash
codex mcp add cnequity -- uvx cnequity
```
uvx runs the command named after the package; if the README names another one, use uvx --from cnequity <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "cnequity": {
            "command": "uvx",
            "args": [
                "cnequity"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from cnequity <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "cnequity": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "cnequity"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from cnequity <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add cnequity uvx cnequity
```
uvx runs the command named after the package; if the README names another one, use uvx --from cnequity <command>

## When to use it
- build a local A-share price lake with no account or token
- resume a download after a network drop without redoing finished work
- keep raw prices and adjustment factors apart in one query
- retain delisted names in the historical universe
- check which statements were visible on a rebalance date

## Example prompts
- Connect cnequity and tell me which day 宁德时代 had its highest closing price over the last 30 trading days
- Using cnequity, show which names gained the most over the past month from daily bars
- Run cne init and cne check, then tell me which steps did not finish

## Similar
- [twelvedata](https://affpapa.org/en/nevibecode/skills/twelvedata.md) — skill · 7700 installs
- [yfinance-data](https://affpapa.org/en/nevibecode/skills/yfinance-data.md) — skill · 3900 installs
- [alva](https://affpapa.org/en/nevibecode/skills/alva.md) — skill · 800 installs
- [coingecko-api](https://affpapa.org/en/nevibecode/skills/coingecko-api.md) — skill · 440 installs
- [datanalysis-credit-risk](https://affpapa.org/en/nevibecode/skills/datanalysis-credit-risk.md) — skill · 7300 installs
- [blackforge](https://affpapa.org/en/nevibecode/skills/blackforge.md) — skill · 8200 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
