Fetches, ranks, and returns positive and uplifting news stories from various sources
GoodNews is a Model Context Protocol (MCP) application that focuses on delivering positive and uplifting news in a world dominated by negative headlines. It fetches articles from NewsAPI and uses Cohere's LLM capabilities to rank and filter news based on positive sentiment. This tool was inspired by an earlier project called GoodnewsFirst, but leverages modern LLMs to perform sentiment analysis in a zero-shot setting, providing users with a refreshing alternative to the often negative news cycle.
GoodNews is an MCP application that helps you discover positive and uplifting news stories. In a media landscape often dominated by negative headlines, GoodNews offers a refreshing alternative by curating news articles with positive sentiment.
Clone the repository:
git clone https://github.com/VectorInstitute/mcp-goodnews.git
cd mcp-goodnews
Install the package:
pip install -e .
Set up your API keys as environment variables:
export NEWSAPI_KEY="your_newsapi_key"
export COHERE_API_KEY="your_cohere_api_key"
To use GoodNews with Claude Desktop or other MCP-compatible clients, add the following configuration to your client:
{
"mcpServers": {
"goodnews": {
"command": "python",
"args": [
"-m",
"mcp_goodnews.server"
]
}
}
}
Once installed and configured, you can interact with GoodNews through your MCP-compatible client (like Claude Desktop). Simply ask for positive news, and the service will fetch, rank, and present uplifting news stories.
Example prompts:
The service will retrieve news from NewsAPI and use Cohere's LLM to analyze and rank the articles based on positive sentiment, returning the most uplifting stories.
You can customize the behavior of GoodNews by modifying the following environment variables:
NEWSAPI_KEY
: Your NewsAPI API keyCOHERE_API_KEY
: Your Cohere API keyNEWSAPI_ENDPOINT
: The NewsAPI endpoint (defaults to "https://newsapi.org/v2/everything")NEWSAPI_SOURCES
: Comma-separated list of news sources (optional)NEWSAPI_DOMAINS
: Comma-separated list of domains to fetch news from (optional)NEWSAPI_LANGUAGE
: Language of news articles (defaults to "en")NEWSAPI_PAGESIZE
: Number of articles to fetch per request (defaults to 100)If you encounter issues:
For more detailed information, visit the GitHub repository.