AllNewsAPI

السجل الرسمي أخرى

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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

Remote (streamable-http)
Claude Code
claude mcp add --transport http allnewsapi 'https://mcp.allnewsapi.com/mcp' --header 'X-API-Key: <Your AllNewsAPI key (get one at https://allnewsapi.com).>'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "allnewsapi": {
            "type": "http",
            "url": "https://mcp.allnewsapi.com/mcp",
            "headers": {
                "X-API-Key": "<Your AllNewsAPI key (get one at https://allnewsapi.com).>"
            }
        }
    }
}
NPM package allnewsapi-mcp
Claude Code
claude mcp add allnewsapi -e 'ALLNEWSAPI_KEY=<your allnewsapi_key>' -- npx -y allnewsapi-mcp@1.1.9 --apikey
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "allnewsapi": {
            "command": "npx",
            "args": [
                "-y",
                "allnewsapi-mcp@1.1.9",
                "--apikey"
            ],
            "env": {
                "ALLNEWSAPI_KEY": "<your allnewsapi_key>"
            }
        }
    }
}

متغيرات البيئة

  • ALLNEWSAPI_KEY سري Your AllNewsAPI key, used when --apikey is not passed as an argument.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. AllNewsAPI MCP
  2. Quick start
  3. Tools
  4. AI filtering
  5. Example prompts
  6. Supported values
  7. License

AllNewsAPI MCP

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:

{
  "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:

{
  "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

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:

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

Or the hosted server:

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.

الأسئلة الشائعة

ما هو AllNewsAPI؟

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

كيف أثبّت AllNewsAPI؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http allnewsapi 'https://mcp.allnewsapi.com/mcp' --header 'X-API-Key: <Your AllNewsAPI key (get one at https://allnewsapi.com).>'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج AllNewsAPI إلى مفتاح API؟

نعم. يتطلب ALLNEWSAPI_KEY, X-API-Key، وتضبطها في إعداداته.

هل AllNewsAPI مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون AllNewsAPI؟

ينشره AllNewsAPI. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.