Skip to main content
Glama

MCP好消息


CodeQL 代码检查 单元测试和上传覆盖率 代码验证 发布 GitHub 许可证

MCP Goodnews 是一款简单的模型上下文协议 (MCP) 应用,它包含一个用于获取正面、积极和振奋人心的新闻的服务器。该工具从NewsAPI获取新闻文章,并使用 Cohere LLM 根据正面情绪对新闻文章进行排名并返回排名靠前的新闻文章。

动机

在这个负面新闻频频占据头条的世界,Goodnews MCP 旨在让更多人看到积极向上、振奋人心的新闻故事。这个项目的灵感来源于早期的 GoodnewsFirst 项目,该项目每天向电子邮件订阅者推送正面新闻——这真是一个非常棒的项目!GoodnewsFirst 的出现早于大型语言模型 (LLM) 的最新突破,并且依赖于传统的情绪排序方法,而 Goodnews MCP 则利用现代 LLM 在零样本环境下进行情绪分析。

Related MCP server: Juhe News MCP Server

使用示例:MCP Goodnews 与 Claude Desktop

要求

克隆mcp-goodnews

# Clone the repository git clone https://github.com/VectorInstitute/mcp-goodnews.git

在下一步中,我们需要提供此克隆存储库位置的绝对路径。

更新 Claude 桌面配置以找到 mcp-goodnews

对于 Mac/Linux

# Navigate to the configuration directory cd ~/Library/Application\ Support/Claude/config # Edit the claude_desktop_config.json file nano claude_desktop_config.json

对于 Windows

# Navigate to the configuration directory cd %APPDATA%\Claude\config # Edit the claude_desktop_config.json file notepad claude_desktop_config.json

并且您需要在mcpServers下为Goodnews添加一个条目:

{ "mcpServers": { "Goodnews": { "command": "<absolute-path-to-bin>/uv", "args": [ "--directory", "<absolute-path-to-cloned-repo>/mcp-goodnews/src/mcp_goodnews", "run", "server.py" ], "env": { "NEWS_API_KEY": "<newsapi-api-key>", "COHERE_API_KEY": "<cohere-api-key>" } } } }

启动或重新启动 Claude Desktop

Claude Desktop 将使用更新后的配置来构建并运行 mcp-goodnews 服务器。如果成功,您将在聊天对话框的右下角看到锤子工具。

点击锤子工具图标会弹出一个列表,列出可用的 MCP 工具。你应该会看到fetch_list_of_goodnews列在那里。

向克劳德询问好消息!

提示示例:

  • “告诉我一些今天的好消息。”

  • “本周世界上发生了哪些积极的事情?”

  • “给我讲一些关于科学的振奋人心的新闻故事。”

工作原理

  1. 当您请求好消息时,应用程序会查询 NewsAPI 中的最新文章

  2. Cohere LLM 分析每篇文章的情绪

  3. 根据积极情绪得分对文章进行排名

  4. 排名靠前的好消息通过 Claude 返回给您

执照

Apache 2.0


对 Goodnews MCP 保持积极态度!

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VectorInstitute/mcp-goodnews'

If you have feedback or need assistance with the MCP directory API, please join our Discord server