Skip to content

Feature Request #2672

@MrXploisLite

Description

@MrXploisLite

Feature Request: Auto-expose MCP tools for web research (search_web, read_url) by default

Problem

MCP servers can be configured in ~/.qwen/mcp.json or project-level mcp.json, but the tools from these MCP servers are not automatically exposed to users for common tasks like web research.

Current Behavior

When a user configures an MCP server like Jina AI MCP Server (https://mcp.jina.ai/v1) which provides tools like:

  • search_web - for web search
  • read_url - for reading webpages
  • search_arxiv - for academic papers
  • search_images - for image search
  • classify_text - for text classification
  • sort_by_relevance - for reranking documents

The Qwen CLI can connect to the MCP server, but:

  1. Tools are not shown in the system prompt automatically
  2. Users cannot easily invoke these tools for research tasks
  3. The model falls back to built-in tools (like dashscope web_search) instead of using configured MCP tools

Desired Behavior

When MCP servers are configured and connected:

  1. Auto-expose tools in system prompt or tool list
  2. Prioritize MCP tools for relevant tasks (e.g., use search_web from Jina MCP when user asks to "research X")
  3. Show available MCP tools to users so they know what capabilities are available

Use Case

Users want to use their own API keys and MCP servers for:

  • Web research with specific providers (Jina, Tavily, etc.)
  • Academic research (arXiv, SSRN)
  • Custom tools exposed via MCP

Example config that should work seamlessly:

{
  "mcpServers": {
    "jina-mcp-server": {
      "url": "https://mcp.jina.ai/v1",
      "headers": {
        "Authorization": "Bearer jina_xxx"
      }
    }
  }
}

Related Issues

Additional Context

This would make Qwen Code CLI more flexible and allow users to bring their own API keys/tools via MCP standard.

The MCP protocol already supports tool discovery via tools/list and invocation via tools/call. The Qwen CLI should automatically:

  1. Discover tools from configured MCP servers on startup
  2. Add them to the available tools list
  3. Allow the model to call them when appropriate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions