Claude Code Installation and Advanced Guide: Bypass Account Ban Risks, Master Permissions, MCP, and Skills

A practical path for developers in China to bypass Claude Code network and ban hurdles via NPM and cc-switch.
The article tackles network restrictions, account bans, and permission configuration issues for Claude Code users in China. It recommends NPM installation over the official script (with Node.js 22+ and Git pre-installed, VPN on throughout), and using the open-source cc-switch to configure a third-party API Key and skip official login. Once installed, leverage permission modes, MCP, and Skills rather than chat-only usage. It also notes DeepSeek Harness has a higher cache hit rate but isn't yet supported by cc-switch, and domestic models already meet daily coding needs.
Claude Code is becoming a standard tool in the daily coding workflow of developers in China, but network restrictions during installation, account ban risks, and permission configuration issues leave many stuck at the first step. Based on real-world experience shared by frontline developers, this article lays out a practical, actionable path—from installation and login to permission modes and advanced usage of MCP and Skills.
Installation: Why NPM Is Recommended Over the Official Script
According to the official documentation, Windows users can run the installation command in PowerShell or CMD, but success rates are less than ideal on domestic networks. Some developers report that running the official script directly over carrier networks often results in interrupted downloads or timeouts.

A more reliable approach is to install via NPM. The official advanced settings provide an NPM installation option, provided that Node.js (version 22 or higher) and Git are already installed locally. Both can be downloaded as installers from their official websites—just click through with the defaults. If C drive space is tight, you can manually change the installation directory. After installation, run claude --version in the command line to verify; if the version number prints correctly, the installation succeeded.
One reminder: keep your VPN/proxy tool enabled throughout the installation process. Experienced developers suggest buying VPN memberships month-to-month rather than annually, since these services tend to fluctuate in stability, and a year-long subscription can be hard to recoup if service is interrupted.
NPM (Node Package Manager) is the package management tool in the Node.js ecosystem, through which developers install, upgrade, and share JavaScript libraries and command-line tools. Claude Code officially offers an NPM installation method, which essentially publishes the CLI as a global npm package—running npm install -g completes the setup. Compared with the official script, which downloads binary files from overseas servers, NPM can leverage domestic mirror sources (such as the Taobao mirror) for acceleration, and the download process supports retries, resulting in a higher success rate on domestic networks. Another advantage of NPM installation is convenient version management—upgrading later only requires re-running the install command.
Login: Bypassing Account Bans with cc-switch
On first run, Claude Code will prompt you to trust the folder, choose a theme style, and select a login method. The official login method carries the risk of account bans; some developers have encountered bans even when using their own accounts.

The alternative is to use the open-source tool cc-switch. Originally hosted on GitHub, this tool now also has its own website. Download the Windows msi installer and double-click to install. Open it, select the Claude Code configuration item, click the plus sign to add a provider, enter the API Key, and save. cc-switch supports mainstream model providers on the market and also allows custom configurations—addresses and keys from third-party relay services can also be entered.

Once configured, re-enter the claude command and the login step will be skipped entirely. The sharer reports having run this setup stably for several months without encountering any ban issues. The same approach applies to Codex, but note that different tools in cc-switch require separate configuration switching; otherwise Codex may fail to call the configured model.
cc-switch is an open-source configuration-switching tool whose core purpose is to centrally manage API endpoints and keys for multiple AI coding tools and to quickly switch provider configurations between tools. It does not modify Claude Code itself; instead, it writes to configuration files so that Claude Code reads the third-party API address and key directly at startup, thereby skipping the official account login flow. Since requests go through the user's own API channel and do not rely on the official account authentication system, the ban risk associated with official login is avoided. When using it, make sure the API Key comes from a trusted provider and be careful not to leak your key.
Permission Modes and Built-in Capabilities: Don't Just Use Natural Language Chat
Many developers use Claude Code only through natural language conversation, such as "help me build such-and-such a feature." While this works, results are not ideal. Claude Code's built-in permission modes let you control how autonomously the tool operates on file reads/writes, command execution, and other actions. Proper configuration strikes a balance between safety and efficiency.
According to the sharer's observation, most companies rolling out AI coding have explicit code-contribution targets, ranging from 50% to 90%. Against this backdrop, treating Claude Code as a mere chat tool means giving up its full capabilities as a coding agent. Its built-in command system and context management mechanisms are the real key to improving output quality.
MCP, Skills, and Submit: Three Levers for Advanced Practice
MCP (Model Context Protocol) enables Claude Code to connect to external tools and data sources, expanding its capability boundaries. Skills provide reusable skill modules that package common tasks into standardized workflows. The Submit mechanism manages task submission and context passing. Used together, the three can transform Claude Code from "an editor that can chat" into "an agent that can execute complex workflows."
The sharer notes that tools commonly used by developers in China today include Claude Code, Codex, Cursor, Trae, and others. These are all essentially coding agents, with no absolute good or bad—pick whichever feels comfortable. But absent special company constraints, he personally recommends Claude Code or Codex.
MCP (Model Context Protocol) is a protocol standard proposed and open-sourced by Anthropic to let large models connect to external tools, databases, and APIs in a unified way. It defines the communication specification between clients and servers: developers only need to implement an MCP server once, and it can be called by Claude Code and other clients that support the protocol. MCP solves the problem of "how a model can safely access the outside world." Compared with directly stitching together prompts, it provides structured tool descriptions, permission control, and result-return mechanisms, making it foundational infrastructure for expanding the capability boundaries of coding agents.
Model Selection and Real-World Observations on Cache Hit Rates
At the model level, the sharer compared the actual experience of DeepSeekAd Harness and Claude Code, noting that DeepSeek Harness has a relatively higher cache hit rate and an advantage in usage cost. However, cc-switch does not yet support DeepSeek Harness, so it requires separate configuration.

On whether to pursue foreign models, his judgment is: if you only need to meet daily work requirements, domestic models are already sufficient. Competition in model capabilities among major vendors continues, but existing capabilities cover most coding scenarios—no need to obsess over model rankings.
Cache hit rate refers to the proportion of context with identical prefixes that a model provider caches and reuses during continuous conversations or repeated requests, thereby billing at a discounted rate. Coding agent workflows often contain large amounts of repeated system prompts, tool definitions, and file context; the higher the cache hit rate, the fewer tokens are actually billed and the faster the response. Cache strategies and billing discounts vary significantly across vendors, so the same task may cost several times more on one model than another. When evaluating models, besides capability rankings, cache hit rate is an important metric for measuring long-term usage cost.
Final Thoughts
The barrier to installing Claude Code is mainly not technical—it lies in the network and the account. The combination of NPM installation plus cc-switch configuration bypasses the ban risk of official login and is currently the more pragmatic path. Once installed, put permission modes, MCP, and Skills to use to unlock the tool's true value.
One-line Summary
A practical path for developers in China to bypass Claude Code's network and ban hurdles using NPM installation plus cc-switch configuration.
Paragraph Summary
The article addresses the network restrictions, account bans, and permission configuration issues developers in China face when using Claude Code, offering a practical, actionable path. For installation, it recommends NPM over the official script, requiring Node.js 22+ and Git pre-installed and keeping the VPN/proxy tool on throughout. For login, it suggests using the open-source tool cc-switch to configure a third-party API Key and skip official login to avoid ban risks. Once installed, use built-in capabilities like permission modes, MCP, and Skills rather than relying on natural language chat alone. At the model level, the author notes DeepSeek Harness has a higher cache hit rate but is not yet supported by cc-switch, and that domestic models already meet daily coding needs—no need to chase foreign models excessively.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.