mrniebit_hot_topic_mcp

mrniebit_hot_topic_mcp

by mrniebit
An MCP server implementation that aggregates trending topics from various platforms like Sina Weibo and Zhihu.

Hot Topic Aggregation MCP Server

Overview

The Hot Topic Aggregation MCP Server is a Python-based implementation of the Model Context Protocol (MCP) designed to fetch trending topics from various platforms. This server allows users to retrieve real-time hot topics from platforms like Sina Weibo, Zhihu, and more. It is particularly useful for developers and analysts who need to monitor trending content across multiple social media platforms.

Features

  • Multi-Platform Support: Fetch trending topics from Sina Weibo, Zhihu, and other platforms.
  • Extensible Architecture: Easily add support for new platforms by extending the HotTopicBase class.
  • API Integration: Inspired by the DailyHotApi project, ensuring reliable and efficient data retrieval.

Project Structure

The project is organized into the following directories and files:

hot-topic-mcp/
├── items/            # Contains platform-specific hot topic implementations
├── tests/            # Unit tests for the project
├── .gitignore        # Specifies files to ignore in Git
├── .python-version   # Specifies the Python version
├── README.md         # Project documentation
├── main.py           # Entry point for the MCP server
├── pyproject.toml    # Project configuration file
└── uv.lock           # Dependency lock file

Usage

Adding a New Hot Topic Class

To add support for a new platform, follow these steps:

  1. Extend HotTopicBase: Create a new class that inherits from HotTopicBase.
  2. Override get_hot_topics: Implement the get_hot_topics method to fetch hot topics from the new platform.
  3. Register the Platform: Use the @register_hot_topic decorator to register the platform with a unique platform_name.

Example:

from hot_topic_base import HotTopicBase, register_hot_topic

@register_hot_topic(platform_name="sina_weibo_hot_topic")
class SinaWeiboHotTopic(HotTopicBase):
    def get_hot_topics(self):
        # Implementation to fetch Sina Weibo hot topics
        pass

Running the Server

To start the MCP server, run the following command:

python main.py

Resources

Contributing

Contributions are welcome! If you'd like to add support for a new platform or improve the existing codebase, please fork the repository and submit a pull request.

License

This project is open-source and available under the MIT License. See the LICENSE file for more details.

Features & Capabilities

Categories
mcp_server model_context_protocol python search api_integration trending_topics

Implementation Details

Stats

0 Views
0 Favorites
1 GitHub Stars

Repository Info

mrniebit Organization

Similar Servers

continuedev_continue by continuedev
0
0
0