How to Install Codex and Claude in Mainland China: A One-Click Setup Guide
Network restrictions in Mainland China often make downloading and configuring AI coding clients like Codex and Claude inconvenient. Little Mungbean simplifies this process by providing a free, open-source local AI gateway manager that supports one-click installation for Codex CLI, Codex Desktop, Claude Code, and Claude Desktop, while letting you route requests through accessible third-party relay APIs or a local proxy.
Prerequisites
- Get Little Mungbean from the Little Mungbean official website or its GitHub repository.
- Prepare a valid API endpoint URL and
API-KEYfrom an official provider or a third-party relay service.
Step 1: Install Codex or Claude Clients with One Click
Instead of manually hunting for installers or troubleshooting package managers across restricted networks, you can install the supported clients directly from the Little Mungbean interface:
- Open Little Mungbean and locate the Agent Client section.
- Select the client you want to install: Codex CLI, Codex Desktop, Claude Code, or Claude Desktop.
- Click the install button to trigger the one-click installation.
Note on Network Boundaries: While Little Mungbean provides built-in one-click installation and local gateway routing, the official documentation does not specify dedicated domestic download mirrors for client installers. If an upstream download source or API endpoint is blocked on your network, you will still need an accessible relay endpoint or a local system proxy.

Step 2: Configure the API Endpoint and Verify Connectivity
After installing the client, configure an upstream provider so the client can communicate through Little Mungbean's local gateway. In Mainland China, using a reachable third-party relay endpoint is a common way to avoid direct connection timeouts.
- In the provider settings, select a built-in provider preset to auto-fill the endpoint URL, or manually enter your official or third-party relay API endpoint URL and
API-KEY. - Click Fetch Models.
Verification: If the model list loads, your endpoint URL, API-KEY, and network connection to the provider are working properly. If fetching models fails, double-check your credentials or configure a local system proxy on your computer so Little Mungbean can reach the provider's API.

Step 3: Select and Inject the Model List
Once the models are fetched, choose which models to expose inside your installed Codex or Claude client:
- Click individual model cards to enable or disable their injection into the target client.
- Select an injection mode:
- Default model list: Populates only the client's native model family slots.
- Gateway model list: Injects the complete gateway model list, including cross-family models (such as running Claude or Gemini models inside Codex, or GPT models inside Claude).
If you inject cross-family models and your upstream relay does not already perform server-side protocol translation, enable Local protocol conversion in Little Mungbean. It automatically translates requests and streaming responses between OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and Gemini GenerateContent formats.

Step 4: Start the Gateway and Connect the Client
- Click Start • Connect in Little Mungbean.
- Wait for the application to automatically launch or restart your target Agent client and inject the selected model list.
Verification: Confirm that the status indicator on the Agent client turns green. Once the green light is active, open your Codex or Claude client and switch models directly within the client interface to start coding and chatting through the local gateway.

If Start • Connect fails, your network cannot reach the configured provider endpoint—verify your local system proxy settings or switch to an accessible relay provider. If you later need to switch between the local API gateway and an official account sign-in, click Switch account mode in Little Mungbean to toggle modes with one click.
Updated