实时趋势数据服务器

Pulse CN MCP Server 是一个基于模型上下文协议(MCP)的服务器,提供来自中国互联网的实时趋势内容,适用于AI模型获取最新趋势数据。

  • by wangtsiao
  • TypeScript
  • 本地部署
  • 13 星标
  • 更新于
在 GitHub 查看 wangtsiao/pulse-cn-mcp

使用说明

🔥 Pulse CN MCP服务器

一个强大的模型上下文协议(MCP)服务器,提供来自中国互联网的实时趋势内容。

特性 • 安装 • 快速开始 • 文档 • 贡献 • 许可证

🌟 概述

Pulse CN MCP Server使AI模型能够访问有关中国互联网趋势的最新信息。基于模型上下文协议(MCP)构建,它充当了人工智能模型和来自中国最受欢迎的社交媒体平台、新闻网站和内容聚合器的实时数据之间的桥梁。

✨ 特性

该服务器提供对来自18个主要中国平台的趋势数据的实时访问:

平台 内容 状态
🔮 星座运势 每日星座预测 ✅
💬 每日一句励志英语 每日励志英语语录 ✅
📊 热搜热榜聚合 聚合趋势主题 ✅
🔥 微博实时热搜 微博实时热门话题 ✅
📰 今日头条热搜 今日头条新闻✅
📝 澎湃新闻热搜 澎湃新闻热门话题 ✅
🏀 虎扑步行街热搜 沪普BXJ实时动态 🔜
❓ 知乎实时热搜 知乎实时热门话题 🔜
📔 知乎每日日报 知乎日报 🔜
💼 36氪24小时热榜 36氪24小时热门商业新闻 🔜
🎬 哔哩哔哩全站日榜 Bilibili每日排名🔜
🔍 百度热点热榜 百度热门话题 🔜
📱 抖音热点热榜 抖音热门话题 🔜
👥 豆瓣小组精选 豆瓣群特色内容 🔜
💻 IT资讯热榜 IT新闻热门话题 🔜
📈 虎嗅网热榜 虎秀24小时热门话题 🔜
📱 产品经理热文榜 Woshipm每日热门文章 🔜
🐞 虫族部落最新热门 崇布楼最新热门内容 🔜

🚀 安装

# Clone the repository
git clone https://github.com/wangtsiao/pulse-cn-mcp.git

# Navigate to the project directory
cd pulse-cn-mcp

# Using npm
npm install
npm run build

# Or using Bun (faster)
bun install
bun run build

⚡ 快速开始

使用以下命令启动MCP服务器:

# Using npm
npm start

# Or using Bun
bun start

这将使用Stdio传输启动服务器,使其为MCP兼容的AI模型连接做好准备。

📖 文档

建筑

Pulse CN MCP服务器采用模块化架构,每个数据源都有单独的工具:

src/
├── index.ts            # Main entry point and server setup
└── tools/              # Individual tool implementations
    ├── weiboHotspots.js
    ├── horoscope.js
    ├── dailyEnglishSentence.js
    ├── internetHotspotsAggregator.js
    ├── todayHeadlinesHotspots.js
    ├── paperNewsHotspots.js
    └── otherHotspots.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 澎湃新闻 /paper-news-hotspots

即将推出

  • hupu-pedestrian-street-hotspots
  • zhihu-realtime-hotspots
  • zhihu-daily-hotspots
  • 36-krypton-24-hour-hotspots
  • bilibili-daily-hotspots
  • baidu-hotspots
  • douyin-hotspots
  • douban-group-hotspots
  • huxiu-hotspots
  • product-manager-hotspots
  • in-information-hotspots
  • insect-hotspots

集成示例

以下是如何使用TypeScript与服务器集成:

import { McpClient } from "@modelcontextprotocol/sdk/client";

async function example() {
  const client = new McpClient();
  
  // Get Weibo trending topics
  const weiboHotspots = await client.callTool("weibo-hotspots", {});
  console.log(weiboHotspots.content);
  
  // Get daily horoscope for Aries
  const horoscope = await client.callTool("horoscope", { sign: "aries" });
  console.log(horoscope.content);
}

🛠️ 发展

添加新工具

  1. 在中创建新文件 src/tools/ (例如。, myNewTool.ts)
  2. 使用MCP服务器SDK实现您的工具
  3. 在中注册该工具 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",
    "Description of my new tool",
    {
      // Tool parameters schema
      param1: z.string().describe("Parameter description")
    },
    async (params) => {
      // Tool implementation
      return {
        content: [
          { type: "text", text: "Result of my tool" }
        ]
      };
    }
  );
}

// src/index.ts - Add import and registration
import { registerMyNewTool } from './tools/myNewTool.js';
// ...
registerMyNewTool(server);

🤝 贡献

欢迎投稿!请随时提交拉取请求。

  1. 分叉项目
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add some amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

📄 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🙏 致谢

该项目利用了由提供的免费API 韩小韩API。我们衷心感谢他们的出色服务和支持。


Built with ❤️ by wangtsiao