{
  "markdown": "# mcp-trendpulse\n\n[![MCP](https://img.shields.io/badge/Model%20Context%20Protocol-MCP-blue.svg)](https://modelcontextprotocol.io)\n[![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![mcp-trendpulse MCP server](https://glama.ai/mcp/servers/AKzar1el/mcp-trendpulse/badges/score.svg)](https://glama.ai/mcp/servers/AKzar1el/mcp-trendpulse)\n\n**TrendPulse** is a Python Model Context Protocol (MCP) server for researching current news and search-interest trends. It combines Google News discovery and article extraction with Google Trends analysis so MCP clients can inspect what is trending, compare keyword momentum, explore related demand, and add current-news context to research workflows.\n\nThe project currently ships as a **community/self-hosted MCP server** and also contains the implementation for a separate **hosted TrendPulse by DigestSEO** surface for remote MCP clients such as ChatGPT and Codex. The hosted layer uses a smaller, goal-oriented tool surface while the community server keeps the full low-level research toolkit available to developers.\n\n> **Project status:** the local/community server is usable today. The DigestSEO-hosted MCP and public OpenAI plugin are not released yet and should not be treated as available endpoints.\n\nEngineering context: TrendPulse is part of the [DigestSEO](https://digestseo.com/) MCP ecosystem. It complements [mcp-gsc](https://digestseo.com/gsc-mcp/) for Google Search Console data, [mcp-geo](https://digestseo.com/geo-mcp/) for AI visibility, and [mcp-web-validator](https://digestseo.com/validator-mcp/) for technical web validation. The broader architecture is documented in the [DigestSEO MCP Suite engineering case study](https://tomiseregi.si/projects/digestseo-mcp-suite).\n\n## What TrendPulse can do\n\n### News research\n\n- Search Google News by keyword, location, topic, or publisher domain.\n- Retrieve top news stories.\n- Resolve Google News links and extract article content.\n- Fall back from normal HTTP retrieval to Playwright/Chromium for difficult pages.\n- Optionally summarize article text with MCP client sampling, with local NLP as a fallback.\n\n### Trend research\n\n- Retrieve current trending terms for a geographic market.\n- Pull Google Trends interest-over-time data for one or more keywords.\n- Calculate keyword growth over custom windows such as 3M or 1Y.\n- Rank live trends by volume or growth.\n- Inspect interest by country, region, city, or DMA where supported.\n- Explore related queries, related topics, suggestions, and category IDs.\n- Compare Google Search, YouTube Search, News Search, Image Search, and Google Shopping trend properties where supported by the underlying provider.\n\n## Community and hosted architecture\n\nTrendPulse is being developed with two deliberate surfaces:\n\n| Surface | Purpose | Status |\n| --- | --- | --- |\n| **Community MCP** | Full Python MCP server for local use, development, self-hosting, and integrations with MCP-compatible clients. | Available in this repository |\n| **TrendPulse by DigestSEO** | Managed remote MCP for ChatGPT/Codex and a future public OpenAI plugin with a smaller, task-oriented tool surface. | In development |\n\nThe community server remains useful independently. The hosted edition will reuse the same core trend-research concepts while adding the deployment, reliability, authentication, observability, and product integration needed for a managed service.\n\nThe implemented hosted tool surface is intentionally higher level than the community API and centers on goals such as:\n\n- `discover_trends`\n- `analyze_keyword_trend`\n- `compare_keyword_trends`\n- `discover_related_demand`\n- `get_trend_context`\n- `find_seo_opportunities`\n\nThese names describe the hosted ChatGPT Apps/MCP interface; they remain separate from the current Community MCP tool names.\n\n## Installation\n\n### Run directly from GitHub with `uvx` (recommended)\n\nThe package is not yet published to PyPI, so the most direct installation path is:\n\n```bash\nuvx --from git+https://github.com/AKzar1el/mcp-trendpulse.git mcp-trendpulse\n```\n\nAfter a PyPI release exists, the shorter form will be:\n\n```bash\nuvx mcp-trendpulse\n```\n\n### Install with pip from a checkout\n\n```bash\ngit clone https://github.com/AKzar1el/mcp-trendpulse.git\ncd mcp-trendpulse\npython -m pip install .\npython -m mcp_trendpulse\n```\n\n## Browser fallback\n\nNews/article tools can fall back to Playwright when ordinary retrieval cannot extract a usable article. Installing the Python `playwright` package does not install Chromium automatically.\n\nFor local use:\n\n```bash\nplaywright install chromium\n```\n\nFor Linux environments that also require browser system dependencies:\n\n```bash\nplaywright install --with-deps chromium\n```\n\nTrend-only operations do not inherently require Chromium.\n\n## Client configuration\n\n### Claude Desktop\n\nUsing `uvx` directly from GitHub:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-trendpulse\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"git+https://github.com/AKzar1el/mcp-trendpulse.git\",\n        \"mcp-trendpulse\"\n      ]\n    }\n  }\n}\n```\n\n### VS Code\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"mcp-trendpulse\": {\n        \"command\": \"uvx\",\n        \"args\": [\n          \"--from\",\n          \"git+https://github.com/AKzar1el/mcp-trendpulse.git\",\n          \"mcp-trendpulse\"\n        ]\n      }\n    }\n  }\n}\n```\n\n### Cursor\n\nCursor supports global and project MCP configuration. Add the server to the relevant `mcp.json` configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-trendpulse\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"git+https://github.com/AKzar1el/mcp-trendpulse.git\",\n        \"mcp-trendpulse\"\n      ]\n    }\n  }\n}\n```\n\n### Kiro\n\n[![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=mcp-trendpulse&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22git%2Bhttps%3A%2F%2Fgithub.com%2FAKzar1el%2Fmcp-trendpulse.git%22%2C%22mcp-trendpulse%22%5D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D)\n\nRequires `uv`/`uvx`. The install runs the current community MCP directly from this GitHub repository; it does not use the unreleased hosted surface.\n\n### ChatGPT and other cloud MCP clients\n\nThe repository now includes a dedicated stateless Streamable HTTP ASGI entry point at `mcp_trendpulse.asgi:app`. This is separate from the Community stdio entry point, which remains unchanged.\n\nFor controlled local/private testing you can run the ASGI app with Uvicorn or use the provided container. See [`deploy/README.md`](deploy/README.md) for the hardened container, Host/Origin allowlists, Chromium sandbox requirements, health/readiness endpoints, and reverse-proxy notes.\n\nThe DigestSEO-hosted endpoint and public ChatGPT app are still **not released**. Hosted deployments now support fail-closed Clerk OAuth authentication; do not expose the remote transport publicly unless Clerk issuer/JWKS/audience settings, the public base URL, and the Host/Origin allowlists are configured for that deployment.\n\n## Configuration\n\nTrendPulse loads environment variables from the process environment and from a local `.env` file when present.\n\nUseful variables include:\n\n```env\nHTTP_PROXY=http://your-proxy-address:port\nHTTPS_PROXY=http://your-proxy-address:port\nGOOGLE_TRENDS_DELAY=2.0\n```\n\n`GOOGLE_TRENDS_DELAY` controls the request delay used by the current Trends provider. Proxy variables can be useful when the upstream service rate-limits or blocks a particular network.\n\nRemote deployments also support `TRENDPULSE_HTTP_PATH`, `TRENDPULSE_HTTP_ALLOWED_HOSTS`, `TRENDPULSE_HTTP_ALLOWED_ORIGINS`, and `TRENDPULSE_BROWSER_SANDBOX`. The container enables Chromium sandboxing explicitly; local Community runs retain the Playwright-compatible default unless you opt in.\n\nDo not commit secrets, private proxy credentials, or machine-specific `.env` files.\n\n## MCP tools\n\nThe community MCP server currently exposes **16 tools**.\n\n### News tools\n\n| Tool | Purpose |\n| --- | --- |\n| `get_news_by_keyword` | Find recent news articles matching a keyword. |\n| `get_news_by_location` | Find recent news associated with a location. |\n| `get_news_by_topic` | Find recent news for a supported Google News topic. |\n| `get_top_news` | Retrieve top Google News stories. |\n| `get_news_by_site` | Find recent news from a specific publisher domain. |\n| `get_article_content` | Download, validate, extract, and optionally summarize one article URL. |\n\n### Trend tools\n\n| Tool | Purpose |\n| --- | --- |\n| `get_trending_terms` | Retrieve current trending terms for a geographic target. |\n| `get_trends` | Retrieve interest-over-time points for one or more keywords. |\n| `get_growth` | Calculate search-interest growth over requested windows. |\n| `get_ranked_trends` | Rank current trends by growth or volume. |\n| `get_top_trends` | Retrieve a top-trends feed without supplying a keyword. |\n| `get_interest_by_region` | Compare keyword interest across geographic regions. |\n| `get_related_queries` | Retrieve top and rising related search queries. |\n| `get_related_topics` | Retrieve top and rising related Google Trends topics. |\n| `get_suggestions` | Resolve autocomplete/topic suggestions for a query. |\n| `get_categories` | Retrieve Google Trends category IDs and names. |\n\n### Example: explicit trend window\n\n`get_trends` accepts an explicit `timeframe`. Supplying one is preferable when you need reproducible comparisons.\n\n```json\n{\n  \"keyword\": [\"technical SEO audit\", \"AI SEO audit\"],\n  \"geo\": \"US\",\n  \"source\": \"google search\",\n  \"timeframe\": \"today 12-m\",\n  \"cat\": 0\n}\n```\n\nSupported provider ranges include standard windows such as `today 12-m` and `today 5-y`, relative windows such as `today 90-d`, `all`, and exact date ranges such as `2021-01-01 2026-01-01`.\n\nGoogle Trends values are normalized interest scores. Do not interpret a 0-100 interest series as absolute search volume.\n\n## CLI\n\nThe separate Click CLI exposes a smaller news-oriented command set than the MCP server:\n\n```bash\nuv run mcp-trendpulse-cli --help\n```\n\nCurrent CLI commands:\n\n```text\nkeyword\nlocation\ntop\ntopic\ntrending\n```\n\nThe CLI and MCP surfaces are intentionally documented separately because they do not expose the same command set.\n\n## Development\n\nInstall the project with its development dependencies using your preferred Python environment, then run the unit suite:\n\n```bash\npython -m pytest\n```\n\nThe default pytest configuration excludes live integration tests.\n\nRun live provider tests explicitly with:\n\n```bash\npython -m pytest tests/integration -m integration\n```\n\nBrowser-marked integration tests require Playwright Chromium to be installed.\n\nRun Ruff checks with:\n\n```bash\nruff check .\n```\n\n## MCP Inspector\n\nRun the published-from-GitHub server through the MCP Inspector:\n\n```bash\nnpx @modelcontextprotocol/inspector uvx --from git+https://github.com/AKzar1el/mcp-trendpulse.git mcp-trendpulse\n```\n\nFor a local checkout:\n\n```bash\nnpx @modelcontextprotocol/inspector uv run mcp-trendpulse\n```\n\n## Packaging\n\nA GitHub Actions workflow is already present for building and publishing Python distributions through PyPI Trusted Publishing when a GitHub release is published. Until the first package release exists, use the GitHub `uvx --from ...` command shown above.\n\n## Security notes\n\nArticle retrieval is an outbound network feature and is treated as untrusted input. The implementation validates HTTP(S) targets, rejects private and non-routable destinations, checks redirect targets, enforces response-size limits, and applies browser-route validation when Playwright is used.\n\nIf you deploy TrendPulse remotely, retain these controls and add deployment-level rate limiting, request timeouts, observability, and resource limits rather than relying only on application defaults.\n\n## Roadmap\n\nCurrent production-readiness work is focused on:\n\n1. Keeping documentation, packaging metadata, and generated MCP manifests coherent with the live tool surface.\n2. Adding continuous integration for unit tests and static checks.\n3. Separating provider access from TrendPulse's domain logic so providers can be changed without rewriting the MCP layer.\n4. Adding a production remote HTTP transport while preserving local stdio operation.\n5. Designing a smaller high-level hosted tool surface for ChatGPT/Codex.\n6. Integrating the hosted service with the DigestSEO application and operational stack.\n7. Packaging and testing the hosted MCP as an OpenAI plugin only after the service is production-ready.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\n<!-- mcp-name: io.github.AKzar1el/mcp-trendpulse -->\n",
  "bytes": 12676,
  "sha": "05914c67101e7c48d79bfc613fba4238060f7a7e5953af3678da0773c6bca49a",
  "repo_slug": "akzar1el/mcp-trendpulse",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_akzar1el_mcp_trendpulse_41e687b3/readme"
}