China Snapshot MCP examples
Search bilingual Chinese policy publication records, inspect official statistics and export platform-ranking observations. Every record retains its source URL. Coverage is what China Snapshot collected, not a complete record of every publication.
Remote endpoint: https://china-snapshot.com/api/mcp (Streamable HTTP).
Discover without a key
Python 3.10 or later, standard library only:
python3 monitor.py
This sends initialize and tools/list. It returns tool names and schemas, not archive records. The included .mcp.json config provides the same keyless discovery for clients that support Open Plugins. Calling tools still requires a key configured in the client.
Find records with a free key
Get a free key through the human-facing form at API access. The service emails the key to you. Store it as CHINA_SNAPSHOT_KEY in your environment through your shell or secret manager. Do not put it in this repository or pass it as a command-line argument.
python3 monitor.py --records --watch export-controls
The example calls find_records for one page of at most five documents. Read the source links and coverage information before citing a result. Empty results mean no matching records in that page and access window, not that no relevant policy exists.
A non-null next_cursor means more records remain. Repeat the same command with --cursor '<next_cursor>' and the same watch. This example never schedules polling or saves a cursor automatically.
Monitor changes with a paid key
Starter, Pro and Scale add the change feed and saved alerts. All three paid plans include the full retained archive, with different request and alert allowances. Current prices and whether checkout is open are shown at API plans. A free key does not unlock changes.
python3 monitor.py --changes-since '2026-11-16T00:00:00+00:00' --watch export-controls
Replace the example time with your own starting instant. The tool reports new, newly discovered and revised records; newly discovered is new to this collection, not necessarily newly published. Recent events settle before appearing. Follow next_cursor with the same starting time and watch until it is null. Preserve the last completed boundary if you build a recurring integration; do not confuse an unfinished page with a completed poll.
This command reads one page only. It never creates alerts or sends mail. For email or signed-webhook alert setup, see the developer guide.
Client setup
The endpoint lists tools without authentication. Add Authorization: Bearer <your key> in your client's private credential configuration before calling one. Never add a real key to .mcp.json.
For Claude Code, after loading the environment variable:
claude mcp add --transport http china-snapshot https://china-snapshot.com/api/mcp --header "Authorization: Bearer $CHINA_SNAPSHOT_KEY"
That client configuration stores a credential; keep it outside version control. Other clients differ in support for custom Bearer headers. Check your client's documentation rather than treating this keyless plugin config as authenticated access.
Publishing this example package
Links
- Docs: https://china-snapshot.com/docs/mcp/overview
- OpenAPI: https://china-snapshot.com/openapi.json
- Official MCP registry name:
com.china-snapshot/china-snapshot - Agent front door: https://china-snapshot.com/llms.txt