# Qwen-Agent MCP Client: Orchestrating Memory, Filesystem, and SQLite Servers

> Qwen-Agent is a Python-based agent framework built on Qwen>=3.0, designed to integrate various capabilities including Function Calling, Code Interpreter, and RAG. It functions as an MCP Client, enabling developers to orchestrate external MCP servers like memory, filesystem, and SQLite for enhanced agent functionality.

**Published:** 2026-07-24T12:00:38.58+00:00

**Keywords:** qwen-agent,mcp-client,qwenlmqwen-agent,agent-framework

# Qwen-Agent: Orchestrating MCP Servers for Advanced Agent Capabilities

Qwen-Agent is a Python-based agent framework built upon Qwen>=3.0, providing a comprehensive toolkit for developers. It features Function Calling, a Code Interpreter, and RAG capabilities. Crucially, Qwen-Agent also acts as an MCP Client, allowing it to interface with and orchestrate external Model Context Protocol servers. This integration enables agents to leverage specialized tools like memory, filesystem access, and database interactions.

## Activating MCP Support

To enable MCP functionality within Qwen-Agent, you need to install the necessary dependencies. For a standard installation, include the `[mcp]` extra:

```bash
pip install "qwen-agent[mcp]"
```

Alternatively, if you're working with the latest development version from the source, clone the repository and install with the `[mcp]` extra alongside other components:

```bash
git clone https://github.com/QwenLM/Qwen-Agent.git
cd Qwen-Agent
pip install -e ./"[gui,rag,code_interpreter,mcp]"
```

## Configuring MCP Servers

Qwen-Agent's MCP integration allows you to specify which MCP servers your agent should utilize. This is configured through a JSON object that maps server names to their respective command and arguments. The client then invokes these commands to start and manage the servers.

For instance, to integrate `memory`, `filesystem`, and `sqlite` MCP servers, you would use a configuration similar to this:

```json
{
 "mcpServers": {
 "memory": {
 "command": "npx",
 "args": ["-y", "@modelcontextprotocol/server-memory"]
 },
 "filesystem": {
 "command": "npx",
 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
 },
 "sqlite" : {
 "command": "uvx",
 "args": [
 "mcp-server-sqlite",
 "--db-path",
 "test.db"
 ]
 }
 }
}
```

This configuration tells Qwen-Agent to launch these specific MCP servers using `npx` or `uvx` and provides the necessary arguments, such as a designated path for filesystem access or a database file for SQLite. Developers can select required tools from the open-source MCP server website and configure the environment accordingly.

## LLM Configuration

Beyond MCP server integration, Qwen-Agent offers flexible LLM configuration. It supports models provided by DashScope, such as `'qwen-max-latest'`, and also allows for integration with OpenAI API-compatible services like vLLM or Ollama.

An example configuration for DashScope looks like this:

```python
llm_cfg = {
 'model': 'qwen-max-latest',
 'model_type': 'qwen_dashscope',
 # 'api_key': 'YOUR_DASHSCOPE_API_KEY', # Uses DASHSCOPE_API_KEY env var if not set
 'generate_cfg': {
 'top_p': 0.8
 }
}
```

For OpenAI API-compatible services, you would specify the model server URL:

```python
llm_cfg = {
 'model': 'Qwen2.5-7B-Instruct',
 'model_server': 'http://localhost:8000/v1', # base_url
 'api_key': 'EMPTY',
 'generate_cfg': {
 'top_p': 0.8
 }
}
```

This flexibility ensures that Qwen-Agent can be adapted to various LLM backends while leveraging MCP for external tool access.

## References
- [Qwen-Agent on GitHub](https://github.com/QwenLM/Qwen-Agent)
- [Model Context Protocol Documentation](https://modelcontextprotocol.io/introduction)
- [Qwen-Agent on model-context-protocol.com](https://model-context-protocol.com/clients/)

## Related Repository

- [qwen-agent](https://model-context-protocol.com/clients/qwen-agent)

**Source:** https://model-context-protocol.com/blog/qwen-agent-mcp-client-orchestrating-memory-filesystem-and-mcp-client-guide
