{"type":"blog_post","title":"Qwen-Agent MCP Client: Orchestrating Memory, Filesystem, and SQLite Servers","description":"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.","content":"# Qwen-Agent: Orchestrating MCP Servers for Advanced Agent Capabilities\n\nQwen-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.\n\n## Activating MCP Support\n\nTo enable MCP functionality within Qwen-Agent, you need to install the necessary dependencies. For a standard installation, include the `[mcp]` extra:\n\n```bash\npip install \"qwen-agent[mcp]\"\n```\n\nAlternatively, if you're working with the latest development version from the source, clone the repository and install with the `[mcp]` extra alongside other components:\n\n```bash\ngit clone https://github.com/QwenLM/Qwen-Agent.git\ncd Qwen-Agent\npip install -e ./\"[gui,rag,code_interpreter,mcp]\"\n```\n\n## Configuring MCP Servers\n\nQwen-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.\n\nFor instance, to integrate `memory`, `filesystem`, and `sqlite` MCP servers, you would use a configuration similar to this:\n\n```json\n{\n \"mcpServers\": {\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@modelcontextprotocol/server-memory\"]\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/path/to/allowed/files\"]\n },\n \"sqlite\" : {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-sqlite\",\n \"--db-path\",\n \"test.db\"\n ]\n }\n }\n}\n```\n\nThis 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.\n\n## LLM Configuration\n\nBeyond 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.\n\nAn example configuration for DashScope looks like this:\n\n```python\nllm_cfg = {\n 'model': 'qwen-max-latest',\n 'model_type': 'qwen_dashscope',\n # 'api_key': 'YOUR_DASHSCOPE_API_KEY', # Uses DASHSCOPE_API_KEY env var if not set\n 'generate_cfg': {\n 'top_p': 0.8\n }\n}\n```\n\nFor OpenAI API-compatible services, you would specify the model server URL:\n\n```python\nllm_cfg = {\n 'model': 'Qwen2.5-7B-Instruct',\n 'model_server': 'http://localhost:8000/v1', # base_url\n 'api_key': 'EMPTY',\n 'generate_cfg': {\n 'top_p': 0.8\n }\n}\n```\n\nThis flexibility ensures that Qwen-Agent can be adapted to various LLM backends while leveraging MCP for external tool access.\n\n## References\n- [Qwen-Agent on GitHub](https://github.com/QwenLM/Qwen-Agent)\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io/introduction)\n- [Qwen-Agent on model-context-protocol.com](https://model-context-protocol.com/clients/)","keywords":["qwen-agent","mcp-client","qwenlmqwen-agent","agent-framework"],"published_at":"2026-07-24T12:00:38.58+00:00","related_repository":{"slug":"qwen-agent","type":"Client","url":"https://model-context-protocol.com/clients/qwen-agent"},"source_url":"https://model-context-protocol.com/blog/qwen-agent-mcp-client-orchestrating-memory-filesystem-and-mcp-client-guide"}