weibo-hot-search-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@weibo-hot-search-mcp-serverShow me the top 10 Weibo hot search topics"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Example
通过获取前 N 条微博热搜的 MCP 服务进行示例,演示基于 fastmcp 构建,内置 Stdio、本地 SSE、Streamable HTTP 三种MCP运行脚本,适配本地和远程多端场景。
🚀 快速开始
git clone https://github.com/bossdong955/mcp-server-example.git
cd weibo-mcp-server
# 创建并进入 Conda 环境
conda create -n mcp-server-example python=3.11
conda activate mcp-server-example
# 安装依赖(注意:请确认本机已卸载旧版 mcp 包)
pip install -r requirements.txtrequirements.txt 默认包含:
fastmcp
httpx
uvicorn
starlette
🧭 运行模式
模式 | 脚本 | 典型场景 | 监听方式 |
Stdio |
| Claude Desktop / VS Code Cline 本地插件 | 标准输入输出 |
SSE |
| 部署在服务器,通过 SSE 远程连接 |
|
Streamable HTTP |
| 支持 HTTP 长连接的客户端 |
|
启动任意脚本后都可以调用 hot_search(n=20) 获取热搜,n 为返回条数上限。
1. Stdio(本地推荐)
python resou_stdio.pyVS Code Cline / Claude Desktop mcpServers 示例(将路径替换成你本机的脚本路径):
{
"mcpServers": {
"weiboresou": {
"command": "conda",
"args": [
"run",
"-n",
"weibo-mcp-server",
"--no-capture-output",
"python",
"E:/your/path/resou_stdio.py"
],
"env": {
"PYTHONUTF8": "1"
}
}
}
}已在脚本中调用
mcp.run(transport="stdio"),无需再使用mcp run ...。

2. SSE(远程流式)
python resou_sse.py --host 0.0.0.0 --port 8006在 VS Code Cline -> Remote Servers 中设置:
URL:
http://<host>:8006/sse可选 Header:
Authorization等自定义认证信息(如有需要)

3. Streamable HTTP
python resou_streamable_http.py --host 0.0.0.0 --port 8005远程客户端配置示例:
URL:
http://<host>:8005/mcp该模式返回可流式消费的 HTTP 响应,适合自定义前端或其他 MCP 客户端。
🛠️ 常见问题
编码报错(GBK 等):在客户端配置中加入
PYTHONUTF8=1。依赖冲突:如果之前安装过
mcp包,请先卸载pip uninstall mcp,再安装fastmcp。网络超时:
hot_search默认 10s 超时。可在脚本中调整httpx.AsyncClient的timeout参数。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bossdong955/mcp-server-example'
If you have feedback or need assistance with the MCP directory API, please join our Discord server