GNews

io.github.gnews-iov1.0.0更新於 Oct 7, 2026

Official GNews API server: search news articles and top headlines from 80,000+ sources.

已驗證Streamable HTTP可網頁執行Web Search & ScrapingCommunication & Collaboration

概覽

AI 產生的概覽

讓助理在 GNews 涵蓋超過 8 萬個來源的新聞資料庫中搜尋文章並取得頭條新聞。

功能
這是一個託管型 MCP 伺服器,對外提供 GNews API。它包含兩個工具:search 以關鍵字組合搜尋新聞文章,top_headlines 依類別與國家取得頭條新聞。結果可依語言與最大數量限制,範例包括搜尋英文氣候變遷文章或取得美國科技類頭條。
適用情境
當助理需要最新新聞報導、以關鍵字檢索文章,或依類別與國家篩選的頭條時使用。適合仰賴近期報導的研究、監測與摘要工作,而非一般網頁搜尋。
執行需求
需要支援 streamable HTTP 的遠端 MCP 用戶端,例如 Claude Code 或 Gemini CLI。必須提供有效的 GNews API 金鑰,並透過 X-Api-Key HTTP 標頭傳送;可向服務商申請免費金鑰。不需要本機安裝或套件,建議使用 HTTPS 連線。
安裝前請注意
X-Api-Key 標頭攜帶的是機密 API 金鑰,應像密碼一樣看待,切勿分享。此伺服器僅作為代理,不儲存金鑰,但每次請求都會把金鑰轉送給 GNews API。託管伺服器會記錄每次工具呼叫的匿名使用統計,包括工具名稱、用戶端名稱與版本、成功或失敗、耗時,以及 lang、country、category、max、page 和 sortby 等參數;金鑰僅以單向雜湊形式記錄,搜尋查詢不會被記錄。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 GNews,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "gnews": {
      "type": "http",
      "url": "https://mcp.gnews.io/"
    }
  }
}

README

📡 GNews API MCP Server

This document describes a Model Context Protocol (MCP) server that exposes the GNews API.

This server is already deployed and publicly accessible, so you don't need to install anything. You just need to connect it to your compatible MCP client (Claude Code, Gemini CLI, etc.).


🔑 GNews API Key

To use this server, you need a valid GNews API key.

👉 Get your API key here

The API key must be provided in the following way:

  • Via an HTTP header X-Api-Key

🔗 MCP Integration

This server is listed in the official MCP Registry as io.github.gnews-io/gnews.

With Claude Code

Add the server to your Claude Code configuration with the following command:

bash
claude mcp add --transport http gnews_api https://mcp.gnews.io/ --header "X-Api-Key: YOUR_API_KEY"

🛠️ Available Tools

Once the server is connected, the following two tools are available:

  • search: Search for news articles through a combination of keywords.
  • top_headlines: Get top headlines by category and country.

📄 Usage Examples

Search for articles

This example searches for the 5 latest English articles on climate change:

json
{  "tool": "search",  "args": {    "q": "climate change",    "lang": "en",    "max": 5  }}

Get latest headlines

This example retrieves the 5 top headlines from the "technology" category in the United States:

json
{  "tool": "top_headlines",  "args": {    "category": "technology",    "country": "us",    "max": 5  }}

🔒 Security

  • Never share your API key. Treat it like a password.
  • This server acts as a proxy: it does not store any API keys. Your key is transmitted directly to GNews API with each request.
  • Always use an HTTPS connection to communicate with the server to ensure your key is encrypted in transit.
  • The hosted server records anonymous usage statistics for each tool call: tool name, MCP client name and version, success or error, duration, and the lang, country, category, max, page and sortby parameters. Your API key is only recorded as a one-way hash, and your search queries are never recorded.

📋 Client Prerequisites

  • A compatible MCP client (e.g., Claude Code).
  • The latest version of Gemini CLI is recommended for optimal compatibility.

來源:README.md,提交 8b06451

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v1.0.0最新Oct 7, 2026