Connect Claude Desktop to Qwen Max language models
Qwen Max MCP Server lets Claude call Alibaba's Qwen-Max, Qwen-Plus, or Qwen-Turbo models for text generation via Dashscope.
1.0.0Add to Favorites
Why it matters
Enable Claude Desktop to leverage Alibaba Cloud's Qwen family of language models (Max, Plus, Turbo) for text generation, code creation, and complex reasoning tasks through a Model Context Protocol server.
Outcomes
What it gets done
Generate text and code using Qwen-Max for complex multi-step tasks with 32K token context
Process large documents with Qwen-Turbo's 1M token context window at low cost
Balance performance and cost with Qwen-Plus for moderately complex tasks
Configure temperature and token parameters to control output creativity and length
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Overview
Qwen_Max
Qwen Max MCP Server exposes Alibaba's Qwen-Max, Qwen-Plus, and Qwen-Turbo commercial models to Claude Desktop for text generation via the Dashscope API, with configurable max_tokens and temperature. Use it when Claude should delegate generation to a Qwen model for its context-window, speed, or cost tradeoffs; requires a Dashscope API key.
What it does
Qwen Max MCP Server is a Node.js/TypeScript MCP server that exposes Alibaba's Qwen commercial language models to Claude Desktop for text generation. Its single tool takes a prompt plus optional max_tokens and temperature parameters and returns generated text from the configured Qwen model, using the Dashscope API. By default it calls Qwen-Max; switching to Qwen-Plus or Qwen-Turbo is done by editing the model name in the server's src/index.ts source and rebuilding.
When to use - and when NOT to
Use it when Claude needs to delegate a generation task to a Qwen model instead of its own - useful for comparing outputs, working within Qwen's specific context-window and pricing tradeoffs, or when a task specifically calls for one of Alibaba's commercial models. Qwen-Max gives the best performance on complex, multi-step tasks with a 32,768-token context window; Qwen-Plus balances performance, speed, and cost with a 131,072-token window; Qwen-Turbo is fast and cheap with a 1,000,000-token window, suited to simple tasks. It requires a Dashscope API key and Node.js v18+; each model choice is compiled in rather than selected per-call, so switching models means changing the source and rebuilding.
Capabilities
Each model family has stable, latest, and dated-snapshot versions - for example qwen-max, qwen-max-latest, and qwen-max-2025-01-25, also called qwen-max-0125 or Qwen2.5-Max. Pricing per 1K tokens ranges from $0.0016 input / $0.0064 output for Qwen-Max down to $0.00005 input / $0.0002 output for Qwen-Turbo, each with a 1 million token free quota. The temperature parameter is documented with task-specific guidance: 0.0-0.3 for code generation, 0.3-0.5 for technical writing, 0.7 (the default) for general tasks, and 0.8-1.0 for creative writing. The server surfaces detailed error messages for API authentication failures, invalid parameters, rate limiting, network issues, exceeded token limits, and model availability problems.
How to install
Install via Smithery for Claude Desktop:
npx -y @smithery/cli install @66julienmartin/mcp-server-qwen_max --client claude
For manual installation, clone the repository, run npm install, then npm run build. Set a .env file or environment variable with DASHSCOPE_API_KEY=your-api-key-here, and register the server in Claude Desktop's config with a node command pointing at the built build/index.js, passing the same API key as an environment variable. Requires Node.js v18 or higher. Released under the MIT license.
Who it's for
Developers who want Claude to call Alibaba's Qwen-Max, Qwen-Plus, or Qwen-Turbo models directly for text generation, taking advantage of Qwen's context-window and pricing tradeoffs for a specific task.
Source README
Qwen Max MCP Server
A Model Context Protocol (MCP) server implementation for the Qwen Max language model.
Why Node.js?
This implementation uses Node.js/TypeScript as it currently provides the most stable and reliable integration
with MCP servers compared to other languages like Python. The Node.js SDK for MCP offers better type safety,
error handling, and compatibility with Claude Desktop.
Prerequisites
- Node.js (v18 or higher)
- npm
- Claude Desktop
- Dashscope API key
Installation
Installing via Smithery
To install Qwen Max MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @66julienmartin/mcp-server-qwen_max --client claude
Manual Installation
git clone https://github.com/66julienmartin/mcp-server-qwen-max.git
cd Qwen_Max
npm install
Model Selection
By default, this server uses the Qwen-Max model.
The Qwen series offers several commercial models with different capabilities:
Qwen-Max
Provides the best inference performance, especially for complex and multi-step tasks.
Context window: 32,768 tokens
- Max input: 30,720 tokens
- Max output: 8,192 tokens
- Pricing: $0.0016/1K tokens (input), $0.0064/1K tokens (output)
- Free quota: 1 million tokens
Available versions:
- qwen-max (Stable)
- qwen-max-latest (Latest)
- qwen-max-2025-01-25 (Snapshot, also known as qwen-max-0125 or Qwen2.5-Max)
Qwen-Plus
Balanced combination of performance, speed, and cost, ideal for moderately complex tasks.
Context window: 131,072 tokens
- Max input: 129,024 tokens
- Max output: 8,192 tokens
- Pricing: $0.0004/1K tokens (input), $0.0012/1K tokens (output)
- Free quota: 1 million tokens
Available versions:
- qwen-plus (Stable)
- qwen-plus-latest (Latest)
- qwen-plus-2025-01-25 (Snapshot, also known as qwen-plus-0125)
Qwen-Turbo
Fast speed and low cost, suitable for simple tasks.
- Context window: 1,000,000 tokens
- Max input: 1,000,000 tokens
- Max output: 8,192 tokens
- Pricing: $0.00005/1K tokens (input), $0.0002/1K tokens (output)
- Free quota: 1 million tokens
Available versions:
- qwen-turbo (Stable)
- qwen-turbo-latest (Latest)
- qwen-turbo-2024-11-01 (Snapshot, also known as qwen-turbo-1101)
To modify the model, update the model name in src/index.ts:
// For Qwen-Max (default)
model: "qwen-max"
// For Qwen-Plus
model: "qwen-plus"
// For Qwen-Turbo
model: "qwen-turbo"
For more detailed information about available models, visit the Alibaba Cloud Model Documentation https://www.alibabacloud.com/help/en/model-studio/getting-started/models?spm=a3c0i.23458820.2359477120.1.446c7d3f9LT0FY.
Project Structure
qwen-max-mcp/
├── src/
│ ├── index.ts # Main server implementation
├── build/ # Compiled files
│ ├── index.js
├── LICENSE
├── README.md
├── package.json
├── package-lock.json
└── tsconfig.json
Configuration
- Create a
.envfile in the project root:
DASHSCOPE_API_KEY=your-api-key-here
- Update Claude Desktop configuration:
{
"mcpServers": {
"qwen_max": {
"command": "node",
"args": ["/path/to/Qwen_Max/build/index.js"],
"env": {
"DASHSCOPE_API_KEY": "your-api-key-here"
}
}
}
}
Development
npm run dev # Watch mode
npm run build # Build
npm run start # Start server
Features
- Text generation with Qwen models
- Configurable parameters (max_tokens, temperature)
- Error handling
- MCP protocol support
- Claude Desktop integration
- Support for all Qwen commercial models (Max, Plus, Turbo)
- Extensive token context windows
API Usage
// Example tool call
{
"name": "qwen_max",
"arguments": {
"prompt": "Your prompt here",
"max_tokens": 8192,
"temperature": 0.7
}
}
The Temperature Parameter
The temperature parameter controls the randomness of the model's output:
Lower values (0.0-0.7): More focused and deterministic outputs
Higher values (0.7-1.0): More creative and varied outputs
Recommended temperature settings by task:
Code generation: 0.0-0.3
Technical writing: 0.3-0.5
General tasks: 0.7 (default)
Creative writing: 0.8-1.0
Error Handling
The server provides detailed error messages for common issues:
API authentication errors
Invalid parameters
Rate limiting
Network issues
Token limit exceeded
Model availability issues
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.
