Add a web search tool to Coding Plan so the model can retrieve real-time information.
Availability
Applies to tools that extend web search through Model Context Protocol (MCP), such as Qwen Code and Claude Code. Some tools, such as Cursor, have built-in web search and don't require a separate service.
Prerequisites
-
You have subscribed to Coding Plan. See Getting started.
-
You have set up a Coding Plan tool, such as Claude Code or Qwen Code, and can chat. See Clients and developer tools.
-
You have obtained an Alibaba Cloud Model Studio API key. This is the general-purpose Model Studio API key (format: sk-xxx) for calling the MCP service. It's different from the Coding Plan-specific API key (format: sk-sp-xxx).
Enable or upgrade web search MCP
The web search MCP has been upgraded from the legacy Server-Sent Events (SSE) protocol to the new Streamable HTTP protocol. Choose your scenario:
First-time activation (new users)
-
Go to the MCP Marketplace in Model Studio and locate the Web Search MCP service.
-
Click .
-
The web search MCP offers a free quota of 2,000 calls for all users. After the free quota is used up, the service is billed at CNY 29 per 1,000 calls. If you use a third-party MCP service, it may have its own charges. See the service description.
-
-
After the service is enabled, get the following configuration:
-
Streamable HTTP endpoint: The MCP service connection address. The web search MCP endpoint is
https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp. -
API key: The Model Studio API key for authenticating with the MCP service.
-
Upgrade protocol (existing users)
-
Go to the MCP Marketplace in Model Studio and find the Web Search MCP service.
-
Click Cancel activation, then click Enable Now.
-
The web search MCP offers a free quota of 2,000 calls for all users. After the free quota is used up, the service is billed at CNY 29 per 1,000 calls. If you use a third-party MCP service, it may have its own charges. For more information, see the service description.
-
-
After you re-enable the service, the protocol is upgraded. Get the following configuration:
-
Streamable HTTP endpoint: The MCP service connection address. The web search MCP endpoint is
https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp. -
API Key: The Model Studio API key. This key is used for authentication with the MCP service.
-
Integrate with tools
Add the MCP service to your AI programming tool.
OpenClaw
-
Install MCPorter.
npm install -g mcporter -
Enable MCPorter.
openclaw config set skills.entries.mcporter.enabled true -
In the
~/.openclaw/workspacedirectory, run the following command. Before you run the command, replace YOUR_API_KEY with the Alibaba Cloud Model Studio API key that you obtained when you enabled or upgraded the web search MCP.mcporter config add WebSearch https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp --transport http --header "Authorization=Bearer YOUR_API_KEY" --scope home -
In the
~/.openclaw/workspacedirectory, run the following command to confirm that the MCP is installed.mcporter list
-
Run the following command to apply the configuration.
openclaw gateway restart -
Send the prompt
Use mcporter to search for news about Alibaba Cloudto see the search results.
OpenCode
-
In the OpenCode configuration file
~/.config/opencode/opencode.json, add the MCP configuration information. ReplaceYOUR_API_KEYwith the API key that you obtained in the previous step.{ "mcp": { "WebSearch": { "type": "remote", "url": "https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }If the
opencode.jsonfile already contains other configurations, such as provider, merge the mcp field into the existing configuration. After the configuration is complete, save the file. -
Run the following command in the terminal to start OpenCode.
opencode -
In the dialog box, run
/mcpsto confirm that the status ofwebsearchis Enabled. After you confirm the status, press Esc to exit.
-
Send the prompt
Use the websearch MCP to search for news about Alibaba Cloudto see the search results.Mention the websearch MCP explicitly to avoid confusion with other tools.

Claude Code
-
Add the web search MCP service.
-
Copy the following command to the terminal:
claude mcp add WebSearch https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp -t http -H "Authorization: Bearer YOUR_API_KEY" -
Replace YOUR_API_KEY in the command with the Alibaba Cloud Model Studio API key that you obtained when you enabled or upgraded the web search MCP.
-
Run the updated command in the terminal.
NoteThe terminal returns
Added HTTP MCP server WebSearch with URL: ... to local config. Confirm the connection status in the next steps.
-
-
Run the following command in the terminal to start Claude Code.
claude -
In the dialog box, run the
/mcpcommand and confirm thatwebsearchstatus is connected. Wait for the status to change from connecting to connected.
If the connection status is failed, select the MCP and choose Reconnect. If the connection fails after retrying, check your configuration.

-
Press Esc to exit the MCP list, then send the prompt
Use the websearch MCP to search for news about Alibaba Cloudto see the search results.Mention the websearch MCP explicitly to avoid confusion with other tools.

Qwen Code
-
Add the web search MCP.
-
Copy the following command to the terminal.
qwen mcp add WebSearch \ -t http \ "https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp" \ -H "Authorization: Bearer YOUR_API_KEY" -
Replace YOUR_API_KEY in the command with the Alibaba Cloud Model Studio API key that you obtained when you enabled or upgraded the web search MCP.
-
Run the updated command in the terminal.
NoteThe terminal returns
MCP server "WebSearch" added to user settings. (http). Confirm the connection status in the next steps.
-
-
Run the following command in the terminal to start Qwen Code.
qwen -
In the
Qwen Codedialog box, run the/mcpcommand to confirm the MCP connection status.
-
Send the prompt
Use the websearch MCP to search for news about Alibaba Cloudto see the search results.Mention the
websearch MCPexplicitly to avoid confusion with other tools.
Kilo CLI
-
In the
~/.config/kilo/opencode.jsonconfiguration file, add the MCP configuration information. ReplaceYOUR_API_KEYwith the API key that you obtained in the previous step. After the configuration is complete, save the file.{ "mcp": { "websearch": { "type": "remote", "url": "https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }If the
opencode.jsonfile already contains other configurations, such as provider, merge the mcp field into the existing configuration. After the configuration is complete, save the file. -
Run the following command in the terminal to view the MCP status. A Connected status indicates a successful connection.
kilocode mcp list
-
Run the following command in the terminal to start Kilo CLI.
kilo -
Send the prompt
Use the websearch MCP to search for news about Alibaba Cloudto see the search results.Mention the websearch MCP explicitly to avoid confusion with other tools.

Kilo Code IDE plugin
-
Open the Kilo Code IDE plugin to configure the web search MCP information. Replace
YOUR_API_KEYwith the API key that you obtained in the previous step. After the configuration is complete, save the file.
{ "mcpServers": { "websearch": { "type": "streamable-http", "url": "https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }When the status of the web search MCP turns green, the service is added successfully.

-
Return to the conversation interface and send the prompt
Use the websearch MCP to search for news about Alibaba Cloudto see the search results.Mention the websearch MCP explicitly to avoid confusion with other tools.

FAQ
What do I do if I cannot connect to the web search MCP service?
Common causes and troubleshooting methods:
-
Web search MCP service not enabled or upgraded: Confirm that you have enabled or upgraded the web search MCP service in the Model Studio MCP Marketplace. See Enable or upgrade web search MCP.
-
Incorrect Streamable HTTP endpoint address:
-
Check whether the URL is spelled correctly. The complete URL is
https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp. -
If you are using the URL
https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/sse, it means you have enabled the legacy SSE protocol. Upgrade the protocol to Streamable HTTP.
-
-
Incorrect API key: Confirm that you're using a valid general-purpose Model Studio API key (format: sk-xxx, not the Coding Plan-specific API key) and have correctly replaced YOUR_API_KEY in the command.
-
Free quota exhausted: The web search MCP offers a free quota of 2,000 calls for all users. After the free quota is used up, the service is billed at CNY 29 per 1,000 calls. Make sure your account balance is sufficient.
-
Network connection failure: Confirm that your current network has access.
What do I do if the model doesn't call web search during a conversation?
-
Make sure the web search MCP service is connected and available.
-
Mention the tool name explicitly in the conversation, for example:
Use the websearch MCP to search for news about Alibaba Cloud.








