Claude Code China Complete Guide
As of 2026-10-07, developers in China can run Claude Code by pointing ANTHROPIC_BASE_URL at QCode (for mainland China the docs recommend the asia.qcode.cc Asian node) and topping up with Alipay or WeChat Pay. claude-opus-5-5, claude-sonnet-5-5 and other models are available, and the same key also works with Codex.
Why Can't You Use Claude Code Directly in China?
Chinese developers face three barriers
Network Restrictions
api.anthropic.com cannot be reached directly from mainland China
Payment Incompatibility
Anthropic only accepts Visa/MasterCard and other international cards; Alipay, WeChat Pay, and UnionPay are not supported
Account Registration Barriers
Registering an Anthropic account requires an overseas phone number, and certain IP ranges are blocked from registration
Three Solutions Compared
From self-hosted proxies to professional subscription services — which works best for you?
| Solution | Stability | Setup Difficulty | Payment | Overall Cost | Recommended |
|---|---|---|---|---|---|
| VPN + Direct Access | Unstable | Complex | Int'l Card | Low | ⚠️ |
| Self-Hosted Proxy | Fairly Stable | Very Complex | Int'l Card | High | ⚠️ |
| QCode.cc Relay | High Availability | 5 Minutes | Alipay / WeChat / Cards | Low | ✅ |
QCode.cc Setup Tutorial
5-minute setup, start using Claude Code immediately
Create a QCode.cc Account
Register at qcode.cc. QCode is prepaid: top up first (Alipay or WeChat Pay for CNY), then pick a plan paid from your balance. No international credit card needed.
Sign Up Now →Get Your API Key
After signing in, create your API key in the dashboard (it starts with cr_). This is your credential for Claude Code and Codex.
Configure Environment Variables
Set two environment variables in your terminal: ANTHROPIC_BASE_URL to https://api.qcode.cc/api (no trailing slash) and your key in ANTHROPIC_AUTH_TOKEN; if a tool only reads ANTHROPIC_API_KEY, the same cr_ key works there. For mainland China, the docs recommend the asia.qcode.cc domain.
Verify the Connection
Run the following command to verify the connection works:
Claude Code Feature Compatibility
Local CLI features (chat, file edits, Bash, MCP, Skills, Plugins, subagents) work as usual; features that rely on Anthropic account-side hosted services, such as cloud sessions and Remote Control, are not available with a third-party API key
Claude Code Agent Teams
Multi-agent work in parallel — Agent Teams runs over the same Messages API path
MCP Protocol Integration
Model Context Protocol fully proxied, third-party tools connect seamlessly
Claude Hooks
Automated Hooks workflows and event-triggered scripts work normally
Official Agent SDK
Official Agent SDK (Python / TypeScript) on the same key — just point ANTHROPIC_BASE_URL here
Codex CLI
Codex CLI uses the OpenAI Responses protocol: set base_url to https://api.qcode.cc/openai and call GPT models such as gpt-6.1-sol
Streaming Responses (SSE)
Server-sent event streaming with low-latency real-time responses
Flexible Plans with Alipay Support
Choose your plan, scale anytime, no international card needed; daily limits reset at 00:00 Beijing time
Starter
¥60/mo
Daily limit $5
Great for individual developers
Basic
¥360/mo
Daily limit $35
Ideal for heavy use and small teams
Professional
¥820/mo
Daily limit $85
For high-frequency use and enterprise
Frequently Asked Questions
QCode also powers OpenAI Codex / GPT-5.6
Your QCode quota works across Claude Code and OpenAI Codex CLI — one shared balance, zero duplicate spend.
Start Using Claude Code Today
5-minute setup, top up with Alipay or WeChat Pay; for mainland China the docs recommend asia.qcode.cc