Welcome to the Qwen Code integration guide. This guide will help you connect ByteRover with Qwen Code, giving this powerful AI coding assistant persistent memory of your development patterns and solutions.

What You’ll Need

  • Qwen Code CLI installed
  • A ByteRover account

Getting Started

1. Start the Connection

Go to your ByteRover dashboard and:
  1. Find the “Connect your agent” section
  2. Click on Qwen Code from the list
  3. Hit the “Connect with Qwen Code” button

2. Manual Setup Required

These tools need a few extra steps to connect. We’ll show you how.

3. Connect ByteRover to Qwen Code

Step 1: Open your Qwen settings file:
~/.qwen/settings.json
Step 2: Add the following MCP server block:
{
  "mcpServers": {
    "byterover-mcp": {
      "httpUrl": "https://mcp.byterover.dev/v2/mcp",
      "headers": {
        "Authorization": "Bearer [DASHBOARD_TOKEN]"
      }
    }
  }
}
Step 3: Reload Qwen CLI to apply changes. Run /mcp to confirm your connection. You should see byterover-mcp listed with available tools.

Test Your Setup

Try this with Qwen Code:
Store this array utility function to ByteRover:

function groupBy(array, key) {
  if (!Array.isArray(array)) {
    return {};
  }
  
  return array.reduce((groups, item) => {
    const group = typeof key === 'function' ? key(item) : item[key];
    groups[group] = groups[group] || [];
    groups[group].push(item);
    return groups;
  }, {});
}
Qwen Code should confirm successful storage to ByteRover.

What You Can Do

Be specific when storing patterns:
"Store this database indexing strategy for MongoDB"
"Save this authentication flow for JWT tokens"
"Remember this caching pattern for Redis"
Use targeted queries:
"Find my stored API design patterns"
"Retrieve database optimization techniques"
"Look up error handling strategies"
Yes. With access to your coding history and patterns through ByteRover, Qwen Code provides more contextual and personalized assistance based on your actual development experience.

Troubleshooting

Check that your settings.json file has valid JSON syntax. Ensure the file is in the correct location (~/.qwen/settings.json). Verify file permissions allow reading.
Verify the API token is correct and has no extra spaces. Check your internet connection. Try regenerating your API token from the ByteRover dashboard.
Confirm the connection shows as active when you run /mcp. Test with a simple storage operation. Check your ByteRover account has available memory operations.
Memory operations are lightweight and run in the background. If Qwen Code seems slow, check your network connection or temporarily disable the MCP server to isolate the issue.

Best Practices

Include technology and context:
"Store this React performance optimization technique"
"Save this Python data processing pipeline"
Use consistent categorization:
"Store this Node.js middleware for CORS handling"
"Save this SQL query optimization for PostgreSQL"
Be specific in searches:
"Find my stored testing patterns"
"Retrieve deployment configuration examples"

What’s Next?

Use Qwen Code as you normally would, now enhanced with ByteRover’s persistent memory. Store valuable coding patterns and solutions as you work. Qwen will become increasingly helpful and adapted to your specific development style and project needs.
Questions? Join our Discord community where Qwen Code users share tips and troubleshooting advice.