Docker image: ashareapi/mcp
Already using Docker? No Python, no dependencies — one command and you are in. The image contains only the MCP client; all data comes from api.ashareapi.com.
Two commands
MCP mode (stdio — for Claude Code / Cursor / Codex and other clients)
Best for: keeping Python and dependencies out of your host; clients that speak MCP over stdio
docker run -i --rm -e ASHARE_KEY=ct-你的Key ashareapi/mcpGateway mode (HTTP — one egress point for your intranet, easy to audit)
Best for: scripts / intranet batch jobs / a single egress with audit / key mapping (the container only forwards, it stores no data)
docker run -p 8080:8080 -e ASHARE_KEY=ct-你的Key ashareapi/mcp gatewayThen you can just curl it, for example:
curl "http://localhost:8080/v1/quote?code=600519"Which of the three to use
| Option | Best for | Container? |
|---|---|---|
| Local container · MCP (stdio) | AI clients fetching data; no Python on the host, isolated deps | Yes (docker run -i) |
| Local container · gateway (HTTP) | Scripts / intranet batch / single egress / audit / key mapping | Yes (-p 8080:8080) |
Remote MCP (api.ashareapi.com/mcp) | No container, client supports remote MCP | No |
All three return the same data (same backend) with the same key and quota — the only difference is who runs the process.
What's inside
- · Two files only: the MCP client and the entrypoint (~128 KB) on top of python:3.12-slim
- · No data source: quotes / K-lines / financials all come from
https://api.ashareapi.com - · No key baked in: the key is passed only via an environment variable
- · Free tools need no key: quotes / K-lines / hot list / market overview / breadth / doc search
Environment variables
| Variable | Meaning | Default |
|---|---|---|
ASHARE_KEY | API key (optional for free tools) | none |
ASHARE_API | API endpoint | https://api.ashareapi.com |
PORT | gateway port | 8080 |
Official channels (all published)
Same key, same quota — every channel is native.
- Python SDK — PyPI
- Node.js / TypeScript SDK — npm
- MCP server — GitHub
- Docker image — Docker Hub
- Official MCP Registry — com.ashareapi/ashare-data-api
- Agent Skill — GitHub
Free tools need no key; paid tools (financials / money flow / dragon-tiger / screening / backtests) start at ¥9.9.
Build it yourself
Source, Dockerfile and build notes live in the MCP repo:github.com/ashareapi/ashareapi-mcp/docker