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

AI-native

# Connect your AI Agent (MCP)
 MCP is the protocol that lets an AI Agent call external tools. Set it up once, then ask “how is the money flow on 太极实业 today” and the AI looks it up itself.

 How it works, in one sentence
 Your AI Agent (Claude Code / Codex and others) connects to our service over MCP and turns your plain-language questions into API calls. **You write no code** — the AI does that part.

## Setup (3 steps)
 1 Pick your client, then find the config file (UI-only clients add it in settings)
 Claude Code `.mcp.json`
 Cursor `.cursor/mcp.json`
 VS Code `.vscode/mcp.json`
 Codex `~/.codex/config.toml`
 OpenCode `opencode.json`
 Gemini CLI `~/.gemini/settings.json`
 Cline `~/.cline/mcp.json`
 Windsurf `mcp_config.json`
 CodeBuddy `~/.codebuddy/.mcp.json`
 WorkBuddy `~/.workbuddy/mcp.json`
 Trae `设置 → MCP → 手动配置`
 Kimi Code `~/.kimi/mcp.json`
 ZCode `~/.zcode/cli/config.json`
 MiMo Code `mimocode.json`
 Kilo Code `kilo.jsonc`
 Manus `设置 → 集成 → 自定义 MCP`
 Devin `~/.config/devin/mcp_config.json`
 OpenClaw `~/.openclaw/openclaw.json`
 Hermes `~/.hermes/config.yaml`

 China platforms (same URL + header, nothing to install)
 Alibaba Cloud Bailian `MCP management → Create MCP service → http`
 Coze `Extensions → MCP → Add custom MCP (paste JSON)`
 Tencent Yuanqi `MCP plugin → fill in the URL`
 Tencent Cloud Agent Platform `Plugin square → custom plugin → based on MCP`
 Volcengine Ark `Responses API → tools[type=mcp] + headers`

 [Step-by-step guide for each China platform →](/en/docs/mcp-china)

 2 Paste the config
 Add the block below to your config file or settings (replace ct-your-key with your key; **free tools only** can drop the Authorization line).

 .mcp.json

```
{
 "mcpServers": {
 "ashareapi": {
 "type": "http",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 .cursor/mcp.json

```
{
 "mcpServers": {
 "ashareapi": {
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 .vscode/mcp.json

```
{
 "servers": {
 "ashareapi": {
 "type": "http",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.codex/config.toml

```
[mcp_servers.ashareapi]
url = "https://api.ashareapi.com/mcp"
http_headers = { Authorization = "Bearer ct-your-key" }
```
 opencode.json

```
{
 "$schema": "https://opencode.ai/config.json",
 "mcp": {
 "ashareapi": {
 "type": "remote",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.gemini/settings.json

```
{
 "mcpServers": {
 "ashareapi": {
 "httpUrl": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.cline/mcp.json

```
{
 "mcpServers": {
 "ashareapi": {
 "type": "streamableHttp",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 mcp_config.json

```
{
 "mcpServers": {
 "ashareapi": {
 "serverUrl": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.codebuddy/.mcp.json

```
{
 "mcpServers": {
 "ashareapi": {
 "type": "http",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.workbuddy/mcp.json

```
{
 "mcpServers": {
 "ashareapi": {
 "type": "http",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 设置 → MCP → 手动配置

```
{
 "mcpServers": {
 "ashareapi": {
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.kimi/mcp.json

```
{
 "mcpServers": {
 "ashareapi": {
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.zcode/cli/config.json

```
{
 "mcp": {
 "servers": {
 "ashareapi": {
 "type": "http",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
 }
}
```
 mimocode.json

```
{
 "mcp": {
 "ashareapi": {
 "type": "remote",
 "url": "https://api.ashareapi.com/mcp",
 "oauth": false,
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 kilo.jsonc

```
{
 "mcp": {
 "ashareapi": {
 "type": "remote",
 "url": "https://api.ashareapi.com/mcp",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 设置 → 集成 → 自定义 MCP

```
服务器名称：ashareapi
服务器 URL：https://api.ashareapi.com/mcp
身份验证：Bearer ct-your-key
```
 ~/.config/devin/mcp_config.json

```
{
 "mcpServers": {
 "ashareapi": {
 "url": "https://api.ashareapi.com/mcp",
 "transport": "http",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
}
```
 ~/.openclaw/openclaw.json

```
{
 "mcp": {
 "servers": {
 "ashareapi": {
 "url": "https://api.ashareapi.com/mcp",
 "transport": "streamable-http",
 "headers": { "Authorization": "Bearer ct-your-key" }
 }
 }
 }
}
```
 ~/.hermes/config.yaml

```
mcp_servers:
 ashareapi:
 url: "https://api.ashareapi.com/mcp"
 headers:
 Authorization: "Bearer ct-your-key"
```
 Claude Desktop: its remote connections use OAuth (per the MCP spec), so this method is not supported yet — use one of the clients above. ChatGPT (web / desktop app) can take remote MCP servers too, but via Developer mode → Apps → Create custom connector (Business / Enterprise / Edu workspaces), which has nothing to do with config.toml. Any other client that supports remote MCP with custom request headers works the same way: fill in the URL and the Authorization header.

 3 Restart your AI Agent, then ask
 After restarting, just ask in chat, for example:

-
 How is the money flow on 太极实业 (600667) today?

-
 Which sectors gained the most over the last 5 trading days?

-
 Find me stocks with PE under 20 and ROE above 15

-
 Is CSI 300 expensive right now?

-
 What did institutions buy on the top-trader boards today?

 How to confirm it works: ask it “can you look up A-share data?”, or check that `ashareapi` shows up in your client’s MCP list.

## Which tools it exposes
 The AI calls them when it needs to. In your client they show up with an ashare_ prefix (e.g. ashare_quote); you never have to remember these names.
 Quotes (free, no key)

-
 quote snapshot

-
 kline candles

-
 hot attention list

-
 changedist breadth

-
 market_overview

 Per-stock depth (key required)

-
 orderbook five-level order book

-
 snapshot full profile (valuation / cap / shares / limit price)

 Fundamentals

-
 finance statements

-
 technical indicators

-
 shareholder research

-
 dividend history

-
 events tags

 Money

-
 fund flow + boards + block + margin

-
 lhb board split

 Sectors & macro

-
 sector performance

-
 sector_valuation

-
 macro indicators

-
 screen factor screening

-
 bond convertibles

 More

-
 etf data

-
 ipo calendar

-
 dehydrated research notes

-
 search

-
 usage

 Why this beats an SDK for this job
 A classic data API makes you build the integration yourself (SDK + auth + error handling). MCP hands that job to the AI — you just describe what you want.**For research-with-AI workflows, that is far less work than an SDK.**

 No key yet?
 Free tools (quote / kline / hot / market overview / breadth) need no key; the rest need one (from ¥9.9 — all 24 tools unlocked).

 [Quick start](/en/docs)[Get a Key](/en/pricing)
