Qwen Code MCP web search / 2026
How to Add Web Search to Qwen Code with MCP in 2026
Qwen Code can load MCP servers at user or project scope and recommends HTTP for hosted services. That makes it straightforward to add current public-web discovery without maintaining a subprocess. The best coding workflow is not “search everything”: ask a narrow question, retain the URLs, and read the best result before relying on it.
Quick answer
Use Qwen Code’s native HTTP MCP command.
Add Webstractor with `qwen mcp add --transport http`, open Qwen Code, and use /mcp to confirm the connection. The search_web tool then gives the coding agent bounded, source-linked results.
qwen mcp add --transport http webstractor https://webstractor.com/mcpBefore you begin
What you need
- A current Qwen Code installation
- A configured Qwen Code model
- HTTPS access to webstractor.com
Step-by-step setup
Connect Webstractor to Qwen Code
Choose user or project scope
The default command writes to user scope in ~/.qwen/settings.json. Add `--scope project` when the integration belongs only to the current repository and should live in .qwen/settings.json.
qwen mcp add --scope user --transport http webstractor https://webstractor.com/mcpInspect the MCP connection
Start Qwen Code and open /mcp. If the CLI was already running when you added the server, restart it in the same project before testing.
qwen
# Then enter:
/mcpTest discovery with explicit evidence
The validation prompt asks for a small result set and makes URLs part of the answer, which reveals whether the MCP tool actually ran.
# Paste into Qwen Code
Use webstractor search_web to find the current Qwen Code MCP configuration reference. Return 5 results with title, URL, and why each could answer the question.Configuration
The equivalent settings.json entry
Qwen Code stores remote Streamable HTTP servers under `mcpServers` with `httpUrl`. The CLI command is less error-prone, but the JSON form is useful for reviewing project scope or setting a longer connection timeout.
{
"mcpServers": {
"webstractor": {
"httpUrl": "https://webstractor.com/mcp",
"timeout": 15000
}
}
}Troubleshooting
Check scope, allowlists, and tool selection
If /mcp cannot see the server, verify whether you wrote user or project settings and restart Qwen Code. A global `mcp.allowed` list can also hide any server name that is not included.
If the connection is healthy but no search runs, mention `webstractor` and `search_web` explicitly. For repeatable behavior, phrase the task as source discovery and require returned URLs.
Available data
What you can extract
- Relevant public result titles, URLs, and snippets
- Country and BCP 47 language controls
- Optional site-restricted discovery
- A bounded list of up to 10 ordered results
AI workflows
Where normalized data helps
- Check current framework conventions
- Find an official API reference from a vague question
- Locate recent migration or compatibility notes
- Discover PDF specifications and technical papers
Boundaries
Public data only
- Search results are candidates, not complete page content.
- Project-level configuration should be committed only when the team intends to share it.
- MCP access does not make private or authenticated sources available.
webstractor.com does not bypass CAPTCHAs, login walls, paywalls, access controls, or regional restrictions. Review the source’s terms and applicable law before collecting or reusing data.
Common questions
Qwen Code and Webstractor FAQ
Which Qwen Code MCP transport should I use?
Use HTTP. Qwen Code recommends `http` for remote services and represents it as `httpUrl` in settings.json.
Can I share the MCP setup with a repository?
Yes. Use project scope to write .qwen/settings.json, then review the file before committing it.
Can Qwen Code find only PDFs?
Yes. Tell it to use search_web with the PDF file-type constraint when you need direct PDF sources.
Ready to try it?