Introduction¶
When asking stock-related questions in DSH, if the model relies solely on training data to answer, prices, price movements, and financial metrics are prone to becoming outdated or inaccurate. Common solutions involve looking up market data sites outside the conversation, writing scripts to call APIs, and pasting the results back into the chat; or setting up separate MCP servers and maintaining JSON configurations. The ashareapi-dsh-plugin officially provided by ashareapi offers a different path: integrating the MCP service from ashareapi.com directly into DSH, allowing the Agent to fetch real-time or structured A-share data via tools during the conversation. The following section introduces what it is, what it can do, and how to install and use it on Desktop, Web UI, and Command Line.
What is this?¶
ashareapi-dsh-plugin is a DeepSeek Harness plugin for A-share data APIs, maintained by ashareapi. The plugin itself does not contain market calculations or multi-source logic; it is solely responsible for registering the remote MCP endpoint to DSH. Transport, tool registration, and automatic reconnection are handled by DSH’s built-in MCP client. The underlying connection defaults to https://api.ashareapi.com/mcp.
Once installed, for example, if you ask “How much is 600667 right now?” in DSH, the Agent will call the corresponding tool to return real data instead of fabricating numbers. The npm package version is 0.1.3, the license is MIT, and the requirements are Node.js ≥ 20 and dsh ≥ 0.2.0-rc.2.
Core Functions¶
The plugin exposes 31 A-share related tools (with names in DSH formatted as mcp__ashareapi__ashare_quote). Capabilities cover quotes, K-lines (candlestick charts), intraday charts, 5-level order books, financial data, fund flows, Dragon and Tiger lists, sectors, factor stock screening, macro data, convertible bonds, quantitative backtesting, etc., consistent with the tool list in the README.
5 tools available without an API Key:
ashare_quote: Real-time snapshotashare_kline: K-line (fixed forward-adjusted, noadjustparameter)ashare_hot: Hot search rankingashare_changedist: Price change distributionashare_market_overview: Market overview
The remaining 26 tools (such as ashare_orderbook, ashare_finance, ashare_backtest, etc.) require a Key obtained from the ashareapi pricing page to be configured.
The README also describes several server-side behaviors (borne by the ashareapi backend, not implemented locally by the plugin): multi-source data backup, fixed K-line calibers, distinction between “no market data” (e.g., trading suspension) and data fetch failures, and tool descriptions written for Agents. The plugin repository contains only index.js and configuration, with zero runtime dependencies.
Installation and Activation¶
Desktop / Web UI (Recommended)¶
- Install the client (macOS / Windows) from the DeepSeek Harness Desktop Download Page.
- Open the “Plugins” page on the left, enter the package name, and install:
ashareapi-dsh-plugin
The Web UI (dsh web) uses the same “Plugins” page, and the operation is identical. The README notes: Desktop profiles are managed by the desktop application; you cannot use the command-line plugin add below to install for Desktop; please use the Plugin page exclusively for Desktop.
After installation, restart or reopen DSH to use it in conversations. Command-line and Web UI installation will invoke local pnpm (not bundled with DSH; Desktop bundles a copy); if not installed, you can run npm i -g pnpm first.
Command Line (Web profile)¶
Start the Web UI:
npx @deepseek-ai/dsh web
Add the plugin:
npx @deepseek-ai/dsh plugin --profile web add ashareapi-dsh-plugin
If dsh is installed globally, you can replace npx @deepseek-ai/dsh with dsh. Restart dsh web after installation to take effect. You can check if the configuration is hooked up before starting:
npx @deepseek-ai/dsh --profile web --dump-config
The output should contain # == ashareapi-dsh-plugin.
Other installation methods (Command Line):
# From GitHub
npx @deepseek-ai/dsh plugin --profile web add github:ashareapi/ashareapi-dsh-plugin
# From local directory (Development/Debugging)
npx @deepseek-ai/dsh plugin --profile web add file:/absolute/path/ashareapi-dsh-plugin
Uninstall:
npx @deepseek-ai/dsh plugin --profile web remove ashareapi-dsh-plugin
Configuring API Key (Optional)¶
The 5 free tools can be called without configuration. To use the remaining tools, add the following to ~/.dsh/.env (or the corresponding directory for $DSH_HOME):
ASHAREAPI_KEY=ct-YOUR-KEY
Or override by ID in the profile’s cordis.patch.yml (for Web / Command Line: ~/.dsh/profiles/web/cordis.patch.yml):
- id: mcp-ashareapi
name: ashareapi-dsh-plugin
config:
apiKey: ct-YOUR-KEY
Configurable items also include url (default https://api.ashareapi.com/mcp), serverName (default ashareapi), headers, etc.; field descriptions can be found in the repository README.
Typical Usage¶
Once installed, simply ask questions in natural language within the conversation, and the Agent will select the corresponding tool. Examples of the mapping provided in the README:
| You can ask like this | Tool used |
|---|---|
| How much is 600667 right now? | ashare_quote |
| Pull the daily K-line for 600667 for the last 60 days. | ashare_kline |
| What is the market situation today? | ashare_market_overview |
| What stocks are people watching right now? | ashare_hot |
| What is the distribution of rising and falling stocks today? | ashare_changedist |
For parameters, return fields, and samples, see ashareapi documentation and the Endpoint List.
Use Cases and Notes¶
Who is it for: Developers and quantitative/investment research users who are already using DeepSeek Harness (Desktop, Web UI, or CLI) for research, Q&A, or automated workflows, and wish to query A-share quotes, K-lines, market overviews, or (after configuring a Key) financials, sectors, backtesting, etc., within the same conversation.
Category: The community directory classifies it as a “Networking Tool”; the directory site skillhub.cn has no official affiliation with DeepSeek / High-Flyer. The DSH ecosystem itself follows an “everything is a plugin” extension approach.
Security & Permissions: The plugin runs with the current dsh process permissions and will initiate network requests to the configured MCP URL. It is recommended to review the GitHub Source Code and the MIT license before installation. Please keep your ASHAREAPI_KEY secure and do not commit it to public repositories.
When not using DSH: The same MCP service can also be accessed via URL in other MCP-supported clients. See the ashareapi MCP page for details.
Conclusion¶
ashareapi-dsh-plugin integrates the official A-share MCP into DSH with minimal configuration: package name installation, 5 free tools without a Key, and 31 tools covering common needs from snapshots to quantitative backtesting. For further information, visit the plugin directory page skillhub.cn/plugins/ashareapi/ashareapi-dsh-plugin and the repository github.com/ashareapi/ashareapi-dsh-plugin.