How do I give Qwen Code my project's rules and fixes with cachly?
You fixed a bug with Qwen Code yesterday. Today you start a new session, and the agent knows nothing about that fix. cachly keeps your project's rules, decisions and fixes and gives them to every AI tool through MCP, so you explain them once.
Qwen Code is a client for the Model Context Protocol (MCP), so cachly connects as an MCP server. One command does it.
The short answer
Run this once, then check it:
qwen mcp add --transport http cachly https://mcp.cachly.dev/mcp
qwen mcp listThe command writes the server into ~/.qwen/settings.json. Qwen Code is the CLI from the QwenLM/qwen-code repository. Install it with npm install -g @qwen-code/qwen-code@latest.
Option 1: the remote endpoint
Nothing else to install. Qwen Code connects to cachly's hosted MCP server:
qwen mcp add --transport http cachly https://mcp.cachly.dev/mcpThe result in ~/.qwen/settings.json. Qwen Code uses httpUrl for this kind of server:
{
"mcpServers": {
"cachly": {
"httpUrl": "https://mcp.cachly.dev/mcp"
}
}
}Listing the tools needs no sign-in. Calling them does. Qwen Code supports OAuth for MCP servers and manages it in the /mcp dialog. We did not run that step. More on the remote endpoint and which Brain opens.
By default the command writes to your user settings. Add --scope project to write .qwen/settings.json in the current project instead.
Option 2: the local server
Qwen Code starts the cachly MCP server itself with npx. Node.js must be on your PATH. The first start downloads the package, so the first check can take several seconds. The -- keeps -y from being read as an option of qwen:
qwen mcp add cachly npx -- -y @cachly-dev/mcp-server@latest{
"mcpServers": {
"cachly": {
"command": "npx",
"args": ["-y", "@cachly-dev/mcp-server@latest"]
}
}
}The local server reads your key from the environment or from ~/.cachly/credentials.json. Run npx @cachly-dev/mcp-server@latest setup once to sign in and write that file. No key goes into settings.json.
Check the connection
qwen mcp list starts each server once and prints its state:
$ qwen mcp list
Configured MCP servers:
✓ cachly: https://mcp.cachly.dev/mcp (http) - ConnectedInside Qwen Code, /mcp shows the servers and their state. Per the Qwen Code docs, an open interactive session picks up changes in settings.json without a restart.
Remove it again
qwen mcp remove cachlyWhat we tested
On 26 November 2026, on Windows 11 with Node.js 22.16, we installed Qwen Code 0.28.6 from the npm package. We ran both qwen mcp add commands above, one after the other. Both times qwen mcp list printed Connected. The remote endpoint lists 27 tools to a plain request without sign-in; qwen mcp list itself does not print a tool count.
We have no Qwen account, so no model call was made. We did not test that the model picks the cachly tools, the OAuth sign-in, or saving and recalling a lesson. cachly's automatic hooks exist for Claude Code and Cursor, not for Qwen Code. Here the agent uses smart_recall and learn_from_attempts only when it decides to, or when you ask it to.
Sources
- Qwen Code docs: MCP (
qwen mcp add, scopes,httpUrl, OAuth,/mcp) - npm: @qwen-code/qwen-code
More: cachly with Kimi Code CLI · GLM or DeepSeek in Claude Code · Remote MCP · All docs