> Source: https://ashareapi.com/en/docs/mcp-china/qoder/  ·  Markdown version for LLMs / AI agents

China platform setup

# Connect A-share data in Qoder
 Qoder works. One config file is all it takes — it forwards custom headers, so paid tools work too.

## Setup
 1 Edit the config file (recommended, supports keys)
 Open **~/.qoder-cn/mcp.json** (on Windows: `C:\Users\ \.qoder-cn\mcp.json`) and write the following, then save:
 mcp.json
```
{
 "mcpServers": {
 "ashareapi": {
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-YOUR-KEY" }
 }
 }
}
``` For free tools only, delete the `headers` line. Qoder reloads and reconnects automatically — **no IDE restart needed**.

 2 UI route (free tools only)
 Click your **avatar** (top right) → **Personal settings** → **MCP services** → **+** → **Add manually** → type **SSE**, service address `https://api.ashareapi.com/mcp` → confirm.
 ⚠️ The UI form only has "name + service address" — **no header field**. To use paid tools, use the config file from step 1.

 3 Use it in Agent mode
 Back in the chat, switch the mode (bottom left) to **Agent** and just ask.
 ⚠️ Without an open project folder Qoder stays in plain Q&A mode and cannot call MCP tools — open a folder first. Up to 10 MCP servers at once.

## Paid tools? Add a key
 These **6 free tools** need no key: quote / K-line / hot list / market overview / breadth / docs search. For financials, fund flow, dragon-tiger list, sectors, factor screening or backtests, add a key (trial from ¥9.9, all 86 tools). Put it in the `headers` of the step-1 config:
 headers in mcp.json
```
"headers": {
 "Authorization": "Bearer ct-YOUR-KEY"
}
```
 ⚠️ The header name must be `Authorization` and the value must start with `Bearer` (**one space after Bearer**). A typo shows up as "unauthorized" when a paid tool is called.

## What to ask once it works

-
 What is the price of 600667 right now?

-
 Pull the last 60 daily candles for 600667

-
 How is the market doing today?

-
 What is the fund flow for 太极实业 (600667) today?

-
 Find stocks with PE below 20 and ROE above 15

-
 What did institutions buy on the dragon-tiger list today?

## FAQ
 Qoder docs say only SSE is supported. Will this work?
 **Yes.** Qoder's "SSE" option actually speaks standard Streamable HTTP (POST requests carrying an `Mcp-Protocol-Version` header) and connects straight to `https://api.ashareapi.com/mcp` — initialize, notification and tool listing all succeed. The label in the UI does not change the wire protocol.

 Why is there no field for a key in the UI?
 The manual-add form only offers name and service address. Use the config file from step 1 instead — `headers` there is honoured and the `Authorization` header is forwarded verbatim.

 Do I need to restart Qoder after editing the config?
 No. Saving `mcp.json` triggers an automatic reload and reconnect; the status updates within seconds.

 It says connected but tools do not run.
 ① Make sure the chat is in **Agent** mode ② open a project folder ③ the URL ends with `/mcp` ④ stock codes need a market prefix (sh600667 / sz000001 / hk00700).

## Related

-
[China platform overview](/en/docs/mcp-china)

-
[MCP setup (client list)](/en/mcp)

-
[Pricing and keys](/en/pricing)

 No key yet?
 Try the free tools without a key; get one for all 39 tools (from ¥9.9).

 [Full MCP setup](/en/mcp)[Pricing](/en/pricing)

 Official docs：[https://help.aliyun.com/zh/lingma/user-guide/guide-for-using-mcp](https://help.aliyun.com/zh/lingma/user-guide/guide-for-using-mcp) · Last checked：2026-10-29
