Bailian Search
Real-time web search powered by Alibaba Cloud Bailian (DashScope) MCP service.
Overview
This skill integrates with Alibaba Cloud Bailian's Web Search MCP (Model Context Protocol) service, enabling AI assistants to retrieve real-time information from the internet, improving response accuracy and timeliness.
Features
- - 🔍 Real-time web search
- 🌐 Global information coverage
- ⚡ Fast response via SSE (Server-Sent Events)
- 🔒 Secure API key management
- 🛠️ Easy integration with OpenClaw
Prerequisites
- 1. Alibaba Cloud Account: Register at Alibaba Cloud Bailian
- API Key: Obtain a DashScope API Key from the console
Installation
Using ClawHub (Recommended)
CODEBLOCK0
Manual Installation
CODEBLOCK1
Configuration
Set Environment Variable
Option 1: Temporary (current session)
CODEBLOCK2
Option 2: Permanent (recommended)
Add to your shell profile (~/.zshrc or ~/.bashrc):
CODEBLOCK3
Option 3: OpenClaw Config
CODEBLOCK4
Usage
Command Line
CODEBLOCK5
Via AI Assistant
Once configured, simply ask your AI assistant:
- - "Search for today's tech news"
- "Find OpenAI's latest announcements"
- "Look up 2025 China EV sales data"
The AI will automatically use this skill to fetch real-time information.
How It Works
This skill connects to Alibaba Cloud Bailian's MCP SSE (Server-Sent Events) service:
- 1. Receives user search query
- Establishes SSE connection to Bailian MCP server
- Retrieves real-time search results
- Returns structured content to the AI
MCP Configuration (Advanced)
For use with other MCP-compatible clients (Claude Desktop, Cursor, etc.):
CODEBLOCK6
API Reference
Environment Variables
| Variable | Required | Description |
|---|
| INLINECODE2 | Yes | Alibaba Cloud DashScope API Key |
Command Arguments
CODEBLOCK7
| Argument | Type | Required | Description |
|---|
| INLINECODE3 | string | Yes | Search query string |
Troubleshooting
Error: "DASHSCOPEAPIKEY environment variable is not set"
Solution: Ensure the environment variable is set:
CODEBLOCK8
Empty results or timeout
- 1. Verify your API key is valid
- Check network connectivity
- Bailian service may take time to respond, please be patient
How to get DashScope API Key?
- 1. Visit Alibaba Cloud Bailian Console
- Register/login with Alibaba Cloud account
- Create an API Key in the console
- Copy the key and set it as environment variable
Privacy & Security
- - Your API key is never hardcoded in the skill files
- API key is read from environment variables only
- No data is stored or logged by this skill
- All requests go directly to Alibaba Cloud servers
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please submit issues or pull requests via ClawHub.
Version History
v1.1.0 (2026-03-23)
- - Fixed: Complete MCP protocol implementation (initialize + notifications/initialized)
- Fixed: Correct tool name
bailian_web_search instead of INLINECODE5 - Fixed: Proper parameter passing from bash to Python
- Improved: Better error handling and debugging
- Improved: More robust SSE connection management
v1.0.0 (Initial Release)
- - Initial release with basic search functionality
Acknowledgments
- - Alibaba Cloud Bailian (DashScope) for providing the MCP service
- OpenClaw team for the skill framework
- MCP community for the protocol specification
Links
百炼搜索
由阿里云百炼(DashScope)MCP服务驱动的实时网络搜索。
概述
本技能集成了阿里云百炼的网络搜索MCP(模型上下文协议)服务,使AI助手能够从互联网检索实时信息,提升响应的准确性和时效性。
功能特性
- - 🔍 实时网络搜索
- 🌐 全球信息覆盖
- ⚡ 通过SSE(服务器推送事件)快速响应
- 🔒 安全的API密钥管理
- 🛠️ 与OpenClaw轻松集成
前置条件
- 1. 阿里云账号:在阿里云百炼注册
- API密钥:从控制台获取DashScope API密钥
安装
使用ClawHub(推荐)
bash
openclaw skill install bailian-search
或
clawhub install bailian-search
手动安装
bash
克隆到OpenClaw工作区
git clone <仓库地址> ~/.openclaw/workspace/skills/bailian-search
或下载并解压到:
~/.openclaw/workspace/skills/bailian-search/
配置
设置环境变量
方式一:临时(当前会话)
bash
export DASHSCOPEAPIKEY=your-dashscope-api-key
方式二:永久(推荐)
添加到shell配置文件(~/.zshrc或~/.bashrc):
bash
echo export DASHSCOPEAPIKEY=your-dashscope-api-key >> ~/.zshrc
source ~/.zshrc
方式三:OpenClaw配置
bash
openclaw config set env.DASHSCOPEAPIKEY your-dashscope-api-key
使用方法
命令行
bash
设置环境变量后
./search.sh 最新科技新闻
或单行命令
DASHSCOPE
APIKEY=your-key ./search.sh OpenAI GPT-5发布
通过AI助手
配置完成后,直接向AI助手提问:
- - 搜索今天的科技新闻
- 查找OpenAI的最新公告
- 查询2025年中国电动汽车销量数据
AI将自动使用本技能获取实时信息。
工作原理
本技能连接到阿里云百炼的MCP SSE(服务器推送事件)服务:
- 1. 接收用户搜索查询
- 建立与百炼MCP服务器的SSE连接
- 检索实时搜索结果
- 向AI返回结构化内容
MCP配置(高级)
用于其他兼容MCP的客户端(Claude Desktop、Cursor等):
json
{
mcpServers: {
WebSearch: {
type: sse,
name: 阿里云百炼网络搜索,
description: 由通义实验室的文本嵌入、GTE重排序、查询重写和搜索判断模型驱动的实时网络搜索。,
baseUrl: https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/sse,
headers: {
Authorization: Bearer ${DASHSCOPEAPIKEY}
}
}
}
}
API参考
环境变量
| 变量 | 必填 | 描述 |
|---|
| DASHSCOPEAPIKEY | 是 | 阿里云DashScope API密钥 |
命令参数
bash
./search.sh <查询内容>
故障排除
错误:DASHSCOPEAPIKEY环境变量未设置
解决方案:确保已设置环境变量:
bash
export DASHSCOPEAPIKEY=your-key
结果为空或超时
- 1. 验证API密钥是否有效
- 检查网络连接
- 百炼服务可能需要响应时间,请耐心等待
如何获取DashScope API密钥?
- 1. 访问阿里云百炼控制台
- 使用阿里云账号注册/登录
- 在控制台中创建API密钥
- 复制密钥并设置为环境变量
隐私与安全
- - 您的API密钥绝不会硬编码在技能文件中
- API密钥仅从环境变量读取
- 本技能不存储或记录任何数据
- 所有请求直接发送至阿里云服务器
许可证
MIT许可证 - 详见LICENSE文件
贡献
欢迎贡献!请通过ClawHub提交问题或拉取请求。
版本历史
v1.1.0(2026-03-23)
- - 修复:完整的MCP协议实现(初始化 + 通知/已初始化)
- 修复:正确的工具名称bailianwebsearch而非websearch
- 修复:从bash到Python的正确参数传递
- 改进:更好的错误处理和调试
- 改进:更稳健的SSE连接管理
v1.0.0(初始版本)
致谢
- - 阿里云百炼(DashScope)提供MCP服务
- OpenClaw团队提供技能框架
- MCP社区提供协议规范
链接