Headline Vibes Analysis MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Pulls headlines from CNN for sentiment analysis

  • Pulls headlines from Fox News for sentiment analysis

  • Pulls headlines from NBC News for sentiment analysis

标题氛围分析 MCP 服务器

一个模型上下文协议服务器,用于分析美国主要出版物新闻标题中的情感。该服务器提供基于日期的标准接口和自然语言日期解析功能,方便用户使用。

特征

  • 每次请求最多分析 100 条标题
  • 美国各大新闻来源的头条新闻分布均匀
  • 情绪评分采用 0-10 的等级(0 = 最负面,10 = 最正面)
  • 自然语言日期解析(例如“昨天”、“上周五”)
  • 详细的源分布信息
  • 搜索结果中包含的示例标题

先决条件

安装

  1. 克隆存储库:
git clone https://github.com/fred-em/headline-vibes.git cd headline-vibes
  1. 安装依赖项:
npm install
  1. 构建服务器:
npm run build
  1. 在您的 MCP 设置文件中配置您的 NewsAPI 密钥:
{ "mcpServers": { "headline-vibes": { "command": "node", "args": ["/path/to/headline-vibes/build/index.mjs"], "env": { "NEWS_API_KEY": "your-api-key-here" }, "disabled": false, "autoApprove": [] } } }

可用工具

分析标题

使用自然语言日期输入或特定日期分析情绪。

使用示例:

// Using natural language { "name": "analyze_headlines", "arguments": { "input": "yesterday" } } // Or using specific dates { "name": "analyze_headlines", "arguments": { "input": "2025-02-11" } }

输入示例:

  • “上周五”
  • “3天前”
  • “3月10日”
  • “两周前”
  • “2025-02-11”(也支持 YYYY-MM-DD 格式)

响应格式

该工具以以下格式返回结果:

{ "score": "6.50", // Normalized sentiment score (0-10) "synopsis": "Overall positive sentiment in today's headlines", "headlines_analyzed": 100, // Number of headlines analyzed "sources_analyzed": 12, // Number of unique sources "source_distribution": { // Distribution of headlines by source "Reuters": 10, "Associated Press": 8, "CNN": 9, // ... etc }, "sample_headlines": [ // Up to 5 sample headlines "Example headline 1", "Example headline 2", // ... etc ] }

新闻来源

该服务器从美国主要新闻来源获取头条新闻,包括:

  • 美联社
  • 路透社
  • 美国有线电视新闻网
  • 福克斯新闻
  • NBC新闻
  • ABC新闻
  • 《华尔街日报》
  • 《华盛顿邮报》
  • 《今日美国》
  • 彭博社
  • 商业内幕
  • 时间

错误处理

服务器针对常见问题提供了清晰的错误消息:

  • 无效的日期格式
  • 无法解析的自然语言查询
  • 未找到指定日期的标题
  • NewsAPI 的 API 错误

发展

要在开发期间以监视模式运行服务器:

npm run watch

执照

麻省理工学院

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

使用标准和自然语言日期输入分析美国主要出版物新闻标题中的情绪,从而深入了解公众情绪趋势。

  1. Features
    1. Prerequisites
      1. Installation
        1. Available Tools
          1. analyze_headlines
        2. Response Format
          1. News Sources
            1. Error Handling
              1. Development
                1. License
                  ID: jkojbe4jve