Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

qlib-sync: China A-share data

by randyy179version 0.2.0i★ 1iRuns on your computerRepository ↗
Registry nameio.github.randyy179/qlib-sync

How to install

What it does

Install, update, and read a local Qlib China A-share daily dataset, with checksums and rollback.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Databases & datasets

Use together with

Skills that teach the AI this kind of work; they work alongside this one

timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

by google-research★ 35,6381 skills

Skill · How-to guide

Shadowbroker

Open-source intelligence for the global theater. Track everything from the corporate/private jets of the wealthy, and spy satellites, to seismic events in one unified interface. Hook an AI agent up to have it parse through data and find previously unseen correlations. The knowledge is available to…

by BigBodyCobain★ 11,6051 skills

Skill · How-to guide

google-maps-scraper

scrape data from Google Maps. Extracts data such as the name, address, phone number, website URL, rating, reviews number, latitude and longitude, reviews,email and more for each place

by gosom★ 8,2361 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity4/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score16/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install qlib-sync: China A-share data. Follow https://mcp.popnx.com/i/randyy179-qlib-sync.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server qlib-sync: China A-share data for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "qlib-sync": { "command": "uvx", "args": [ "qlib-sync", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the qlib-sync: China A-share data tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "qlib-sync": {
          "command": "uvx",
          "args": [
            "qlib-sync",
            "mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use qlib-sync: China A-share data and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using qlib-sync: China A-share data or shows a qlib-sync: China A-share data tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • QLIB_SYNC_DATA_DIR Dataset folder; defaults to ~/.qlib/qlib_data/cn_data
  • QLIB_SYNC_MIRROR Optional prefix-style GitHub proxy for slow connections, e.g. https://ghfast.top

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect qlib-sync: China A-share data yet

qlib-sync: China A-share data runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect qlib-sync: China A-share data

  • Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)

B · Others in Databases & datasets that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server qlib-sync: China A-share data for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user qlib-sync -- uvx qlib-sync mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the qlib-sync: China A-share data tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user qlib-sync -- uvx qlib-sync mcp
  4. Type /mcp in Claude Code

    You should see qlib-sync: China A-share data listed as connected

  5. Try it

    Use qlib-sync: China A-share data and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using qlib-sync: China A-share data or shows a qlib-sync: China A-share data tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • QLIB_SYNC_DATA_DIR Dataset folder; defaults to ~/.qlib/qlib_data/cn_data
  • QLIB_SYNC_MIRROR Optional prefix-style GitHub proxy for slow connections, e.g. https://ghfast.top

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server qlib-sync: China A-share data for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "qlib-sync": { "command": "uvx", "args": [ "qlib-sync", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the qlib-sync: China A-share data tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use qlib-sync: China A-share data and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using qlib-sync: China A-share data or shows a qlib-sync: China A-share data tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • QLIB_SYNC_DATA_DIR Dataset folder; defaults to ~/.qlib/qlib_data/cn_data
  • QLIB_SYNC_MIRROR Optional prefix-style GitHub proxy for slow connections, e.g. https://ghfast.top

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server qlib-sync: China A-share data for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "qlib-sync": { "type": "stdio", "command": "uvx", "args": [ "qlib-sync", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the qlib-sync: China A-share data tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use qlib-sync: China A-share data and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using qlib-sync: China A-share data or shows a qlib-sync: China A-share data tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • QLIB_SYNC_DATA_DIR Dataset folder; defaults to ~/.qlib/qlib_data/cn_data
  • QLIB_SYNC_MIRROR Optional prefix-style GitHub proxy for slow connections, e.g. https://ghfast.top

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use qlib-sync: China A-share data💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user qlib-sync -- uvx qlib-sync mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "qlib-sync": {
      "command": "uvx",
      "args": [
        "qlib-sync",
        "mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "qlib-sync": {
      "command": "uvx",
      "args": [
        "qlib-sync",
        "mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "qlib-sync": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "qlib-sync",
        "mcp"
      ]
    }
  }
}

Values you fill in

  • QLIB_SYNC_DATA_DIR env
    Dataset folder; defaults to ~/.qlib/qlib_data/cn_data
  • QLIB_SYNC_MIRROR env
    Optional prefix-style GitHub proxy for slow connections, e.g. https://ghfast.top

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
Not on npm/PyPI
Connection
Runs on your computer
Latest versioni
0.2.0
Published to registryi
Nov 13, 2026
Code last changedi
Nov 14, 2026
Maker
randyy179
Packages
pypi: qlib-sync
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account randyy179, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 5 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for qlib-sync@0.2.0

Checks only this package version, not every dependency · checked Nov 16, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/randyy179-qlib-sync.svg)](https://mcp.popnx.com/en/servers/randyy179-qlib-sync)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Databases & datasetsi

  • More stars than 78% of the other 1237 servers in this category
  • Published to the registry more recently than 87% of the other 1237 servers in this category
  • Basic checks equal to or better than 99% of the other 1237 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is qlib-sync: China A-share data safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 5 days ago, and the latest version (0.2.0) reached the registry 6 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: QueryWeaver, Supabase, Neon, DBCode, Keboola MCP

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

QueryWeaver

An MCP server for Text2SQL: transforms natural language into SQL using graph schema understanding.

by FalkorDBGrowing★ 1.1KUpdated 14 months ago

Runs on your computer✓ falkordb.com

Supabase

Supabase’s official server lets AI create tables, query data and review project settings in your Supabase database.

by supabaseWidely used↓ 245.5K/wk★ 3K Stars for the whole repoUpdated yesterday

Computer or cloud✓ service owner · supabase.com

Neon

Official Neon MCP server for managing Neon projects and Lakebase Postgres databases.

by neondatabaseGrowing★ 666Updated 13 days ago

Runs in the cloud✓ service owner · neon.com

DBCode

Query and explore 100+ databases through your DBCode connections.

by dbcodeioEarly↓ 118/wk★ 368 Stars for the whole repoUpdated 2 months ago

Runs on your computer✓ service owner · dbcode.io

Keboola MCP

Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...

by keboolaGrowing↓ 1.4K/wk★ 84Updated 3 days ago

Computer or cloud✓ service owner · keboola.com
Compared with similar ones
This one
qlib-sync: China A-share data
QueryWeaverSupabaseNeonDBCodeKeboola MCP
Runs whereInstalls on your computerInstalls on your computerCloud or install on your computerRuns in the cloud, nothing to installInstalls on your computerCloud or install on your computer
Needs a keyNoNoYesNoNoNo
Add with + in ClaudeNoNoYesYesNoNo
Basic checks3/33/35/55/52/35/5
LicenseMITAGPL-3.0Apache-2.0MITNOASSERTIONMIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

qlib-sync

中文说明

Website: randyy179.github.io/qlib-sync

One command to install and keep current a local [Qlib](https://github.com/microsoft/qlib) China A-share dataset, and an MCP server so AI assistants can read it.

pip install qlib-sync

qlib-sync cn update

Or without installing anything first: uvx --python 3.12 qlib-sync cn update. (--python 3.12 because pyqlib publishes wheels up to Python 3.12; uv fetches that Python for you if needed. With pip, use Python 3.10 to 3.12.)

That installs the daily community release from chenditc/investment_data into ~/.qlib/qlib_data/cn_data, the location Qlib reads by default. Run the same command again any time; when the data is already current it finishes in about a second.

Why not just wget and tar?

Qlib's README points A-share users to the community release with a wget and tar one-liner. That works until it doesn't:

  • An interrupted or truncated download extracts into a half-written dataset, or fails after the old one has already been overwritten.
  • Upstream republishes releases. In November 2026 a data error was found and corrected (investment_data#163) and releases were republished under the same date. A date check alone never sees the fix.
  • Every check downloads 550 MB, even when nothing changed.

The investment_data README itself describes a careful manual process: download the release manifest, check the archive with qlib/validate_archive.py --require-publishable, then extract. qlib-sync runs that validator itself, on every update: an unmodified copy (from commit 68fdc66, Apache-2.0) checks the manifest before the download and the archive after it. A test suite feeds the same malformed releases to the upstream script and to qlib-sync and requires the same verdict, and a weekly job flags any change upstream makes to the validator.

On top of that, qlib-sync skips the download when nothing changed, pins the manifest and the archive to one release tag, extracts beside the live data and swaps it in with rollback (rather than extracting on top of the existing folder), and picks up republished releases.

qlib-sync treats the dataset like a production system:

StepWhat happens
CheckPins the latest release by tag and reads its 500-byte manifest. Already current: done, nothing downloaded.
DownloadResumes interrupted downloads; shows progress; optional mirror for slow links to GitHub.
Verifyinvestment_data's own validate_archive.py --require-publishable, unmodified: manifest fields and formats, size and sha256, every required calendar and index pool, date formats, ordering, and the future calendar. Anything it rejects is refused.
StageExtracts next to the active dataset; refuses downgrades.
SwapRenames the new dataset into place, then runs a real Qlib read.
Roll backAny failure after the swap moves the previous dataset back.
ReportNew trading days, newly listed and delisted symbols.

Verification is required by default. If the manifest is missing, unreadable, or rejected by the validator, the update stops and your data stays as it was. --allow-unverified installs anyway when the manifest cannot be verified, and the result and install record are then marked unverified; a package whose checksum disagrees with a valid manifest is always refused.

The checks catch broken, truncated, tampered, or malformed packages. They cannot catch wrong values inside a correctly published release (like the one in #163); for that, keep a rollback copy with --keep-backup.

Commands

qlib-sync status                  # every local Qlib dataset at a glance

qlib-sync cn status # local date, pools, and whether a newer release exists qlib-sync cn update # install or update (add --json for machine-readable output) qlib-sync cn health-check # structure checks plus a real Qlib read qlib-sync cn restore --list # rollback backups; restore --yes switches back

Useful options for cn update:

OptionEffect
--data-dir PATHInstall somewhere other than ~/.qlib/qlib_data/cn_data
--mirror URLDownload through a prefix-style GitHub proxy such as https://ghfast.top (or set QLIB_SYNC_MIRROR)
--keep-backupKeep the previous dataset for one rollback
--protect FILECarry a custom stock pool in instruments/ across updates (repeatable)
--forceReinstall even when the dates match
--allow-unverifiedInstall when the manifest cannot be verified (marked unverified; checksum mismatches are still refused)

The update replaces the whole `cn_data` folder. Anything you added there is lost unless you pass it with --protect.

Mirrors

From mainland China, GitHub downloads can be slow or fail. Pass a mirror and qlib-sync downloads the package through it while still reading the manifest from GitHub directly when it can, so the checksum does not depend on the mirror. Mirrors are third-party services; qlib-sync does not endorse any of them.

Python

from qlib_sync import update_cn, status_cn, health_check_cn

result = update_cn() # raises qlib_sync.UpdateError on failure; data unchanged print("\n".join(result.summary_lines())) print(result.new_trading_days, result.added_symbols)

Use it from your AI assistant

qlib-sync includes an MCP server, the open standard most AI tools use to call local tools. Any MCP client that can start a local command works, whichever model it runs: Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, or a local model. The server runs on your machine and reads the dataset there; there is no service to host and nothing leaves your computer. It is listed in the MCP Registry as io.github.randyy179/qlib-sync.

Every client needs the same two things: the command uvx and the arguments qlib-sync mcp.

ClientHow to add qlib-sync
Claude DesktopDownload qlib-sync.mcpb from the latest release and open it
Claude Codeclaude mcp add qlib-sync -- uvx --python 3.12 qlib-sync mcp
OpenAI Codex CLIcodex mcp add qlib-sync -- uvx --python 3.12 qlib-sync mcp
CursorThe JSON below, in ~/.cursor/mcp.json
Gemini CLIThe JSON below, in ~/.gemini/settings.json
Qwen CodeThe JSON below, in ~/.qwen/settings.json
Tencent CodeBuddy, ByteDance Trae, Alibaba Tongyi LingmaMCP settings, add a server manually, paste the JSON below
Cherry StudioSettings, MCP servers, add: type STDIO, command uvx, arguments --python, 3.12, qlib-sync, mcp on separate lines
VS Code (Copilot agent mode).vscode/mcp.json: { "servers": { "qlib-sync": { "type": "stdio", "command": "uvx", "args": ["--python", "3.12", "qlib-sync", "mcp"] } } }
{ "mcpServers": { "qlib-sync": { "command": "uvx", "args": ["--python", "3.12", "qlib-sync", "mcp"] } } }

Menu names and file locations change between versions; check your client's MCP documentation if a path above has moved. Tested with Claude Code and OpenAI Codex CLI.

Web chat apps such as ChatGPT connect only to remote MCP servers over the internet, so they cannot start this local server.

Set QLIB_SYNC_DATA_DIR to use a dataset outside ~/.qlib/qlib_data/cn_data, and QLIB_SYNC_MIRROR to download through a mirror.

ToolDoes
cn_statusLocal latest date, pools, and whether an update is available
cn_updateInstall or update (safe to call: failures restore the previous data)
cn_health_checkStructure checks plus a real Qlib read
cn_get_pricesDaily bars for up to 20 symbols; real traded prices by default, adjusted on request
cn_list_poolMembers of csi300, csi500, and other pools on a date

Then ask things like *"Is my A-share data current? What did Moutai close at over the last week?"* Symbols accept 600519, SH600519, or 600519.SH.

skills/qlib-sync/SKILL.md teaches an assistant when to update, how to read each failure, and the price conventions. It uses the open SKILL.md format that Claude, Codex, and other agents load from their skills folder; any assistant can also simply be pointed at the file.

Daily updates

A run that finds nothing new costs one small request, so schedule it daily. See docs/scheduling.md for cron and launchd examples.

Data and credits

All data comes from chenditc/investment_data (Apache-2.0). qlib-sync only downloads the public release; it does not host or redistribute data. Prices follow Qlib's convention: $close is adjusted and the real price is $close / $factor.

qlib-sync is an independent project, not affiliated with Microsoft or the Qlib team.

Supported: macOS and Linux, Python 3.10 to 3.12 (pyqlib does not publish wheels for newer versions yet; uvx picks a compatible Python automatically).

Development

uv venv && uv pip install -e ".[dev]"

.venv/bin/python -m pytest

License

MIT