一个强大的模型上下文协议(MCP)服务器,提供来自中国互联网的实时热门内容。
特性 • 安装 • 快速开始 • 文档 • 贡献 • 许可证
</div>脉冲CN MCP服务器使AI模型能够访问关于中国互联网上热门信息的最新数据。它基于模型上下文协议(MCP)构建,充当AI模型与中国最流行的社交媒体平台、新闻网站和内容聚合器之间实时数据的桥梁。
该服务器提供了从18个主要中国平台获取实时热门数据的功能:
| 平台 | 内容 | 状态 |
|---|---|---|
| 🔮 星座运势 | 每日星座运势预测 | ✅ |
| 💬 每日一句励志英语 | 每日励志英文名言 | ✅ |
| 📊 热搜热榜聚合 | 聚合热门话题 | ✅ |
| 🔥 微博实时热搜 | 微博实时热门话题 | ✅ |
| 📰 今日头条热搜 | 今日头条热门新闻 | ✅ |
| 📝 澎湃新闻热搜 | ThePaper.cn新闻热门话题 | ✅ |
| 🏀 虎扑步行街热搜 | 虎扑步行街实时趋势 | 🔜 |
| ❓ 知乎实时热搜 | 知乎实时热门话题 | 🔜 |
| 📔 知乎每日日报 | 知乎每日摘要 | 🔜 |
| 💼 36氪24小时热榜 | 36氪24小时热门商业新闻 | 🔜 |
| 🎬 哔哩哔哩全站日榜 | 哔哩哔哩每日排行榜 | 🔜 |
| 🔍 百度热点热榜 | 百度热门话题 | 🔜 |
| 📱 抖音热点热榜 | 抖音热门话题 | 🔜 |
| 👥 豆瓣小组精选 | 豆瓣小组精选内容 | 🔜 |
| 💻 IT资讯热榜 | IT新闻热门话题 | 🔜 |
| 📈 虎嗅网热榜 | 虎嗅网24小时热门话题 | 🔜 |
| 📱 产品经理热文榜 | Woshipm每日热门文章 | 🔜 |
| 🐞 虫族部落最新热门 | 虫族部落最新热门内容 | 🔜 |
# 克隆仓库
git clone https://github.com/wangtsiao/pulse-cn-mcp.git
# 导航到项目目录
cd pulse-cn-mcp
# 使用npm
npm install
npm run build
# 或者使用Bun(更快)
bun install
bun run build
启动MCP服务器:
# 使用npm
npm start
# 或者使用Bun
bun start
这将使用Stdio传输启动服务器,使其准备好供兼容MCP的AI模型连接。
脉冲CN MCP服务器遵循模块化架构,每个数据源都有单独的工具实现:
src/
├── index.ts # 主入口点和服务器设置
└── tools/ # 单独的工具实现
├── weiboHotspots.js
├── horoscope.js
├── dailyEnglishSentence.js
├── internetHotspotsAggregator.js
├── todayHeadlinesHotspots.js
├── paperNewsHotspots.js
└── otherHotpoints.js
| 工具名称 | 描述 | 端点 |
|---|---|---|
weibo-hotspots | 来自微博的实时热门话题 | /weibo-hotspots |
horoscope | 按星座的每日运势 | /horoscope |
daily-english-sentence | 每日励志英文名言 | /daily-english-sentence |
internet-hotspots-aggregator | 聚合热门话题 | /internet-hotspots-aggregator |
today-headlines-hotspots | 今日头条热门话题 | /today-headlines-hotspots |
paper-news-hotspots | ThePaper.cn热门新闻 | /paper-news-hotspots |
hupu-pedestrian-street-hotspotszhihu-realtime-hotspotszhihu-daily-hotspots36-krypton-24-hour-hotspotsbilibili-daily-hotspotsbaidu-hotspotsdouyin-hotspotsdouban-group-hotspotshuxiu-hotspotsproduct-manager-hotspotsin-information-hotspotsinsect-hotspots这里是如何使用TypeScript与服务器集成:
import { McpClient } from "@modelcontextprotocol/sdk/client";
async function example() {
const client = new McpClient();
// 获取微博热门话题
const weiboHotspots = await client.callTool("weibo-hotspots", {});
console.log(weiboHotspots.content);
// 获取白羊座每日运势
const horoscope = await client.callTool("horoscope", { sign: "aries" });
0console.log(horoscope.content);
}
src/tools/中创建一个新的文件(例如,myNewTool.ts)src/index.ts中注册工具示例:
// src/tools/myNewTool.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
export function registerMyNewTool(server: McpServer) {
server.tool(
"my-new-tool",
"我的新工具的描述",
{
// 工具参数模式
param1: z.string().describe("参数描述")
},
async (params) => {
// 工具实现
return {
content: [
{ type: "text", text: "我的工具的结果" }
]
};
}
);
}
// src/index.ts - 添加导入和注册
import { registerMyNewTool } from './tools/myNewTool.js';
// ...
registerMyNewTool(server);
欢迎贡献!请随时提交Pull Request。
git checkout -b feature/amazing-feature)git commit -m '添加一些惊人的功能')git push origin feature/amazing-feature)本项目采用MIT许可证 - 查看LICENSE文件以获取详细信息。
本项目利用了由韩小韩API提供的免费API。我们对他们的优质服务和支持表示衷心感谢。