AllNewsAPI MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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:
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:
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:
VS Code
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:
Or the hosted server:
Claude Cowork
Cowork runs inside Claude Desktop. Add the hosted server as a custom connector — **Customize → Connectors → +** — and enter the URL with your key:
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.
| Parameter | Type | Description |
|-----------|------|-------------|
| q | string | Keywords to search for |
| startDate / endDate | string | Date range (YYYY-MM-DD) |
| content | boolean | Include full article content (default: false) |
| lang | string | Language code(s), e.g. en, fr |
| country | string | Country code(s), e.g. us, gb |
| region | string | Region(s), e.g. americas, europe |
| category | string | Category/categories, e.g. business |
| max | number | Number of articles, 1–100 (default: 5) |
| page | number | Page number (default: 1) |
| attributes | string | Where to match keywords: title, description, content |
| sortby | string | publishedAt or relevance |
| publisher | string | Filter by publisher(s) |