NewsAPI MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NewsAPI MCP Server get top headlines for technology in the US"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NewsAPI MCP Server
A Model Context Protocol (MCP) server that provides news search and headline retrieval using NewsAPI. Get top headlines by country and category, or search articles across thousands of sources.
View on mpak registry | Built by NimbleBrain
Install
Install with mpak:
mpak install @nimblebraininc/newsapiConfiguration
Get your API key from NewsAPI, then configure:
mpak config set @nimblebraininc/newsapi api_key YOUR_API_KEYClaude Code
claude mcp add newsapi -- mpak run @nimblebraininc/newsapiClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"newsapi": {
"command": "mpak",
"args": ["run", "@nimblebraininc/newsapi"]
}
}
}See the mpak registry page for full install options.
Related MCP server: News API MCP Server
Tools
get_top_headlines
Get top news headlines by country and category.
Parameter | Type | Required | Description |
|
| No | Keywords to search in article headlines |
|
| No | 2-letter country code (default: |
|
| No | One of: |
|
| No | Number of results, max 100 (default: |
Example call:
{
"name": "get_top_headlines",
"arguments": {
"country": "us",
"category": "technology",
"page_size": 5
}
}Example response:
{
"articles": [
{
"title": "New AI breakthrough announced",
"description": "Researchers have developed a new approach...",
"url": "https://example.com/article",
"source": "TechCrunch",
"author": "Jane Smith",
"published_at": "2026-02-13T10:00:00Z"
}
],
"total_results": 5
}search_news
Search news articles across all sources. Note: Only returns articles from the last 30 days (NewsAPI free tier limitation).
Parameter | Type | Required | Description |
|
| Yes | Search keywords or phrase |
|
| No | Comma-separated source IDs (e.g. |
|
| No | Comma-separated domains (e.g. |
|
| No | Oldest article date, ISO 8601 (e.g. |
|
| No | Newest article date, ISO 8601 (e.g. |
|
| No | 2-letter language code (default: |
|
| No |
|
|
| No | Number of results, max 100 (default: |
Example call:
{
"name": "search_news",
"arguments": {
"query": "artificial intelligence",
"sort_by": "relevancy",
"page_size": 5
}
}Example response:
{
"query": "artificial intelligence",
"articles": [
{
"title": "The State of AI in 2026",
"description": "A comprehensive look at how AI has evolved...",
"url": "https://example.com/ai-2026",
"source": "Wired",
"author": "John Doe",
"published_at": "2026-02-10T14:30:00Z",
"content": "First 200 characters of the article content..."
}
],
"total_results": 127
}Quick Start
Local Development
git clone https://github.com/NimbleBrainInc/mcp-newsapi.git
cd mcp-newsapi
# Install dependencies
uv sync
# Set API key
cp .env.example .env
# Edit .env with your API key
# Run the server (stdio mode)
uv run python -m mcp_newsapi.serverThe server supports HTTP transport with:
Health check:
GET /healthMCP endpoint:
POST /mcp
Development
# Install with dev dependencies
uv sync --group dev
# Run all checks (format, lint, typecheck, unit tests)
make check
# Run unit tests
make test
# Run with coverage
make test-covAbout
NewsAPI MCP Server is published on the mpak registry and built by NimbleBrain. mpak is an open registry for Model Context Protocol servers.
License
MIT
Available Tools
2 toolsget_top_headlinesGet Top HeadlinesA
Get top news headlines by country and category.
Inputs: query, country, category, page_size. Returns: Response model for get_top_headlines tool.
search_newsSearch NewsA
Search news articles from the past 30 days.
Note: The free tier of NewsAPI only returns articles from the last 30 days.
Inputs: query (required), domains, sort_by, sources, +4 more. Returns: Response model for search_news tool.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
get_top_headlines and search_news serve clearly distinct purposes: browsing headlines by country/category versus searching articles by keyword. There is no meaningful overlap between the two tools.
Both tool names follow a clean verb_noun pattern: get_top_headlines and search_news. The naming style is consistent and immediately indicates the action and resource.
Two tools is minimal but reasonable for the NewsAPI's main headline and search endpoints. It is slightly under the typical 3-15 tool range, but the scope is narrow enough that the count feels sensible.
The tool set covers the two core NewsAPI workflows: top headlines and article search. A notable minor gap is the missing sources endpoint, but agents can still accomplish the primary news retrieval tasks without it.
Maintenance
Related MCP Connectors
Official GNews API server: search news articles and top headlines from 80,000+ sources.
Search global news in natural language. Filter by language, country, date, sentiment, and domain.
Get access to real-time and historical news data including top headlines from global sources
Give your AI assistant access to the world’s news. Search articles in any language, track coverage over time, and research companies and events.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables searching news articles and retrieving top headlines from the GNews API with support for filtering by topic, language, and country.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search news articles, get top headlines, and browse sources via the NewsAPI.org service.MIT
- FlicenseNot gradedqualityDmaintenanceEnables searching news, fetching top headlines, listing sources, and generating tech briefings via NewsAPI, with an optional browser frontend.-
- AlicenseNot gradedqualityBmaintenanceEnables fetching top headlines and searching news archives from NewsAPI.org, allowing AI agents to access current and historical news data.110 npmMIT