TrendRadarDocsA PROJECT BYsansansansan's personal projects and softwaresandev.cc
HomeDocumentationCommunityPartnershipsIndividual SupportCredits
  • Start here
    • Choose a deployment
    • No server: GitHub Actions
    • Server / NAS: Docker
    • Try locally: Run with uv
    • Configure content & delivery
  • Data Sources
    • Platform Configuration
    • Self-hosted sources (AI)
    • RSS Feed Configuration
  • Content Filtering
    • Keyword Configuration
    • AI Smart Filtering
  • Push Notifications
    • Push Channels
    • Push Modes
    • Scheduling
  • AI Enhancement
    • AI Analysis & Push
    • AI Translation
    • MCP Chat Analysis
    • MCP Query Guide
  • Data & Operations
    • Storage Configuration
    • Config Editor
    • Publish web reports
    • Architecture
  • More
    • FAQ
  1. Docs
  2. /
  3. AI Enhancement
  4. /
  5. MCP Chat Analysis
PreviousAI TranslationNextMCP Query Guide
© TrendRadar·GPL-3.0 License·Website·GitHub·by sansan

MCP Chat Analysis

MCP stands for "Model Context Protocol". Think of it as a bridge that lets AI assistants (such as ChatGPT or Claude) directly access and analyze the news data you have collected.
With MCP, you no longer just passively read pushed messages — you can ask the AI questions through conversation. For example, you can ask, "How have Tesla's news trends looked this week?" and the AI will give you a smart analysis based on the data you have collected.

What you can do with it

CapabilityDescription
Natural-language queriesAsk the AI in everyday language to query the news data you have collected
Topic trend analysisTrack a topic's changes in heat, its lifecycle, and spike detection
Cross-platform comparisonCompare how much attention different platforms (Weibo, Zhihu, Toutiao, etc.) give to the same event
Sentiment analysisAnalyze the sentiment of news headlines (positive, negative, neutral)
Related discoveryAutomatically find other coverage related to a given news item
Summary reportsGenerate a news summary report for a given time period
About the data source
The AI analyzes your locally stored data (kept in the output/ directory), not data fetched from the internet in real time. The project ships with sample data so you can try it quickly. Once you deploy and run the project, the system collects data automatically, and you will then have your own real-time data.

27 built-in tools

The MCP Server provides 27 analysis tools, covering everything from basic queries to in-depth analysis. You don't need to memorize their names — the AI assistant automatically picks the right tool based on your question.
CategoryToolsPurpose
Basic queriesget_latest_newsget_news_by_dateget_trending_topicsFetch the latest news, query by date, and get trending topics
Smart searchsearch_newsfind_related_newsSearch news by keyword and discover related news
In-depth analysisanalyze_topic_trendanalyze_data_insightsanalyze_sentimentaggregate_newscompare_periodsgenerate_summary_reportTopic trend analysis, data insights, sentiment analysis, news aggregation, period comparison, and summary report generation
RSS queriesget_latest_rsssearch_rssget_rss_feeds_statusFetch the latest RSS content, search RSS, and check RSS feed status
Article readingread_articleread_articles_batchRead the body of a single article via Jina AI Reader, or read multiple articles in batch (up to 5)
Message pushsend_notificationget_channel_format_guideget_notification_channelsPush AI-generated content to your configured channels, get each channel's format limits and best practices, and get the status of configured notification channels
System managementget_current_configget_system_statusresolve_date_rangecheck_versiontrigger_crawlView the current configuration and system status, resolve date ranges, check for TrendRadar and MCP Server updates, and manually trigger a crawl
Storage syncsync_from_remoteget_storage_statuslist_available_datesPull data from remote storage to local, get storage configuration and status, and list available data dates locally and remotely
Before using the notification tools, you need to configure at least one notification channel in config.yaml. Use the get_notification_channels tool to check which channels are configured.

Key tool parameters

Below are the detailed parameters for several commonly used tools, to help you understand each tool's capabilities. You don't need to fill these in manually — the AI assistant handles them automatically based on your questions.
search_news - Unified search interface
analyze_topic_trend - Topic trend analysis
compare_periods - Period comparison analysis
send_notification - Send notification
trigger_crawl - Manually trigger a crawl

Date expressions

Many tools require a date range. The recommended approach is to first use the resolve_date_range tool to parse a natural-language date into a precise range, then pass it to other tools. This avoids inconsistencies that can arise when the AI calculates dates on its own.
TypeChineseEnglish
Single day今天, 昨天today, yesterday
Week本周, 上周this week, last week
Month本月, 上月this month, last month
Last N days最近3天, 最近7天, 最近14天, 最近30天last 3 days, last 7 days, last 14 days, last 30 days
Dynamic最近N天 (any number)last N days (any number)

MCP Resources

The MCP Server also registers 4 Resources that some clients (such as Cherry Studio) can browse directly:
  • config://platforms — Supported platform list
  • config://rss-feeds — RSS feed list
  • data://available-dates — Available data dates for querying
  • config://keywords — Keyword configuration

Deploy the MCP Server

The MCP Server ships as a standalone Docker image and listens on port 3333 by default.

Using Docker Compose (recommended)

If you already deploy the main TrendRadar project with Docker Compose, just start the MCP service:
docker compose up -d trendradar-mcp

Standalone deployment

You can also run the MCP Server container on its own:
docker run -d --name trendradar-mcp \
  -p 127.0.0.1:3333:3333 \
  -v $(pwd)/config:/app/config:ro \
  -v $(pwd)/output:/app/output:ro \
  wantcat/trendradar-mcp:latest
About the image
The MCP Server image is named wantcat/trendradar-mcp. It needs the config directory (to read configuration) and the output directory (to read data) mounted.

Verify data readiness

The MCP Server analyzes data stored in the local output/ directory. Before you begin, make sure the data is ready:
  • Check whether the output/ directory contains data files (stored in date-based folders)
  • If there is no data, run the main program once to collect it: uv run python -m trendradar
  • You can also use the MCP tool trigger_crawl to manually trigger a crawl (note: set save_to_local=true to persist the results)
  • When deploying with Docker, the output directory is shared between the main program and the MCP Server via a volume mount
The project ships with sample data for a quick start — you can begin chatting immediately after deployment without manually collecting data first.

Client configuration

Once the MCP Server is running, you need to configure the connection details in your AI client. Here is how to configure the most common clients:
Cherry Studio
Claude Desktop / Cline
Cursor
VSCode (Cline/Continue)
Recommended Cherry Studio offers a graphical configuration interface, which is the easiest to use.
Path: Settings > MCP Server > Add
  • Type: streamableHttp
  • URL: http://127.0.0.1:3333/mcp
After saving, you can use the MCP analysis features in your conversations.

Two run modes

MCP supports two run modes — pick whichever suits you:
STDIO mode
In STDIO mode, the MCP Server runs as a child process managed automatically by the AI client. You only need to configure it once; after that, the service starts automatically each time you open the client, with no manual intervention.
Pros: configure once, starts automatically, no need to manage the service lifecycle manually.
Client configuration example (works for Claude Desktop / Cline / Cursor, etc.):
{
  "mcpServers": {
    "trendradar": {
      "command": "uv",
      "args": ["run", "python", "-m", "mcp_server", "--transport", "stdio"],
      "cwd": "/path/to/trendradar"
    }
  }
}
Replace cwd with the actual path to your local TrendRadar project.
HTTP mode

Usage examples

Once configured, you can ask questions in natural language directly in your AI client. Here are a few examples:
Question: "What are today's trending topics?"
Question: "Analyze the news trends about artificial intelligence over the past week."
Question: "Compare the discussion heat for a given topic on Weibo versus Zhihu."
Question: "Generate this week's news summary report."

Advanced use cases

Scenario 1: Daily highlights push
Question: "Generate today's trending summary and push it to Feishu."
The AI will call get_trending_topics and generate_summary_report to gather and organize the data, then use send_notification to push the result to your configured Feishu channel.
Scenario 2: Topic tracking
Question: "How have the AI news trends looked over the past three days?"
The AI will first call resolve_date_range to parse "past three days" into precise dates, then call analyze_topic_trend for trend analysis, showing heat changes and key events.
Scenario 3: Cross-period comparison
Question: "Compare this week's and last week's trending topics."
The AI will call compare_periods to analyze two time periods side by side, showing rising topics, declining topics, and newly emerged topics.
Tip
You don't need to know which tool to use — the AI assistant automatically picks the right analysis tool based on your question. Just ask in everyday language.

AI Query Guide

The complete MCP tool usage Q&A has been organized into a dedicated page, with detailed question examples, tool behavior explanations, and adjustable parameters.
See the full MCP Query Guide to learn how to use various analysis features through natural language conversation with the AI.