Docs / Integrations
MCP

Use Prefsly with Qwen Code

Run Qwen3-Coder in the terminal with one authorized Prefsly profile.

Set it up

  1. Install and start Qwen Code. Run /auth to configure a current model provider, then select a Qwen3-Coder model with /model.
  2. Create a profile token in Prefsly Connections, then run the command below. Keep the token out of shell history and version control where possible.

    Qwen Code CLI command

    qwen mcp add --scope user --transport http prefsly https://www.prefsly.io/mcp --header "Authorization: Bearer <profile-token>"
    qwen
    # Inside Qwen Code:
    /mcp
  3. Start or restart Qwen Code and open /mcp to confirm Prefsly is connected.
  4. Add the startup instruction below to ~/.qwen/QWEN.md to apply it across projects.

    Startup instruction for ~/.qwen/QWEN.md

    At the start of every new session, call the `prefsly` MCP tool `get_profile` and use its returned preferences throughout the session. If the call fails, tell me that prefsly.io preferences could not be loaded.
Good to know

Qwen Code supports remote HTTP MCP servers and OAuth configuration. This example uses a Prefsly profile token because it is portable to headless and SSH sessions; revoke it in Prefsly Connections to stop future reads.

Create and use a profile token

Update or disconnect

For copied prompts, copy a new prompt after edits. For MCP, your next tool call sees the saved revision. Revoke a connection from Prefsly Connections when you no longer want a client to retrieve the profile.

Official source

Qwen Code MCP documentation ↗

Related Prefsly guides

Create and manage profilesMCP authentication optionsMCP troubleshootingPrivacy and sharing controls
Published by Prefsly · Last reviewed September 25, 2026 · All documentation