Skip to content

What Is Qwen Code? Setup, Is It Free, Which Models It Works With, MCP and Approval Modes

You type qwen in a project folder and describe the job in plain language; Qwen Code reads and edits files, runs commands and explains the result. It's an open-source (Apache-2.0) terminal coding agent from Alibaba's Qwen team; it has no model of its own: it connects with a Qwen account (Plus or Pro subscription), an Alibaba Cloud or QwenCloud key, an OpenAI, Anthropic or Gemini-compatible provider, or a local model such as Ollama. Subagents, skills, MCP and approval modes that draft a plan first are built in; there are also VS Code, Zed and JetBrains extensions and a desktop app.

What it does
Coding agent that edits files and runs commands in the terminal
Type
Open-source terminal agent (Apache-2.0)
Model
No model of its own; subscription, API key or local model
Where
Terminal, VS Code, Zed, JetBrains, desktop
Approval
Default Auto: doesn't ask for what it deems safe
Latest release
0.28.0 (November 17, 2026)
Price
Software is free; the old free Qwen allowance has ended

What is Qwen Code and what does it do?

You want an AI agent to handle repetitive work in a software project (getting to know the repo, fixing bugs, editing files, running tests), but you don't want to be tied to one company's model. Qwen Code is a terminal coding agent built for that: the program that gives the model tools for reading files, editing and running commands, and manages the conversation. Its official description is "the open-source AI coding agent for your terminal, editor, desktop, browser, and chat". Its early versions were derived from Google's Gemini CLI; since version 0.1 it has been developed separately.

You type qwen in a folderYou start it in the project folder it will work in; it reads QWEN.md and AGENTS.md instructions automatically.
You describe the job in plain languageYou reference a file with @; if you want a plan first, you type /plan.
You see the changes and commandsDepending on the approval mode you choose, it either asks or approves what it considers safe on its own.
The default Auto mode decides with a classifier; on important projects, use version control or switch to Ask Permissions mode.

Who it's for: developers comfortable in the terminal who want to choose their own model and provider; teams that run open Qwen models on their own servers and want a coding agent for them; developers at small agencies maintaining client sites. Who it's not for: people who don't use a terminal or code editor and want to build a site without writing code.

Sources: README ("Why Qwen Code?", Capabilities, Acknowledgments), November 18, 2026.

How do you install Qwen Code? macOS, Linux, Windows, npm

The commands are taken verbatim from the official README. The recommended one-line installer downloads and runs a script from Alibaba's storage address. The npm route requires Node.js 22 or newer; here it's pinned to the latest stable release as of November 18, 2026 (0.28.0). Restart your terminal after installing.

Install a specific version› npm install -g @qwen-code/qwen-code@0.28.0

The README's command is npm install -g @qwen-code/qwen-code@latest; 0.28.0 was released on November 17, 2026. Preview releases are published under a separate tag (preview).

  1. Start it in the project folder: Go to the folder with cd and type qwen.
  2. Connect the model: On first launch or with /auth, choose a sign-in route: Qwen account (subscription), QwenCloud, Alibaba ModelStudio, a third-party provider or a custom provider. Details in the "Which models" section below.
  3. Write your first request: The first request the README suggests: "Explain this repository and show me where to start."

Sources: README (Installation, Quick Start, How to Use), VS Code integration doc, npm registry (November 18, 2026).

How do you use Qwen Code? What you type, what you get

The requests below come from the examples in the official README and docs; the results are described only as far as the docs describe them. You can also write requests in Turkish; the reply language depends on the model you connect and the /language output setting.

Getting to know a repo"Explain this repository and show me where to start."What you get: Qwen Code scans the folder, explains the main folders and files and shows you where to start. Since the request only asks for an explanation, it doesn't touch files.
Draft a plan without touching files› /plan refactor the auth module

What you get: in Plan mode, Qwen Code reviews the code using read-only operations and writes a step-by-step change plan; it doesn't edit files or run commands. If you like the plan, you return to the previous mode with /plan exit and have it carried out.

One-off task in a script (headless)› qwen -p "Summarize the repository layout."

What you get: the reply is written to the terminal without opening the interactive interface; it's used in scripts, CI or batch jobs. Because browser sign-in can't be completed in these environments, the official docs recommend an API-key sign-in route. According to the docs, the default approval mode for these runs is Ask Permissions; for jobs that need file edits or commands, set the approval mode explicitly with --approval-mode.

Other ways to run it

/resume returns to a previous session; /goal keeps the session working until an independent verifier accepts the result; /loop re-runs a request on an interval. With qwen serve it runs as a background service, and the browser, editor or SDK connect to the same sessions (experimental). It can connect to Telegram, DingTalk, WeChat, email or GitHub channels and take work from there with qwen channel start.

Sources: README (Quick Start, How to Use, Daemon Mode, Capabilities), Approval Mode doc (November 18, 2026).

Which models does Qwen Code work with? Sign-in routes and plans

Qwen Code has no model of its own. On first launch or with the /auth command, you choose one of five sign-in routes; within a session you switch models with /model. The moment you switch, usage limits, fees and data terms switch to that provider's.

Sign-in routeWhat you needNote (official docs)
Qwen account (Qwen OAuth)An active Plus or Pro subscription on chat.qwen.aiBrowser sign-in; quota depends on the subscription plan. The old free allowance ended on April 15, 2026
QwenCloudA Token Plan key or a pay-as-you-go API keyThe China or International platform is chosen explicitly; built-in web search is enabled
Alibaba ModelStudioA Coding Plan, Token Plan or standard API keyCoding Plan has a fixed monthly fee and a weekly quota; models: qwen3.5-plus, qwen3.6-plus, qwen3.7-plus, qwen3-coder-plus, qwen3-coder-next, qwen3-max-2026-01-23, glm-5, glm-4.7, kimi-k2.5, MiniMax-M2.5
Third-party providerThat provider's API keyDeepSeek, Grok, MiniMax, Z.AI, Kimi, Idealab, ModelScope, OpenRouter, Requesty
Custom provider / API keyAn OpenAI, Anthropic or Gemini-compatible endpointOpenAI, Anthropic, Google, Azure OpenAI, Vertex AI, or a local server such as Ollama and vLLM

Which should you pick? If you already have a chat.qwen.ai Plus or Pro subscription, the Qwen account route works without dealing with keys. If you want a predictable monthly fee, the Alibaba Cloud Coding Plan; if you want to pay for what you use, a QwenCloud or Model Studio standard key. If you don't want your code to leave your computer, a local model running in Ollama or vLLM (including open Qwen models); speed and quality depend on your hardware. If you'll use Claude models, you need an Anthropic API key. The /effort command sets the selected model's thinking level.

Connecting with environment variables only, for scripts and CI (QwenCloud International endpoint)› export OPENAI_API_KEY="sk-your-api-key" export OPENAI_BASE_URL="https://maas.qwencloudapi.com/compatible-mode/v1" export OPENAI_MODEL="qwen3.8-max"

According to the docs, to select OpenAI-compatible sign-in with environment variables alone, you set OPENAI_API_KEY. Provider-specific keys such as QWENCLOUD_API_KEY in the docs' example work only when a provider entry in ~/.qwen/settings.json declares that key as its envKey.

The differences, licenses and API prices of the Qwen models are in the Qwen guide.

According to Anthropic's Claude Code legal document, third-party apps aren't allowed to offer Claude.ai sign-in. For Claude models in Qwen Code, use an Anthropic API key (Claude Console) or a supported cloud provider.

Checked on November 18, 2026. Sources: the Authentication doc (five sign-in routes, Coding Plan model list, environment variables) and the Terms of Service and Privacy Notice (end of the free allowance). The quota for the Coding Plan and the Qwen Plus/Pro subscription inside Qwen Code is not stated as a number in the official docs; they point to the Alibaba Cloud console and chat.qwen.ai.

Is Qwen Code safe? Approval modes: Plan, Ask Permissions, Auto, YOLO

The approval mode decides how freely Qwen Code works. Within a session, Shift+Tab (Tab on Windows) cycles through the modes; the status bar at the bottom shows which mode you're in.

ModeFile editingCommandsWhen
PlanNone, read-onlyNot runExploring code, planning changes
Ask PermissionsWith your approvalWith your approvalNew or unfamiliar codebases, critical projects
Auto-EditApproves on its ownWith your approvalEveryday edits
Auto (default)A classifier decidesA classifier decidesLong sessions
YOLOApproves on its ownApproves on its ownOnly trusted, controlled environments
Sandbox

The sandbox isn't on by default. On Linux there's a tool sandbox you enable in your user settings after installing bwrap (e.g. writes only to the workspace, network closed); on macOS Seatbelt, and elsewhere Docker or Podman can be used. Wide-ranging edits can be isolated in a temporary git worktree.

Background service

qwen serve listens on a local address without authentication by default; any process on that machine can use the API, including code execution. On a shared machine, set QWEN_SERVER_TOKEN and use --require-auth.

Sources: Approval Mode and Sandbox docs, README Daemon Mode (November 18, 2026). This is not a security audit.

MCP, skills, subagents and hooks

MCP (Model Context Protocol) is a common connection format that lets an AI use a service or tool (a database, an internal API, a file store). Qwen Code loads MCP servers from the mcpServers field in settings.json or through the qwen mcp commands.

Add a remote MCP server (official example)› qwen mcp add --transport http my-server http://localhost:3000/mcp

What you get: when Qwen Code opens, typing /mcp lists the server and its tools; you ask the model to use that server's tools. If Qwen Code was already running, restart it in the same project. Allow and deny lists of tools can be set per server.

WhatWhat it does
SubagentDelegates a focused subtask to another agent with its own context and tools
SkillBuilt-in skills (/review, /batch, /bugfix); /learn distills new skills from docs or code
Auto-MemoryThe agent writes its own notes and recalls them in later sessions
HookRuns your own script before and after tool calls, at session start and end
Agent Teams, Arena (experimental)A lead agent coordinates a team; Arena runs the same task on several models in separate worktrees to compare

Sources: MCP doc, README Capabilities (November 18, 2026).

Is Qwen Code free? Has the free tier ended?

The software itself is free and open source (Apache-2.0). The money goes to the model. There used to be a free quota when signing in with a Qwen account; according to the official docs, this old free Qwen OAuth allowance ended on April 15, 2026. Today, signing in with a Qwen account requires an active Plus or Pro subscription on chat.qwen.ai. The way to use it for free is a local model (hardware cost only) or another provider's own free tier.

Allowed
  • Using, modifying and distributing it, including commercially (Apache-2.0)
Not allowed
  • Removing the license and notice text from copies
  • The software is provided without warranty

Sources: LICENSE (Apache-2.0), Terms of Service and Privacy Notice, Authentication (November 18, 2026). The price of the Qwen Plus and Pro subscription is in the Qwen guide. This is not legal advice.

Does Qwen Code work in Turkish?

InterfaceNoBuilt-in interface languages: Chinese, English, Russian, German, Japanese, Portuguese (Brazil), French, Catalan.
Turkish requests and repliesUnclearThe /language output command sets the model's reply language (the docs give Chinese, English and Japanese as examples). Turkish reply quality depends on the model you connect; the official sources don't mention Turkish.
DocumentationNoThe docs are in English, Chinese and a few other languages; not Turkish.

Where do my code and data go?

Model provider

Files read and your requests go to the provider you connect, and its terms apply: the Qwen privacy policy for a Qwen account, Alibaba Cloud's for the Coding Plan, that provider's for your own key. With a local model, nothing leaves your computer.

Usage statistics

Anonymous usage statistics and error reports are on by default for all sign-in routes and go to Alibaba Cloud RUM. To turn them off, set "privacy": { "usageStatisticsEnabled": false } or QWEN_USAGE_STATISTICS_ENABLED=false.

Keys

Settings and keys can be stored in ~/.qwen/settings.json; keep this file out of repos. In CI, use environment variables.

Sources: Terms of Service and Privacy Notice, Authentication (November 18, 2026).

How do you uninstall Qwen Code?

If you installed with npm› npm uninstall -g @qwen-code/qwen-code

If you installed with Homebrew, brew uninstall qwen-code. Settings, keys and sessions stay in the ~/.qwen folder; for a full cleanup, delete this folder yourself. You cancel the Qwen account subscription separately on chat.qwen.ai.

Qwen Code, Claude Code or Gemini CLI?

The Qwen Code row comes from this page's official sources; the other rows summarize those tools' own guides. This is not a ranking.

Frequently asked questions

Is Qwen Code free?

The software is free and Apache-2.0 licensed. The old free Qwen OAuth allowance ended on April 15, 2026; signing in with a Qwen account now requires a Plus or Pro subscription. To use it for free, you need a local model or another provider's free tier.

How do you install Qwen Code?

With Node.js 22 or later, the npm install -g @qwen-code/qwen-code command; on macOS and Linux, the official installer script or Homebrew; on Windows, the PowerShell installer. Then type qwen in your project folder and connect a model with /auth.

How much does Qwen Code cost?

The tool itself is free. Payment goes to the sign-in route you choose: a Qwen Plus or Pro subscription, an Alibaba Cloud Coding Plan or Token Plan, a pay-as-you-go API key, or another provider's fees.

Does Qwen Code work with Ollama?

Yes. The README says it supports local models such as Ollama and vLLM; an OpenAI-compatible local endpoint is connected as a custom provider. There's no model fee; speed depends on your hardware.

Qwen Code or Claude Code?

Qwen Code is open source and works with multiple providers; Claude Code is Anthropic's own tool and works with a Claude account. In Qwen Code, Claude models require an Anthropic API key.

Does Qwen Code support MCP?

Yes. MCP servers are added with the qwen mcp add command or the mcpServers field in settings.json; the /mcp command shows and manages them.

Does Qwen Code change my files without asking?

In the default Auto mode, a classifier approves edits and commands it considers safe without asking. If you want approval at every step, switch to Ask Permissions; if you only want a plan, Plan mode; Shift+Tab cycles through the modes.

Related guides

Sources

Not clear in the official sources: The quota of the Qwen Plus/Pro subscription and the Coding Plan inside Qwen Code (the docs point to the plan pages) · Turkish reply quality (depends on the connected model). Each is covered in the relevant section along with what you can do.