AllNewsAPI

io.github.AllNewsAPI由 GitHub 帳號 AllNewsAPI 發布v1.1.9更新於 Oct 24, 2026

Get access to real-time and historical news data including top headlines from global sources

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取資料與分析

概覽

AI 產生的概覽

AllNewsAPI 讓助理透過託管或本機 MCP 伺服器檢索即時與歷史新聞、取得頭條,並查詢 API 用量。

可以做什麼
  • 依關鍵字、日期範圍、語言、國家、地區、分類、發布者或排序方式搜尋新聞文章,可選擇回傳全文
  • 取得頭條新聞,可依國家、分類、語言、情緒或命名實體篩選
  • 運用 AI 情緒分數、辨識出的實體與簡短摘要進行篩選與補充
  • 查詢目前方案、請求上限與剩餘額度
適用情境
適合需要助理取得當前或歷史新聞報導、依國家或主題追蹤頭條,或在研究與寫作時依情緒、命名實體篩選新聞的情境。
執行需求
需要來自 allnewsapi.com 的 AllNewsAPI 金鑰。可連線託管端點 mcp.allnewsapi.com,透過 X-API-Key 標頭(或 apikey 查詢參數、Bearer 權杖)傳入金鑰;也可用 npx 執行 npm 套件 allnewsapi-mcp,透過 --apikey 參數或 ALLNEWSAPI_KEY 環境變數提供金鑰。需要網路存取。
安裝前請注意
API 金鑰是計費憑證;它可透過 URL 查詢參數傳遞,可能出現在日誌或共用設定中,建議改用標頭或環境變數。國家、地區、分類、發布者、語言、attributes 與 sortby 等進階篩選需要付費方案,呼叫會消耗額度。搜尋關鍵字與篩選條件會傳送到 AllNewsAPI 的伺服器。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 AllNewsAPI,將其新增到工作區。
  2. 連接 X-API-Key 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.AllNewsAPI%2Fmcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

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

{
  "mcpServers": {
    "allnewsapi": {
      "type": "http",
      "url": "https://mcp.allnewsapi.com/mcp",
      "headers": {
        "X-API-Key": "<YOUR_API_KEY>"
      }
    }
  }
}

README

AllNewsAPI MCP

[npm] [Listed on mcpservers.org] [AllNewsAPI/mcp-server MCP server]

[AllNewsAPI/mcp-server MCP server]

Get access to real-time and historical news data including top headlines from global sources via AllNewsAPI. Supports multiple filter options including keyword search, category, language and more. This Model Context Protocol server lets MCP clients (Claude, Cursor, VS Code, Windsurf, and others) search news articles, fetch top headlines, and check your API usage.

You'll need an API key — get one at allnewsapi.com.

Quick start

Pick one of the two ways to connect.

Hosted (no install)

Point your client at the hosted server and pass your API key in the X-API-Key header:

json
{  "mcpServers": {    "allnewsapi": {      "type": "remote",      "url": "https://mcp.allnewsapi.com/mcp",      "headers": {        "X-API-Key": "YOUR_API_KEY_HERE"      }    }  }}

Prefer a URL-only setup? Use https://mcp.allnewsapi.com/mcp?apikey=YOUR_API_KEY_HERE instead of the header.

The key can be supplied three ways, in this order of precedence: the X-API-Key header, the apikey query parameter, or an Authorization: Bearer YOUR_API_KEY_HERE header (a fallback for clients that only support bearer tokens).

Local (npx)

Runs the server on your machine via npx — no clone or build needed:

json
{  "mcpServers": {    "allnewsapi": {      "command": "npx",      "args": ["allnewsapi-mcp@latest", "--apikey", "YOUR_API_KEY_HERE"]    }  }}

You can also supply the key as an ALLNEWSAPI_KEY environment variable instead of --apikey.

Client-specific setup

Claude Desktop

Edit your config (Settings → Developer → Edit Config) and add the local or hosted snippet above. Full guide: modelcontextprotocol.io/quickstart/user.

Cursor

Cursor Settings → MCP → Add new MCP Server. Name it "AllNewsAPI", choose the command type, and enter:

npx allnewsapi-mcp@latest --apikey YOUR_API_KEY_HERE
VS Code
bash
code --add-mcp '{"name":"allnewsapi","command":"npx","args":["allnewsapi-mcp@latest","--apikey","YOUR_API_KEY_HERE"]}'

The server is then available to your GitHub Copilot agent. Full guide: VS Code MCP docs.

Windsurf

Add the local or hosted snippet above to your MCP config. Full guide: Windsurf MCP docs.

Claude Code

Add it from the terminal — local:

bash
claude mcp add allnewsapi -- npx allnewsapi-mcp@latest --apikey YOUR_API_KEY_HERE

Or the hosted server:

bash
claude mcp add --transport http allnewsapi https://mcp.allnewsapi.com/mcp --header "X-API-Key: YOUR_API_KEY_HERE"
Claude Cowork

Cowork runs inside Claude Desktop. Add the hosted server as a custom connector — Customize → Connectors → + — and enter the URL with your key:

https://mcp.allnewsapi.com/mcp?apikey=YOUR_API_KEY_HERE

For a local setup, use the Claude Desktop config shown above.

OpenWork

OpenWork is an open-source Cowork alternative with MCP support. Add AllNewsAPI using either the local command (npx allnewsapi-mcp@latest --apikey YOUR_API_KEY_HERE) or the hosted URL above, following OpenWork's MCP configuration.

Any other MCP client: point it at the hosted URL (https://mcp.allnewsapi.com/mcp) or run the npx allnewsapi-mcp@latest command with your API key.

Tools

search-news

Search articles by keyword, date, and filters.

ParameterTypeDescription
qstringKeywords to search for
startDate / endDatestringDate range (YYYY-MM-DD)
contentbooleanInclude full article content (default: false)
langstringLanguage code(s), e.g. en, fr
countrystringCountry code(s), e.g. us, gb
regionstringRegion(s), e.g. americas, europe
categorystringCategory/categories, e.g. business
maxnumberNumber of articles, 1–100 (default: 5)
pagenumberPage number (default: 1)
attributesstringWhere to match keywords: title, description, content
sortbystringpublishedAt or relevance
publisherstringFilter by publisher(s)
ai_sentimentstringpositive, negative, or neutral
ai_entity_namestringNamed entity, e.g. Apple
ai_entity_typestringEntity type, e.g. person, organization, location

headlines

Get top headlines, optionally filtered.

ParameterTypeDescription
countrystringCountry code(s), e.g. us, gb
categorystringCategory, e.g. technology
langstringLanguage code, e.g. en
maxnumberNumber of articles, 1–100 (default: 5)
ai_sentimentstringpositive, negative, or neutral
ai_entity_namestringNamed entity, e.g. Apple
ai_entity_typestringEntity type, e.g. person, organization, location

usage

Check your plan, request limits, and remaining quota. No parameters.

Plan note: Advanced filters — country, region, category, publisher, lang, attributes, and sortby — require a paid plan. On the free plan, use search-news with q and max. See pricing.

AI filtering

search-news and headlines accept AI-analyzed filters:

  • ai_sentiment — overall article sentiment (positive, negative, neutral)
  • ai_entity_name — a named entity in the article (e.g. United Nations)
  • ai_entity_type — entity category (person, organization, location)

Returned articles may also include AI sentiment scores, detected entities, and a short AI summary when available.

Example prompts

  • "Get me the latest technology news from the US"
  • "Find articles about climate change from European sources"
  • "Show me top business headlines from the past week"
  • "Find positive news about renewable energy"
  • "Show me articles mentioning Apple as an organization"
  • "Check my API usage and remaining quota"

Supported values

Full lists of accepted values live in the AllNewsAPI docs:

License

MIT © AllNewsAPI — see LICENSE for details.

來源:README.md,提交 613634d

工具

0
該伺服器需要 API 金鑰等憑證,因此 SourceWeft 無法在沒有憑證的情況下讀取其工具,也未收錄。

版本歷史

1
  1. v1.1.9最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分