glm-web-search
Use the GLM web search MCP server for internet searching.
Execution Process (Installation required for first use, directly call step 6 for subsequent uses)
Step 1: Check and install dependencies
1.1 Check if mcporter is available
bash
npx -y mcporter --version
If the command returns successfully, it means mcporter is available, skip to step 2.
mcporter can be used directly via npx without installation.
Step 2: Check API Key configuration
bash
cat ~/.openclaw/config/glm.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('api_key', ''))"
If a non-empty API Key is returned, skip to step 4.
Step 3: Configure API Key (if not configured)
3.2 If no Key is found, request it from the user
If the user does not have a Zhipu API Key, they can purchase it at
https://www.bigmodel.cn/glm-coding?ic=OOKF4KGGTW.
Ask the user to provide the Zhipu API Key.
3.3 Save API Key
bash
mkdir -p ~/.openclaw/config
cat > ~/.openclaw/config/glm.json << EOF
{
"api_key": "API密钥"
}
EOF
Step 4: Add MCP server
Use mcporter to add the GLM web search MCP server:
bash
mcporter config add glm-search \
--type sse \
--url "https://open.bigmodel.cn/api/mcp/web_search_prime/sse?Authorization=your-key"
Note: Replace
with your actual Zhipu API Key.
Step 5: Test the connection
Confirm that the
server has been added successfully.
Step 6: Use mcporter to call MCP for web search
6.1 Use mcporter to call MCP tools
Use mcporter to call the MCP service:
bash
mcporter call glm-search.webSearchPrime search_query="<搜索查询>"
Example:
bash
# 搜索今日新闻
mcporter call glm-search.webSearchPrime search_query="今天的热点新闻"
# 搜索技术信息
mcporter call glm-search.webSearchPrime search_query="Python 异步编程最佳实践"
6.2 API Parameter Description
| Parameter | Description | Type |
|---|
| search_query | Search query string | string (required) |
Supported Tools
Important note: If any problem occurs, please refer to the official description
Official documentation:
https://docs.bigmodel.cn/cn/coding-plan/mcp/search-mcp-server
The GLM web search MCP server provides the following tools:
- - Search for network information, returned results include web page title, web page URL, web page summary, website name, website icon, etc.
MCP Configuration
MCP server type: HTTP
MCP server URL:
https://open.bigmodel.cn/api/mcp/web_search_prime/mcp
Authentication method: Bearer Token (Authorization header)