Skip to main content

Add your description here

Project description

Google News Trends MCP

An MCP server to access Google News and Google Trends. Does not rely on any paid APIs.
The returned data currently uses a lot of tokens, so it is recommended to always use limits when making requests.

Features

  • Search Google News articles based on keyword, location, topic
  • Get top news stories from Google News
  • Google Trends keywords base on location
  • Optional NLP processing to summarize articles and extract keywords

Installation

Using uv/uvx (recommended)

When using uv no specific installation is needed. We will use uvx to directly run google-news-trends-mcp.

Using PIP

pip install google-news-trends-mcp

After installation, you can run it as a script using:

python -m google-news-trends-mcp

Configuration

Configure for Claude.app

Add to your Claude settings:

Using uvx
{
  "mcpServers": {
    "google-news-trends": {
      "command": "uvx",
      "args": ["google-news-trends-mcp"]
    }
  }
}
Using pip installation
{
  "mcpServers": {
    "google-news-trends": {
      "command": "python",
      "args": ["-m", "google-news-trends-mcp"]
    }
  }
}

Configure for VS Code

Using uvx
{
  "mcp": {
    "servers": {
      "google-news-trends": {
        "command": "uvx",
        "args": ["google-news-trends-mcp"]
      }
    }
  }
}
Using pip installation
{
  "mcp": {
    "servers": {
      "google-news-trends": {
        "command": "python",
        "args": ["-m", "google-news-trends-mcp"]
      }
    }
  }
}

Tools

The following MCP tools are available:

Tool Name Description
get_news_by_keyword Search for news using specific keywords.
get_news_by_location Retrieve news relevant to a particular location.
get_news_by_topic Get news based on a chosen topic.
get_top_news Fetch the top news stories from Google News.
get_trending_keywords Return trending keywords from Google Trends for a specified location.

All of the news related tools have an option to summarize the text of the article using NLP (nltk)

CLI

All tools can be accessed from the command line using uv

uv run google-news-trends
Usage: google-news-trends [OPTIONS] COMMAND [ARGS]...

  Find and download news articles using Google News.

Options:
  --help  Show this message and exit.

Commands:
  keyword   Find articles by keyword using Google News.
  location  Find articles by location using Google News.
  top       Get top news stories from Google News.
  topic     Find articles by topic using Google News.
  trending  Returns google trends for a specific geo location.

Debugging

npx @modelcontextprotocol/inspector uvx google-news-trends-mcp

To run from within locally installed project

cd path/to/google/news/tends/mcp
npx @modelcontextprotocol/inspector uv run google-news-trends-mcp

Testing

cd path/to/google/news/tends/mcp
python -m pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_news_trends_mcp-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_news_trends_mcp-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page